The Score Automator allows you to write, deploy, and execute complex automation scripts. It is the best way to write detailed, repeatable collections of events and can be used to control parameters with more granular control than any other part of the system. It is perfect for crafting repeatable compositions and can help you get fine control over your projects. Automation events can be executed by any of the control methods available in the platform.
Scores in Music_SDP are collections of automation messages that are executed all at once in a cluster referred to as an ‘event’.
Scores can be viewed in the Score Player module, but modifications can only be saved in MSDP if you are running the source code.
It is recommended that score modifications be made in your favorite IDE (Atom is used in the image above), and re-loaded to test out changes.
Scores are normal .txt file, so no syntax highlighting is available. However, learning to write a score is not a complicated process, and understanding a score is easy once you know how they are designed.
Each line of code in a score contains one or more automation messages that will go out to a single MSDP module.
The line consists of the following items:
- The name of the destination module followed by a space. If the ID includes one or more spaces, the entire ID needs to be wrapped in single or double quotes.
- One or more parameter controls messages. A parameter control message takes two arguments: the parameter name and the destination value. There is an optional third argument, which is glide time in milliseconds. Every parameter control is separated by a comma.
- A semicolon to mark the end of a line.
A parameter control message specifies a parameter to change, and how to change it. There are two required arguments for the control, and a third optional argument:
- The parameter name: The parameter name is the letter p, for parameter, followed by the appropriate parameter number. In the chorus module, volume is parameter 3, so its parameter name is ‘p3’. Output is parameter 2, so its parameter name is ‘p2’.
- The destination value. This value is based on the expected content of the parameter. For example, in the chorus pedal, volume expects a number, so the destination value may look like “1.2”. The output expects two letter/number pairs, so its value might look like “Master Out A 2”.
- The third argument, glide time, is optional, and determines how long it should take, in milliseconds, for the parameter to glide from its current value to its destination value. For example, if the chorus volume is currently set to 0.5, and we want to glide to 1.2 over 5 seconds, we can set the destination value to “1.2” and the glide time to “5000”. Note that not all parameters can glide, but most have the ability to.
Look back at the automation message above, and let’s disect what is happening.
- The message targets a module with the ID: 1 Tape Part. Notice that if an ID contains spaces, the name must be encased in either single or double quotes. If the module ID contains no spaces, quotes are not necessary.
- This is an audio file player, and its fourth parameter is the Play/Stop toggle. We are telling the player to begin playback by setting its state to ON, which is a 1.
- Next, we are setting the volume, parameter 3, to a value of 0. This will start the playback of the file in silence.
- Finally, we are turning the volume up to 0.8 (80% of full volume) and telling the dial to move there over 1000 milliseconds, or one second.
- The events occur sequentially, so this means that the file playback will begin, the volume will be set to 0, then the volume will glide up to 80% value over 1 second.
- This is great, and allows us to combine three automation commands into a single line of code! We could improve on it though, if even very slightly.
- We could have set the volume to 0 before beginning audio file playback, ensuring that there will not be any scenario where we hear any of the audio file before the volume ramps up.
Each event is comprised of one or more parameter automation messages sent out to one or more modules.
Each line of code contains a set of automation messages to send to a single module, and each set may contain one or more parameter changes.
The end of the ‘event’ is marked with a line that contains a single integer number. This number marks the end of the event and determines the number associated with it.
Automation messages in an event are all sent out together when an event is executed.
The automation messages occur sequentially, from top to bottom. The parameter control messages inside of the automation messages occur sequentially from left to right.
Look at the block of code above. Lines 1 through 12 contain a series of messages. Line 13 contains only the number 0. Lines 1 through 12 will be executed together as a series of messages grouped together in event number 0. Lines 14-16 contain another series of messages, and line 17 contains the number 1. Lines 14-16 will be executed together as a series of messages grouped together in event number 1.
The Score Automator Module
The Score Automator Module provides an interface for loading scores and executing the events within the scores. There are a number of steps and options involved in setup and execution of events.
- Load Score - When you begin working in the module, you’ll need to either load a pre-built score or create a new one. If you have a score that already exists, use the Load Score command to find it. Note that all scores should exist inside the “Saved Scores” folder in your MSDP project folder.
- New Score - If you want to start a new score, use this button to generate a score in the appropriate location in your MSDP Project Folder. You’ll be prompted to name the score, and the module will do the rest of the work of creating the blank document and loading it into the module.
- View Score - Opens the score up in a text editor window. NOTE: edits made in this window can NOT be saved by the application. Edits to the score should be made in your own IDE or text editor.
- Next Event - This button will trigger whichever event is currently queued up. If no event has been triggered, than pressing this button will trigger the first event in the file. Unless specified in parameter 6 (Skip to Event), the next event will always proceed to the event following the last one triggered.
- Skip to Event Immediately - Inputting an event number into this field will skip to that event number and will immediately trigger that event.
- Skip to Event (on next event) - Inputting an event number into this field will queue the event to be triggered the next time the ‘Next Event’ button is pressed.
- Control Method - The ‘Next Event’ button MAY be triggered directly by a midi controller. The control method determines whether you’d like the event to be triggered via a MIDI pitch value or a MIDI control value.
- Control Value - This will determine the pitch or controller number that you want to use to trigger events in the module. For example, if you wanted to use Middle C to trigger events, you could set the ‘Control Method’ parameter to ‘Pitch’ and the ‘Control Value’ parameter to 60 - the MIDI value for middle C. If you do not with to use hardware controllers, leave the value at 0.
- Repeat On/Off toggle - used to determine whether you want the event messages to be repeated. Turning this on will cause the event values to repeatedly come out at the interval set by parameter 10.
- Repeat Delay Time - A value, in seconds, of the time between repeats. The default, 0.01, states that the event messages would repeat every 10 milliseconds until the repeat toggle is turned off.
- Event Delay On/Off toggle - When turned on, the beginning of the event will be delayed by the time determined in parameter 12.
- Event Delay Time - A value, in seconds, of the time between the ‘Next Event’ button being pressed, and the beginning of the event automation messages.
- Reload Score - If you modify the score while the module is open, the modifications will need to be reloaded manually in order for them to take effect. Pressing this button will reload the score with all of your saved modifications.
Along with these parameters, the following information is displayed in the module:
- Score Name - This is a display of the currently loaded score. It appears immediately above the “Next Event” button.
- Current Event # - This displays the last event that was triggered. This display can be found immediately below the Skip To Event number boxes.