How to convert a string to integer.
This is my script:
decl id = 0;
if (MIDI_ARGS[2] == 127)
{
strLCD128 = arraytostring(MIDI_ARGS[5]);
id = Integer.parseInt(strLCD128); ??????
selectinterface(id);
}
string to integer
Re: string to integer
Hi
What makes you think you are sending a string?
And what are you actually sending? Sysex? What is your MIDI_ARGS[5]?
Using CCs and the midi channel as the selector, in an OnMidi script setup for CCs on all channels the script would be
selectinterface(MIDI_ARGS[2]);
The channel is a number so no need for any conversion . . .
Cheers
What makes you think you are sending a string?
And what are you actually sending? Sysex? What is your MIDI_ARGS[5]?
Using CCs and the midi channel as the selector, in an OnMidi script setup for CCs on all channels the script would be
selectinterface(MIDI_ARGS[2]);
The channel is a number so no need for any conversion . . .
Cheers
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]