Make one midi output appear in rig manager as two midi devices

Objective - to make one midi out appear in rig manager as two midi devices- eg .

My CRUMAR_MOJO is double fixed keyboard - an upper and a lower section that transmits on on different midi channels.

It has only one 5 pin din midi output.

I needed a way to covert the output midi to different channels as per script - which works ok.

(Im not sure how to re code this to work as i want it)

This CRUMAR_MOJO is my main keyboard but when i use my other two seperate keyboards they appear as seperate midi devices obviously
,
the two seperate keyboards transmit midi chan 2 on upper board and transmit midi chan 1 on lower keyboard-all the MIDI IMPUT BLOCKS are set to recieve on midi chan 2 on upper board and transmit midi chan 1 on lower keyboard.
The midi MIDI IMPUT BLOCKS in my gig rig only relate to CRUMAR_MOJO MIDI INPUT so the only way to change every MIDI IMPUT BLOCK in every rackspace. It doesnt work by changing all midi MIDI IMPUT BLOCKS by device or name

my script that works


var
CRUMAR_MOJO : MidiInDeviceAlias

On NoteEvent(m : NoteMessage) from CRUMAR_MOJO

If m.GetChannel() == 1 Then InjectMidiEventViaRigManager(CRUMAR_MOJO, m.WithChannel(2)); End
If m.GetChannel() == 2 Then InjectMidiEventViaRigManager(CRUMAR_MOJO, m.WithChannel(1)); End
If m.GetChannel() == 4 Then InjectMidiEventViaRigManager(CRUMAR_MOJO, m.WithChannel(2)); End
If m.GetChannel() == 5 Then InjectMidiEventViaRigManager(CRUMAR_MOJO, m.WithChannel(1)); End

End


But i need to change it to this - some how (Im not sure how to code this)

IF CRUMAR_MOJO EXSISTS THEN CARRY OUT CODE ELSE IGNORE IT

var
CRUMAR_MOJO : MidiInDeviceAlias

On NoteEvent(m : NoteMessage) from CRUMAR_MOJO

If m.GetChannel() == 1 Then InjectMidiEventViaRigManager(CRUMAR_MOJO, m.WithChannel(2))

THEN CREATE IN RIG MANAGER CRUMAR_MOJO_UPPER

If m.GetChannel() == 2 Then InjectMidiEventViaRigManager(CRUMAR_MOJO, m.WithChannel(1))

THEN CREATE IN RIG MANAGER CRUMAR_MOJO_LOWER

ELSE

If m.GetChannel() == 4 Then InjectMidiEventViaRigManager(CRUMAR_MOJO, m.WithChannel(2))

THEN CREATE IN RIG MANAGER CRUMAR_MOJO_UPPER

If m.GetChannel() == 5 Then InjectMidiEventViaRigManager(CRUMAR_MOJO, m.WithChannel(1))

THEN CREATE IN RIG MANAGER CRUMAR_MOJO_LOWER

End

I believe this is the purpose of “Local GP Port”. I’ve done something similar with my “APC Key 25” which transmits the key bed performance on MIDI CH1 and the top controls on MIDI CH1.

Since I have Bome MIDI Translator Pro, I can also split the keyboard externally to two separate virtual MIDI ports before sending to Gig Performer. In this case my two ports show up in Gig Performer as “BMT 1” and “BMT 2” and I can create whatever aliases I need in Gig Performer to rename them.

SteveC

1 Like

Thanks for your input steve - but I’d prefer to do everything in gig performer if possible - I’m spent up on software at moment
Cheers

Right, I get it, so try the Local GP Port as your alternate control and see if that does it for you. Maybe at some point in time, there will be more than one Local GP that you can use.

Local GP Port1
Local GP Port2
…

Are you familiar with the concept of a rig script?

You can define a const or a variable inside a rig script and test for a value in your main script

Yes, I recently discovered this and can use this feature. Here is an example and I reference to it with the include statement in my rackspaces. I can change in the gig script and my rackspaces just need the include statement.

There are some functions that I can’t use the include statement because the gig script doesn’t support them except in rackspaces.

The below example assumes that I have a widget named LSpeed and an output block named MyMidiOut in the rackspace, so I need to only include this in rackspaces that have these.

SteveC

// Leslie Speed light for APC Key 25

Var
    NewValue: double
    mm:MidiMessage
    mapnum: int = 86
    LSpeed : widget
    MyMidiOut: MidiOutBlock
    
// Called when a single widget value has changed
// Send to MIDI CH 1 and to My Controller for APC Keys25 top section
On WidgetValueChanged(NewValue : double) from LSpeed
   // Print("Widget value changed to " + NewValue)
    if NewValue > 0 then NewValue = 127 End
    mm = MakeNoteMessageEx(mapnum,NewValue,1)
    SendNowExternal(MyMidiOut,mm)

End

But you don’t have to put everything in that Include. For example, just define the const that indicates which rig you’re using. Then include the $rig$ in both the gig script and your regular rackspaces.

OK, I’ll look into that. Thanks!

Still learning.

SteveC

Hi dj

I’m totally lost with scripting - I managed to adapt a bit of code you sent me a long time ago regarding an old Yamaha keyboard
Cheers

For a start me to learn
How do I test Using normal gigscript

IF CRUMAR_MOJO EXSISTS THEN CARRY OUT CODE ELSE IGNORE IT

@dhj Could you provide an example of using $rig$? I couldn’t find anything and the search function in the V5 Gig performer manual appears broken.

SteveC

I’m nit at my computer (currently traveling) but I don’t understand why you can’t find anything the link above explains exactly how it works ((as well as where the file has to be located)

What is not working?

I figured it out but the search function doesn’t work here when I search on “include”

I had to create the folders “AutoLoad” and “Rigs” under Scripts and then create the file with my Rig Name.

D:\Steve\Documents\Gig Performer\Scripts\AutoLoad\Rigs\

Uploading: image.png…

https://gigperformer.com/docs_5_0/LanguageManual/index.html?include.html

It shows 2 results but does not show the results found.

Ah! I’m not alone: GPScript Language Manual - search functionality

It seems that in Version 5 search is broken - you could try to enter the old documentation there search works!

→ Introduction to GPScript for Gig Performer 4

We will look into that but the link I posted above should have taken you directly to that page

Yes, your link worked but the search function for the GP 5 manual is broken.