What Scripter can, and cannot, do.
musictechscripterbookWhat is Logic Pro's Scripter?
Logic Pro's Scripter is a MIDI Effects Plug-In which allows users to capture, manipulate, and generate MIDI data in real time using the JavaScript.
What Scripter Can Do
With Scripter's JavaScript implementation, doing what any of Logic's MIDI Effects Plug-Ins is entirely possible. I have numerous examples in my Scripter book's public repository. Because you write the code, that means those plug-ins capabilities can be duplicated and enhanced:
- Note rates shorter than 1/32 or longer than 4 bars (the max length in Modulator)
- Custom scales, chords, and transpositions beyond the MIDI Effects defaults.
- Fully customizable randomization of MIDI events.
- Full control over manipulation and automation of other plug-in parameters.
- Custom hardware control maps to software parameters.
- Recreate unique instruments like the Omnichord.
What Scripter Cannot Do
While there is a lot which Scripter is capable of doing, there are very specific things it cannot do.
- No external file read/write access.
- JavaScript libraries can be included in a script, but a script can only be a single file. Module export and import have no use in Scripter. (I do not recommend including an entire library because of the limited environment in which Scripter exists; best to include only what is needed to ensure the project runs as expected.)
- Data can be output to Scripter's console, but not to an external file.
- Custom Controls or GUI. Scripter provides a comprehensive selection of standard controls, and the controls are all automate-able, but customization is very limited. There is no way to customize the overall look and feel of the GUI.
What You Need To Know To Use Scripter
Scripter is a unique environment with a very niche use case, and knowing the following is
- How Logic Pro works, primarily understanding a basic workflow of using MIDI data to create music.
- Common MIDI characteristics:
- Understanding MIDI Events like NoteOn and NoteOff, generally that they exist and their role in making music.
- Typical bounds of the MIDI 1.0 specification, generally that pitches are numbered 0—127, and can have a velocity of 0—127.
- Basic Javascript (my book available on Apple Books and Amazon Kindle teaches this!)
- Working with variables and operators: addition, subtraction, multiplication, division.
- Basic datatypes: Strings, Integers, Floats.
- Basic objects: Arrays, Objects, JSON.
- Conditional branching: if...else, switch.
To learn more about how to use Scripter there is Apple's documentation and my book, The Complete Guide to Logic Pro's Scripter, available on Apple Books and Amazon Kindle. Written for musicians and programmers of any skill level, the guide comes with comprehensive overviews of Scripter’s functions, a music-based JavaScript tutorial inside which takes you from your first line of JavaScript to an entire script, a link to a free open source code library on GitHub, and working examples of features not covered in Apple’s own documentation.
¶