TrackMixer 1.3A

API for making complex sound creations in a very easy way

  1. Lyras
    Tested Minecraft Versions:
    • 1.12
    Information:
    This API is made to help people creating cool and maybe some complex sound creations without writing a lot of messy code. Furthermore this can even be programmed by non-coders if this API is bound to another functional plugin.

    It has been tested for the version 1.12 and is working perfectly for me.

    It uses its own parser to translate the commands from the SN-File and then executes them.
    Moreover it uses its own channel system, which can be used to play single sounds or even loop them.
    Every time a SN-File is used, a new run will be started.

    Syntax:
    You will have to create a file with a file extension 'sn'. Then you can use the syntax to write your commands to that file.
    It provides eigth commands at the moment, which will be explained at this point:
    Code (Text):
    INIT X;
    Example: INIT 20;
    Not optional
    This command has to be in the first line. It will create X channels, which are used to play sounds.

    Code (Text):
    TIME X;
    Example: TIME 20;
    Not optional
    This command has to be in the second line. The new run will run for X ticks.

    Code (Text):
    PLAY CHANNELID SOUND VOLUME PITCH TICK;
    Example: PLAY CHANNEL8 ambient.cave 1 1 20;
    Optional
    ID: CHANNEL + ID
    Sound: folder.folder.name [path of sound file]
    This command can be used to play a single sound at a specific tick[*].

    Code (Text):
    START_LOOP CHANNELID SOUND VOLUME PITCH TICK DURATION DELAY;
    Example: START_LOOP CHANNEL8 block.note.bass 1 1 20 200 10;
    Optional
    ID: CHANNEL + ID
    Sound: folder.folder.name [path of sound file]
    This command can be used to loop a sound for a specific time with a specific delay starting at a specific tick[*].

    Code (Text):
    MUTE CHANNELID TICK;
    Example: MUTE CHANNEL8 100;
    Optional
    Mutes a specific channel at a specific tick[*].

    Code (Text):
    UNMUTE CHANNELID TICK;
    Example: UNMUTE CHANNEL8 120;
    Optional
    Unmutes a specific channel at a specific tick[*].

    Code (Text):
    STOP_LOOP CHANNELID TICK;
    Example: STOP_LOOP CHANNEL8 130;
    Optional
    Stops a loop from a specific channel at a specific tick[*].

    Code (Text):
    BREAK TICK;
    Example: BREAK 150;
    Optional
    Stops the run at a specific tick[*].

    You can even use commentaries by typing:
    Code (Text):
    //COMMENTARY

    [*] The first tick will be set when the run starts. That means that the 20th tick is reached 20 ticks after starting the run.

    NOTE: You will get an error when you leave out a semicolon at the end of a command. The error will show you in which line you forgot the semicolon.

    Implementation:
    The implementation is the easiest thing about this API. It only takes three steps and you're done with the code implementation:
    Code (Text):
                /**
                 * Manager
                 */
                SoundManager manager = new SoundManager ( new Instructor ( new File ( "path/file.ending" ) ) , location );
     
                /**
                 * Setup
                 */
                manager.setup();
     
                /**
                 * Start
                 */
                manager.start();


    Use:
    This API can be used to create detailed and easy-coded background music or effect sounds. There are not limits to your creativity.


    Resources:
    Maybe I will upload some more samples in the next few days.
    https://www.file-upload.net/download-12643038/Ultimate-Intro-DenzelCurry.sn.html | Ultimate [Intro] - Denzel Curry

    Hint:
    Don't start a run directly after a reload or during a lag - It will also cause the timer to lag so multiple sounds can be played at once after the lag ended.

    I am looking forward to questions, suggestions and implementations. :rolleyes:

Recent Updates

  1. Sound-Location
  2. Error-Handling
  3. Performance-Update