ArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArrayArray
Statistics: Posted by oli_lab — 23 Feb 2016, 23:17
I set a different channel on 2 controllers:
CC99...ch2
CC98...ch2
CC6.....ch2
CC38...ch2
CC99...ch1
CC98...ch1
CC6.....ch1
CC38...ch1
]]>
CODE:
void MIDINRPNfilter::onProcess () { int sizeMidiIn = sdkGetEvtSize (midiIn);sdkSetEvtSize(midiOut, 0); if (sizeMidiIn > 0) { //sdkCopyEvt (midiIn, midiOut); for (int i = 0; i < sizeMidiIn; i++) { UsineMidiCode code = sdkGetEvtArrayMidi (midiIn, i); if (code.Msg == MIDI_CONTROLCHANGE) { if (code.Data1 == 99) { NRPN[0] = code.Channel; NRPN[1] = code.Data2; isNRPN = 1; } else if (code.Data1 == 98 && isNRPN == 1) { NRPN[2] = code.Data2; } else if (code.Data1 == 6 && isNRPN == 1) { NRPN[3] = code.Data2; } else if (code.Data1 == 38 && isNRPN == 1) { NRPN[4] = code.Data2; isNRPN = 0; sdkSetEvtData(nrpnChannel, NRPN[0]); sdkSetEvtData(nrpnNumber, NRPN[1] << 7 | NRPN[2]); sdkSetEvtData(nrpnValue, NRPN[3] << 7 | NRPN[4]); } else {sdkSetEvtSize(midiOut, 1);sdkSetEvtArrayMidi(midiOut, 1, code); } } } }}Statistics: Posted by oli_lab — 23 Feb 2016, 16:04
Statistics: Posted by oli_lab — 10 Feb 2016, 18:41
Statistics: Posted by magickz — 10 Feb 2016, 16:58
CODE:
void handleControlchange(byte channel, byte CCnum, byte value){ if (CCnum == 99) { //isNRPN = 1; NRPN[0] = channel; NRPN[1] = value; } else if (CCnum == 98) { //isNRPN = 1; NRPN[2] = value; } else if (CCnum == 6){ // && isNRPN == 1) { NRPN[3] = value; } else if (CCnum == 38){ // && isNRPN == 1) { send3integers(oscAdrMinNRPN, NRPN[0], NRPN[1] << 7 | NRPN[2], NRPN[3] << 7 | NRPN[4]); } else { send3integers(oscAdrMinCC, channel, CCnum, value); }Statistics: Posted by oli_lab — 09 Feb 2016, 00:15
Statistics: Posted by magickz — 08 Feb 2016, 11:41
Statistics: Posted by nay-seven — 17 Feb 2008, 00:46
Statistics: Posted by nay-seven — 16 Feb 2008, 23:34
Statistics: Posted by nay-seven — 16 Feb 2008, 21:07
Statistics: Posted by senso — 14 Feb 2008, 20:50
thanks for the info, I'll take a look.ho , and for info senso your bcr2000 can handle NRPN i think..
Statistics: Posted by senso — 14 Feb 2008, 18:56
Statistics: Posted by goyya76 — 14 Feb 2008, 18:28
Statistics: Posted by nay-seven — 14 Feb 2008, 17:58
Statistics: Posted by senso — 14 Feb 2008, 12:43
Statistics: Posted by goyya76 — 14 Feb 2008, 11:22
Statistics: Posted by senso — 14 Feb 2008, 09:06
Statistics: Posted by oli_lab — 23 Feb 2016, 23:17
CODE:
void MIDINRPNfilter::onProcess () { int sizeMidiIn = sdkGetEvtSize (midiIn);sdkSetEvtSize(midiOut, 0); if (sizeMidiIn > 0) { //sdkCopyEvt (midiIn, midiOut); for (int i = 0; i < sizeMidiIn; i++) { UsineMidiCode code = sdkGetEvtArrayMidi (midiIn, i); if (code.Msg == MIDI_CONTROLCHANGE) { if (code.Data1 == 99) { NRPN[0] = code.Channel; NRPN[1] = code.Data2; isNRPN = 1; } else if (code.Data1 == 98 && isNRPN == 1) { NRPN[2] = code.Data2; } else if (code.Data1 == 6 && isNRPN == 1) { NRPN[3] = code.Data2; } else if (code.Data1 == 38 && isNRPN == 1) { NRPN[4] = code.Data2; isNRPN = 0; sdkSetEvtData(nrpnChannel, NRPN[0]); sdkSetEvtData(nrpnNumber, NRPN[1] << 7 | NRPN[2]); sdkSetEvtData(nrpnValue, NRPN[3] << 7 | NRPN[4]); } else {sdkSetEvtSize(midiOut, 1);sdkSetEvtArrayMidi(midiOut, 1, code); } } } }}Statistics: Posted by oli_lab — 23 Feb 2016, 16:04
Statistics: Posted by oli_lab — 10 Feb 2016, 18:41
Statistics: Posted by magickz — 10 Feb 2016, 16:58
CODE:
void handleControlchange(byte channel, byte CCnum, byte value){ if (CCnum == 99) { //isNRPN = 1; NRPN[0] = channel; NRPN[1] = value; } else if (CCnum == 98) { //isNRPN = 1; NRPN[2] = value; } else if (CCnum == 6){ // && isNRPN == 1) { NRPN[3] = value; } else if (CCnum == 38){ // && isNRPN == 1) { send3integers(oscAdrMinNRPN, NRPN[0], NRPN[1] << 7 | NRPN[2], NRPN[3] << 7 | NRPN[4]); } else { send3integers(oscAdrMinCC, channel, CCnum, value); }Statistics: Posted by oli_lab — 09 Feb 2016, 00:15
Statistics: Posted by magickz — 08 Feb 2016, 11:41
Statistics: Posted by nay-seven — 17 Feb 2008, 00:46
Statistics: Posted by nay-seven — 16 Feb 2008, 23:34
Statistics: Posted by nay-seven — 16 Feb 2008, 21:07
Statistics: Posted by senso — 14 Feb 2008, 20:50
thanks for the info, I'll take a look.ho , and for info senso your bcr2000 can handle NRPN i think..
Statistics: Posted by senso — 14 Feb 2008, 18:56
Statistics: Posted by goyya76 — 14 Feb 2008, 18:28
Statistics: Posted by nay-seven — 14 Feb 2008, 17:58
Statistics: Posted by senso — 14 Feb 2008, 12:43
Statistics: Posted by goyya76 — 14 Feb 2008, 11:22
Statistics: Posted by senso — 14 Feb 2008, 09:06