General

MIDI_ARGS and expressions - correct syntax

Started by whatisvalis on .

Sign in or create an account to join the conversation.

2 posts

Topic starter
I have Cubase sending Midi to an On MIDI script
Port 4, CC, 1 to 127, 1 to 16.

I'm storing the CCs in a global expression called sectiontrack

I have an On expression script that reacts to sectiontrack | any
I want this script to change different object states depending on sectiontrack, for eg.

if ({sectiontrack==1,sectiontrack==2,sectiontrack==3,sectiontrack==4,sectiontrack==5,sectiontrack==6,sectiontrack==7})
{
orchsections.swStrings.x=1;
Sections.cbAlbIlongs.x=1;
}
if ({sectiontrack==8,sectiontrack==9,sectiontrack==10,sectiontrack==11,sectiontrack==12})
{
orchsections.swStrings.x=1;
Sections.cbAlbIshorts.x=1;
}

The above works fine. When i select the relevant track in Cubase the correct states are triggered in Lemur.

However, i need to filter by MIDI channel and I can't get anything working. eg i've tried

if ({sectiontrack=={1,127,0},sectiontrack=={2,127,0})
{
orchsections.swStrings.x=1;
Sections.cbAlbIlongs.x=1;
}
if ({sectiontrack=={1,127,1},sectiontrack=={2,127,1})
{
orchsections.swStrings.x=1;
Sections.cbAlbIshorts.x=1;
}

I have a monitor set-up for sectiontrack and it's displaying the correct CC / channe;s etc.

Any thoughts on what I'm doing wrong?

Cheers,

JD