I’ll leave to Apple’s documentation an overview of the Scripter Editor and just dive into the undocumented and undesirable behaviors.
Also (and probably worst of all), there are times when the editor will stop compiling to the UI. I was able to jumpstart the editor with a major code change, completely shutting off and reloading of the Scripter plug-in and desired script, and even having to escalate restarting Logic Pro X. The escalation seemed to be necessary more often when I doing a lot of Run Script actions to parse the code, but this wasn’t consistent enough to be hard fact.
There are a few keyboard shortcuts that are specific to the editor. The usual Cut, Copy, and Paste are all supported, but you must be careful you have the correct focus or else you will mistakenly make changes in your project. Beyond that, all other keyboard shortcuts are reserved for the Project window, and the Editor has only these left specific to it:
- Increase text size: Shift+Option+”+”
- Decrease text size: Control+Option+”-“
To save a script update, you must go back to the Scripter plug-in menu for that script and select “Save” in the main pulldown menu. Pressing Cmd+S will only save the Project, and that save will not include the Script.
My Development Process for Scripter
Because the Editor is so wonky, most of my development is done in another editor—my preferred editors are BBEdit or Microsoft Visual Studio Code depending on my mood for the day. I keep my code changes small to minimize the need for relying on the Editor for everything. Essentially, it works out to something like this, using BBEdit as the example:
- Make changes in BBEdit.
- Copy-paste the entire script from BBEdit to Scripter Editor. This has the benefit of avoiding the compilation problems noted above.
- Click “Run Script” in case there are any weird syntax issues according to Editor. (Usually these are my fault.)
- Save the script via the Scripter pulldown menu.
- Play the tracks, and test the code.
- Any required changes are made in BBEdit, and the process starts from the top.
Recording Scripter’s MIDI Output
This details how to record the MIDI output of Scripter. Essentially, this method allows recording non-destructively to the source MIDI data by creating a track that has the MIDI effects but points to another track with the patch via the IAC Driver. The caveat to non-destructive recording is looping will cause the previous loop’s data to be written over, which is important when working with randomization.
- Open /Applications/Audio MIDI Setup
- Go to Window>MIDI Studio
- In the window, double-click the “IAC Driver” to view its properties.
- Check “Device is online”
- Go to the project in LPX
- Duplicate the track to be recorded (called SRC and DUPE, respectively)
- In the SRC track, change the instrument plug-in to /Utility/External Instrument/Stereo
- In the window that appears, change the MIDI Destination pulldown to “IAC Driver Bus 1”
- Move the music region(s) in SRC to DUPE
- In DUPE, turn off the “R” button
- In SRC, turn off the MIDI FX
- In SRC, turn on the “R” button
- In the toolbar, hit Record
Source: youtube.com: iamamusicmogul