hallo,
how can i change channel out of "Switches1" object using a "Switches2" object? When "Switches2" is ON, "Switches1" outputs CC in channel 1, when "Switches2" is off, "Switches1" outputs CC in channel 2.
i hope this is easier and clearer, the other thread i wrote is just a mess (i had never tried to solve something in a forum, and had so many fail attempts and misunderstandings in a single post!).
one thousand thanks.
david
Change dinamically midi channel from Switches object
-
- Newbie
- Posts: 12
- Joined: 10 Jan 2014 11:48
- Location: Berlin
- Contact:
Change dinamically midi channel from Switches object
- Attachments
-
- Switches Change Channel.jzml
- (2.66 KiB) Downloaded 56 times
-
- Regular
- Posts: 294
- Joined: 24 Jan 2012 18:22
Re: Change dinamically midi channel from Switches object
If you look at the last example for the On/Off switch, you see the script where you make the midiout (ctlout(1,c,x*127,1)). The last "1" is the Midi Channel.
So, you can declare a variable called midichannel ("decl midichannel;") beforehan then make another "if clause" asking for the state of Switch3: if (Switch3.x==0) {midichannel=1;}else{midichannel=2;}.
Then you go ctlout(1,c,x*127,midichannel) so that the midiout channel is determined by the setting of Switch3.
So, you can declare a variable called midichannel ("decl midichannel;") beforehan then make another "if clause" asking for the state of Switch3: if (Switch3.x==0) {midichannel=1;}else{midichannel=2;}.
Then you go ctlout(1,c,x*127,midichannel) so that the midiout channel is determined by the setting of Switch3.