Note on off to midi cc's sugestions

#1

do any of you guys know of a good midi filter, or some other way, to change incoming midi note on offs to cc 00 127?

thanx

#2

Scripting is your friend

#3

i’ll never know how to do that, sorry

#4

i found something that should work, but it doesn’t :frowning:

#5

What do you want exactly, maybe I can write a piece of Code.

#6

i have a footswitch that sends midi notes momentary on/off, i want to send G9 midi note on/off, and reassign that in the computer to send G9 off= cc 21 000 G9 on= cc 21 127

#7

@pianopaul is right GP script is you friend, and what a friend :crazy_face:

  • Create a MIDI in block in the back view

  • right mouse click on it => Osc/GPscript Handle => Set handle, then give MIDIin as a handle name

  • go to Window (in menu bar) => Show script editor

  • copy and paste the following script in the editor and compile:

    Var
     MIDIin   : MidiInBlock
    
    On NoteEvent(msg : NoteMessage) Matching G9 from MIDIin
      If msg.IsNoteOn()
      Then
        MIDIin.SendNow(MakeControlChangeMessage(21,127));
      Else
        MIDIin.SendNow(MakeControlChangeMessage(21,0));
      End
    End
    

That’s it, be happy :wink:

2 Likes
#8

i cant get past step one, i don’t know what you mean by create a midi block in the background…

cant i just open the script editor?

#9

actually got pretty far but when i hit compile…

Syntax Error: Line 7, Col 35: Unexpected or unrecognised token
‘Matching’
missing From at ‘Matching’

#10

and now i cant seem to paste that script in at all anymore, even after i quit and shutdown without saving anything

#11

Take it slowly and most positively :wink: follow the pics…

55

  • This name is MIDIin has you can see in the script.
  • Then compile (The error you got is this missing handle name)

Try again with this help…

1 Like
#12

@davepine
Don’t forget to select “Use in GPScript”
09

1 Like
#13

did it again, exact same error message, i’m on gp ver 2.0.18 if that makes a difference

#14

yes i named it
yes, i also tried checking the box “use gp script”

#15

Change the MIDI Note number to G8

If you open Mldi Monitor and press the pedal what do you get?

#16

I cannot tell you if GP 2.0.18 had the Matching option for the MIDI block callback, but if it was not the case you can do it like this:

Var
  MIDIin   : MidiInBlock

On NoteEvent(msg : NoteMessage) from MIDIin

  If GetNoteNumber(msg)==127
  Then
    If msg.IsNoteOn()
    Then
        MIDIin.SendNow(MakeControlChangeMessage(21,127));
    Else
        MIDIin.SendNow(MakeControlChangeMessage(21,0));
    End
  Else
    MIDIin.SendNow(msg);
  End
End

Concerning the G9 “issue” raised by @keyman, I didn’t check at the time I wrote the first script, but I supposed G9 was thought to be the highest possible MIDI note. So I replaced G9 by 127. Please, following the differents steps adviced by @keyman, check if it works this way.

And of course, think of updating to GP 3, which is probably the best advice I can give to you. :wink::+1:

1 Like
#17

tried again, made sure midi notes were correct, tried different ones, still no luck and same error message

#18

Can you upload screenshots of the script window showing the error
and the complete code?

#19

#20

tried the latest, now i get this