gpScript MidiInBlock BlockNoteOn

i have midiInput block with the name and handle midiMPiano1.

in script, trying to turn on/off BlockNoteOn.

near as I can tell, i’m supposed to do this:

SendNow(“midiMPiano1”, 1, 60, 100); //returns error “Types are not compatible”

Screenshot 2025-03-08 at 11.45.05 PM

how can I turn on/off BlockNoteOn from script?

SetParameter(midiMPiano1,288,1.0)

In the MIDI In block, the NoteOn event block parameter is 288.
You can use SetParameter with a value of 1.0 to turn the block on, 0 to turn it off.

SendNow is for sending out MIDI messages (like notes or CC messages). Per @edm11 use the SetParameter function, which is designed to control how the plugin behaves.

Thank you both!

1 Like