Midi controller: Changing rackspaces using buttons/pads

Try this version:
ELIA CONCEPT (CC and Note to PC).gig (1.5 MB)

If your controller has an editor or allows you to reconfigure the messages being sent by the buttons/pads, then you could easily change them to send Program Change (PC) messages. However, it looks like an editor was only added for Launchkey controllers from Mk3.

Instead, a “Gig Script” can be used in GP to convert the incoming messages from the Launchkey into PC messages. This is accessed from the menubar “Window > Show Gig Script Editor”.

// Custom script for the Novation Lauchkey 61 Mk2
// CC and Note messages for the 8 buttons and 16 pads are converted to PC messages to change rackspaces

Var
    LAUNCHKEY : MidiInDeviceAlias
    PADNOTES : Integer Array = [40,41,42,43,48,49,50,51,36,37,38,39,44,45,46,47] // The note numbers for the 16 pads
    
// Converting the 8 Launchkey buttons (CC 51 to 58) to PC messages 0 to 7
On ControlChangeEvent(m : ControlChangeMessage) Matching [51..58] from LAUNCHKEY
    if GetCCValue(m) == 127 then
        InjectMidiEventViaRigManager(LAUNCHKEY, MakeProgramChangeMessage(GetCCNumber(m)-51))
    end
End

// Converting the 16 Launchkey pads (Note messages) to PC messages 8 to 23
On NoteEvent(m : NoteMessage) Matching [36..51] from LAUNCHKEY
    Var i : Integer
        noteNumber : Integer = GetNoteNumber(m) 
    if GetChannel(m) != 10 then InjectMidiEventViaRigManager(LAUNCHKEY, m) // Pass through notes on other channels
    elsif IsNoteOn(m) and GetChannel(m) == 10 then
        // Find index of the pad note number and generate PC message
        for i = 0; i < Size(PADNOTES); i = i + 1 do
            if noteNumber == PADNOTES[i] then
                InjectMidiEventViaRigManager(LAUNCHKEY, MakeProgramChangeMessage(i + 8))
            end
        end
    end
End
1 Like