Hi folks -
Newbie question for you. I have a MIDI In Block defined with a keyboard split (say, C1-C2), along with a Rackspace script that I only expect to run when notes are played within that split. The code looks something like:
On NoteEvent (m : NoteMessage) From MyInputBlock
If IsNoteOn(m) Then
// Do something...
SendNow(MyInputBlock, m)
Elsif IsNoteOff(m) Then
// Do something else...
SendNow(MyInputBlock, m)
End
End
The script works fine, but it generates output for all notes, not just the ones defined in the split range. I can get around it by doing something like this:
On NoteEvent (m : NoteMessage) From MyInputBlock
If IsNoteOn(m) And BetweenNotes(GetMinNoteFromMidiInBlock(MyInputBlock), m, GetMaxNoteFromMidiInBlock(MyInputBlock)) Then
// Do something...
SendNow(MyInputBlock, m)
Elsif IsNoteOff(m) And BetweenNotes(GetMinNoteFromMidiInBlock(MyInputBlock), m, GetMaxNoteFromMidiInBlock(MyInputBlock)) Then
// Do something else...
SendNow(MyInputBlock, m)
End
End
Is this the recommended approach? It seems a bit cumbersome since I would expect the MIDI In Block to filter out notes that aren’t in the split range, either on the input side or the output side but somewhere, so that the script wouldn’t have to perform this check. Or am I missing a simple checkbox or setting somewhere?
Thanks as always!