Map midi notes to prg change

Hi gp ers
I have no prg change facility on my controller keyboards and need to map unused midi notes to program change messages in go, I’ve seen it on forum but can’t find it ? cheers guys

What do you want to achieve?
Change Rackspaces/Variations via sending Midi Notes from you controller?
Or changing Presets of your plugin within a rackspace?

Hi paul
I have 4 programmable buttons that will send only cc information that I would like to covert to prg change messages to switch rackspace variations,
Also I would like to know how to convert midi note to program change messages to switch rackspace variations.
Thanks

OK, correct me when I am wrong.
You have 4 buttons and this buttons send PC messages for example 1,2,3 and 4
Now PC 1 should switch to the 1st variation in the current rackspace.
PC 2 to the 2nd, PC 3 to the 3rd and PC 4 to the fourth.
Is that what you want?

Hi paul
I need to know how to map cc messages to program change messages in GP

And how to map note numbers to or change messages
Thanks

That is only the half of the story, unfortunately.

Depending on what actions should be done the solutions differ.

With this script you can convert a control change message to a PC message
var MIN : MidiInBlock
ccv : Integer
pm : ProgramChangeMessage

on ControlChangeEvent(m : ControlChangeMessage) from MIN
 ccv := GetCCValue(m)
 pm  := MakeProgramChangeMessage(ccv)
end 

But now what to do with that?

With this script an incoming Note Number between C1 and D1 is checked and
depending in the note number the variation is switched

var MIN : MidiInBlock
    nv  : Integer
    ccm : ControlChangeMessage
on NoteEvent (m : NoteMessage) matching [C1..D#1] from MIN
 nv = GetNoteNumber(m)
 if nv == C1 then
  SetVariation(0)
 elsif nv == C#1 then
  SetVariation(1)
 elsif nv == D1 then
  SetVariation(2)
 else
  SetVariation(3)
 end 
end

With this script incoming cc message between 12 and 15 are checked and depending ond the cc number the variation is switched:
var MIN : MidiInBlock
ccv : Integer
pm : ProgramChangeMessage

on ControlChangeEvent(m : ControlChangeMessage) matching [12..15] from MIN
 ccv := GetCCValue(m)
 
 if ccv == 12 then
  SetVariation(0)
 elsif ccv == 13 then
  SetVariation(1)
 elsif ccv == 14 then
  SetVariation(2)
 else
  SetVariation(3)
 end 
end

Hi paul
Superb the second script is just what I need for note numbers.

Also
I need to know how to map CC messages to program change messages in GP also to switch variations
and also the same to switch songs when it song mode
Cheers

Do you know this preferences section?


Here you can map CC to switch next or previous song.
Also you can assign CC Numbers to switch Song Parts and you know that Sonpg Parts reference variations.
So this way you dont need any script!
For example the top left button on your controller switches to SongPart 1 and the next to Songpart 2

Hi
I missed fully reading both scripts they are ideal.

it’s just songs now I would like to switch via cc numbers
Cheers

Yes have seen switching up/Down on that page , but I need to use dedicated buttons to Goto specific variations as I don’t have a display in front of me
Cheers

Exactly that should be possible with mapping of discrete CC Numbers to Song Parts

Thanks for your help paul
Will check out tonight cheers

Sorry if this is already answered - not clear. Using #2 could midi Note Numbers be used to select SONGS (with only one part) in Song Mode rather than Variations? If so - how would the script differ?

Are you an Mac?
This could be a solution to transform note numbers to pc messages
https://www.bome.com/products/miditranslator#purchase

Nope - Windoz PC

I just noticed MidiTranslator is available for Windows and there is a trial version.

Yikes -$100 CAD. If only the GP3 Midi Filter could remap midi notes to Prg Ch

So it can’t be done with a Script?

The Filter does not help because it is too late in the signal chain.
PC messages are received at the physical Midi Device

Scripting could do that, but you have to include that script in each rackspace you are using.

Also a Max Patch could help, the runtime of Max/MSP should be free.
I try something and come back.

Here is a Max Patch wich you can use with Max/Msp
It gets a NoteNumber and sends it out as PC Message on Channel 1
In Max you have to define the Midi In and the Midi Out
For the Midi Out you use you have to set the abbreviation to a because the patch sends out to device with the abbreviation a

NotePC.amxd (5.0 KB)

1 Like