scripting questions: MIDI_ARGS
Posted: 30 Mar 2012 22:42
Hi guys, I"m new to Lemur and am really loving the possibilities. The one thing I ran into is that there is no Pro Tools support, so I'm taking a crack at doing some basic PT control. I have fader moves and mutes working from Lemur to PT, and now I'm working on receiving data from PT. I can't find any documentation on how MIDI_ARGS work though.
All my data from PT comes in the form of two controller messages per command. So for example, mute light indicator is:
0xB0,0x0C,0x00
0xB0,0x2C,0x42
I've set up a script with execution set to ( On MIDI : B0 : Midi 1 : 0-127 : 1-1 )
But I don't understand the data structure so I'm not sure where to go next. From my forum searches it sounds like MIDI_ARGS is an array but I can't seem to get it working. I've tried the following:
decl mutebyte1 = MIDI_ARGS[12];
decl mutebyte2 = MIDI_ARGS[44];
if (mutebyte1 = 0x00 && mutebyte2 == 0x42) x = 1;
if (mutebyte1 = 0x00 && mutebyte2 == 0x02) x = 0;
and also
decl mutebyte1 = MIDI_ARGS[0x0C];
decl mutebyte2 = MIDI_ARGS[0x2C];
if (mutebyte1 = 0x00 && mutebyte2 == 0x42) x = 1;
if (mutebyte1 = 0x00 && mutebyte2 == 0x02) x = 0;
But no luck. I also tried sending the MIDI_ARGS to the monitor object so I could try to see what the data stream was but I couldn't get that happening either. Any help would be appreciated!
All my data from PT comes in the form of two controller messages per command. So for example, mute light indicator is:
0xB0,0x0C,0x00
0xB0,0x2C,0x42
I've set up a script with execution set to ( On MIDI : B0 : Midi 1 : 0-127 : 1-1 )
But I don't understand the data structure so I'm not sure where to go next. From my forum searches it sounds like MIDI_ARGS is an array but I can't seem to get it working. I've tried the following:
decl mutebyte1 = MIDI_ARGS[12];
decl mutebyte2 = MIDI_ARGS[44];
if (mutebyte1 = 0x00 && mutebyte2 == 0x42) x = 1;
if (mutebyte1 = 0x00 && mutebyte2 == 0x02) x = 0;
and also
decl mutebyte1 = MIDI_ARGS[0x0C];
decl mutebyte2 = MIDI_ARGS[0x2C];
if (mutebyte1 = 0x00 && mutebyte2 == 0x42) x = 1;
if (mutebyte1 = 0x00 && mutebyte2 == 0x02) x = 0;
But no luck. I also tried sending the MIDI_ARGS to the monitor object so I could try to see what the data stream was but I couldn't get that happening either. Any help would be appreciated!