X
Table Of Contents
- Logic Pro X Effects
- Contents
- Chapter 1: Amps and pedals
- Chapter 2: Delay effects
- Chapter 3: Distortion effects
- Chapter 4: Dynamics processors
- Chapter 5: Equalizers
- Chapter 6: Filter effects
- Filter effects overview
- AutoFilter
- EVOC 20 Filterbank
- EVOC 20 TrackOscillator
- EVOC 20 TrackOscillator overview
- Vocoder overview
- EVOC 20 TrackOscillator interface
- EVOC 20 TrackOscillator analysis in parameters
- Use EVOC 20 TrackOscillator analysis in
- EVOC 20 TrackOscillator U/V detection parameters
- EVOC 20 TrackOscillator synthesis in parameters
- EVOC 20 TrackOscillator oscillators
- EVOC 20 TrackOscillator formant filter
- EVOC 20 TrackOscillator modulation
- EVOC 20 TrackOscillator output parameters
- Fuzz-Wah
- Spectral Gate
- Chapter 7: Imaging processors
- Chapter 8: Metering tools
- Chapter 9: MIDI plug-ins
- Chapter 10: Modulation effects
- Chapter 11: Pitch effects
- Chapter 12: Reverb effects
- Chapter 13: Space Designer convolution reverb
- Chapter 14: Specialized effects and utilities
- Chapter 15: Utilities and tools
- Appendix: Legacy effects
Chapter 9 MIDI plug-ins 19 4
Retrieve plug-in parameter values
Call GetParameter() with the parameter name to return a value (number object) with the
parameter’s current value. GetParameter() is typically used inside the HandleMIDI function or
ProcessMIDI function.
This code example converts modulation events into note events and provides a slider to
determine note lengths.
m Type the following in the Script Editor window. Text following “//” describes the
argument function.
var PluginParameters = [{name:"Note Length"}]; // create a slider
(default range 0.0 - 1.0)
function HandleMIDI(e) {
if (e instanceof ControlChange && e.number == 1) { // if event is
modulation wheel
var note = new NoteOn; // create a NoteOn
object
note.pitch = e.value; // use cc value as note
pitch
note.velocity = 100; // use velocity 100
note.send(); // send note on
var off = new NoteOff(note); // create a NoteOff
object that inherits the NoteOn's pitch and velocity
var delayInBeats = GetParameter("Note Length") + 0.1; // retrieve the
parameter value of the slider you created (add 0.1 to guarantee note on and
off are not simultaneous)
off.sendAfterBeats(delayInBeats); // send note off after
the length in beats is set via the slider
}
}