The Scripter plug-in exposes a set of JavaScript functions that you can implement in your script to communicate with Logic Pro X. See these sections for details about different JavaScript function types and how to use them to create MIDI plug-ins.
HandleMIDI function
ProcessMIDI function
GetParameter function
SetParameter function
ParameterChanged function
Reset function