Scripter Javascript Tutorial
javascriptmusiclogicscripterbookexcerpttutorial39 Scripter’s Callback Functions
Just about every Scripter script will utilize at least one of the following functions, all of which are called by Scripter itself:
HandleMIDI()
, called every time there is a MIDI event found in a track at the playhead’s location. The event is passed into the function.ProcessMIDI()
, called upon every new process block. A process block is a predetermined area in the track where the playhead is currently positioned and its length is determined by Logic Pro’s I/O buffer size.ParameterChanged()
, called when the user changes a parameter control in the parameter window. Parameters are maintained in a variable outside of the function.
Many of the examples in this tutorial take place within these functions to help provide context for the example itself.