public void start() { mox.MidiInput += new MIDIOXLib._IMoxScriptEvents_MidiInputEventHandler(this.midiIn); guruA = new CGuru(mox, 4, "d:\\home\\daniel\\desk\\guruA.txt"); guruB = new CGuru(mox, 5, "d:\\home\\daniel\\desk\\guruB.txt"); behringerLinks = new CBehringer(mox); behringerLinks.addBank(24, (int)midiChannel.C11, 0); behringerLinks.addBank(25, (int)midiChannel.C11, 32); behringerLinks.addBank(26, (int)midiChannel.C11, 64); behringerLinks.addBank(27, (int)midiChannel.C11, 96); behringerLinks.addBank(28, (int)midiChannel.C9, 0); behringerLinks.addBank(29, (int)midiChannel.C9, 32); behringerLinks.addBank(30, (int)midiChannel.C9, 64); behringerLinks.addBank(31, (int)midiChannel.C13, 32); //sends mixer1 behringerLinks.addMixer((int)midiChannel.C13); behringerRechts = new CBehringer(mox); behringerRechts.addBank(0, (int)midiChannel.C10, 0); behringerRechts.addBank(1, (int)midiChannel.C10, 32); behringerRechts.addBank(2, (int)midiChannel.C10, 64); behringerRechts.addBank(3, (int)midiChannel.C10, 96); behringerRechts.addBank(4, (int)midiChannel.C14, 32); //sends mixer2 behringerRechts.addBank(4, (int)midiChannel.C15, 32); //sends mixer3 behringerRechts.addBank(5, (int)midiChannel.C9, 0); //sends mixer3 behringerRechts.addBank(6, (int)midiChannel.C9, 32); //sends mixer3 behringerRechts.addBank(7, (int)midiChannel.C9, 64); //sends mixer3 behringerRechts.addMixer((int)midiChannel.C14); behringerRechts.addMixer((int)midiChannel.C15); readConfigFile(); guru = guruA; mox.FireMidiInput = 1; mox.DivertMidiInput = 0; string a = Console.ReadLine(); mox.FireMidiInput = 0; }
public void start() { mox.MidiInput += new MIDIOXLib._IMoxScriptEvents_MidiInputEventHandler(this.midiIn); guruA = new CGuru(mox, bcrLinks, 4, "d:\\home\\daniel\\desk\\guruA.txt"); guruB = new CGuru(mox, bcrLinks, 5, "d:\\home\\daniel\\desk\\guruB.txt"); behringer = new CBehringer(mox, bcrLinks, bcrRechts); //dazu muss erst ein objekt initialisiert werden von behringer sonst crash init(); guru = guruA; mox.FireMidiInput = 1; mox.DivertMidiInput = 0; string a = Console.ReadLine(); mox.FireMidiInput = 0; }
private void midiIn(int ts, int port, int chan, int dat, int wert) { switch (chan) { case 152: // note ons von der zoom if (dat == 24) { shift = 1; } break; case 136: //hier sind automatisch nur die note offs von der zoom if (dat == 24) { shift = 0; //shift funktion } if (dat == 34) { guru.undoCommand(); //undo } if (dat == 35) { guru.commitCommand(); //commit } if (dat == 36) { guru.recordCommand(); //recrd } if (dat == 12) { guru.patternView(); //pattern view } if (dat == 13) { guru.graphEditView(); //graph edit } if (dat == 14) { guru.padEditView(); //pad edit } if (dat == 15) { guru.scenesView(); //scenes view } if (dat == 32) { init(); } if (dat == 37) { guru.load(); //pad einstellungen laden } if (dat == 38) { guru.save(); //pad einstelungen schreiben } if ((dat >= 16) && (dat <= 19)) { guru.switchMachine(dat - 16); } break; case 144: //note vom keyboard für jeweils einen der beiden synthies mox.OutputMidiMsg(2 + midiYake, 144, dat, wert); break; case 159: //kommt von der akai - noten mox.OutputMidiMsg(4 + midiYoke, midiNotes[11], dat, wert); if (shift == 1) { toggleOFF(4 + midiYoke, midiNotes[12], dat - 36 + 60); //auch pattern auswählen } if (dat >= 60 ) { toggleOFF(4 + midiYoke, midiNotes[15], dat); } break; case 175: //kommt von der akai - aftertouch //mox.OutputMidiMsg(bcrLive, 4 + midiYoke, midiNotes[11], wert); break; case 184: behringer.setValue(184, dat, wert); break; //festgelegter kanal für die send effekte case 185: behringer.setValue(185, dat, wert); break; //festgelegter kanal für die effekte case 186: behringer.setValue(186, dat, wert); break; // festgelegter kanal für instrumente case 188: behringer.setValue(188, dat, wert); break; //mixer bank1 case 189: behringer.setValue(189, dat, wert); break; //mixer bank2 case 190: behringer.setValue(190, dat, wert); break; //mixer bank3 case 191: //midiKanal 16 if ((wert == 0) && (guru.browserMode == 0)) //nur auf die off events vom toggleOff reagieren { if (dat == midiCCSwitch) { behringer.switchBank(); } if (dat < 24) { behringer.writeMixer(dat); } if (dat == midiCCSendLinks) { int call = behringer.writeSends(0, 0); toggleOFF(bcrLive, midiChannel[16], triggerCCsendEfx[0] + call); } if (dat == midiCCSendRechts) { int call = behringer.writeSends(1, 0); toggleOFF(bcrLive, midiChannel[16], triggerCCsendEfx[0] + call); } if ((dat >= midiCCInstrument[0]) && (dat <= midiCCInstrument[3])) //------------------instrumente-------------- { int whichOne = dat - midiCCInstrument[0]; writeRecordFocus(whichOne); behringer.writeInstrument(whichOne); if (dat == midiCCInstrument[0]) { midiYake = 0; } if (dat == midiCCInstrument[1]) { midiYake = 1; } if (dat == midiCCInstrument[2]) { midiYoke = 0; guru = guruA; } if (dat == midiCCInstrument[3]) { midiYoke = 1; guru = guruB; } } if ((dat >= midiCCefx[0]) && (dat <= midiCCefx[3])) //------------------effekte------------------------ { int whichOne = dat - midiCCefx[0]; behringer.writeEfx(whichOne); if (triggerCCefx[whichOne] != -1) { toggleOFF(bcrLive, midiChannel[16], triggerCCefx[whichOne]); } } } break; default: break; } }
private void midiIn(int ts, int port, int chan, int dat, int wert) { switch (chan) { case 152: if (dat == 24) { shiftPads = 1; } break; // note ons von der zoom case 136: //hier sind automatisch nur die note offs von der zoom if (dat == 21) { shiftPads = 0; //shiftPads funktion shiftScenes = ((shiftScenes + 1) % 9) * 8; //shiftpads offset } if (dat == 22) { guru.undoCommand(); //undo } if (dat == 23) { guru.commitCommand(); //commit } if (dat == 20) { guru.recordCommand(); //recrd } if (dat == 12) { guru.patternView(); //pattern view } if (dat == 13) { guru.graphEditView(); //graph edit } if (dat == 14) { guru.padEditView(); //pad edit } if (dat == 15) { guru.scenesView(); //scenes view } if (dat == 32) { readConfigFile(); } if (dat == 37) { guru.load(); //pad einstellungen laden } if (dat == 38) { guru.save(); //pad einstelungen schreiben } if ((dat >= 16) && (dat <= 19)) { guru.switchMachine(dat - 16); } break; case 144: //note vom keyboard für jeweils einen der beiden synthies mox.OutputMidiMsg(midiYakeOffset + midiYake, 144, dat, wert); break; case 159: //kommt von der akai - noten mox.OutputMidiMsg(midiYokeOffset + midiYoke, midiNotes[11], dat, wert); if (shiftPads == 1) { toggleOFF(midiYokeOffset + midiYoke, midiNotes[12], dat - 36 + 60); //auch pattern auswählen } if (dat >= 60) { toggleOFF(midiYokeOffset + midiYoke, midiNotes[15], dat + shiftScenes); } break; case 175: //kommt von der akai - aftertouch //mox.OutputMidiMsg(bcrLive, 4 + midiYoke, midiNotes[11], wert); break; case (int)midiChannel.C9: behringerLinks.setBankParam(4 + (dat / 32), dat % 32, wert); behringerRechts.setBankParam(6 + (dat / 32), dat % 32, wert); break; case (int)midiChannel.C10: behringerRechts.setBankParam(0 + (dat / 32), dat % 32, wert); break; case (int)midiChannel.C11: behringerLinks.setBankParam(0 + (dat / 32), dat % 32, wert); break; case (int)midiChannel.C13: //mixer bank1 if (dat < 32) { behringerLinks.setMixerParam(0, dat, wert); } else { behringerLinks.setBankParam(7, (dat % 32), wert); } break; case (int)midiChannel.C14: //mixer bank2 if (dat < 32) { behringerRechts.setMixerParam(0, dat, wert); } else { behringerRechts.setBankParam(4, dat % 32, wert); } break; case (int)midiChannel.C15: //mixer bank3 if (dat < 32) { behringerRechts.setMixerParam(1, dat, wert); } else { behringerRechts.setBankParam(5, dat % 32, wert); } break; case 191: //midiKanal 16 if (wert == 0) //nur auf die off events vom toggleOff reagieren { if (dat == midiCCSwitch) { behringerRechts.switchBank(); behringerRechts.callBank(lastOne); } if (dat < 24) { behringerLinks.callMixer(dat); sendIsActiveLinks = 0; sendIsActiveRechts = 0; } if (dat == midiCCSendLinks) { if (sendIsActiveLinks == 1) { activeSendEfx = (activeSendEfx + 1) % 3; } sendIsActiveLinks = 1; sendIsActiveRechts = 0; behringerLinks.callBank(7); lastOne = 6 + activeSendEfx; behringerRechts.callBank(lastOne); toggleOFF(bcrLive, (int)midiChannel.C16, triggerCCsendEfx[0] + activeSendEfx); } if (dat == midiCCSendRechts) { if (sendIsActiveRechts == 1) { activeSendEfx = (activeSendEfx + 1) % 3; } sendIsActiveLinks = 0; sendIsActiveRechts = 1; behringerLinks.callBank(4 + activeSendEfx); lastOne = 4 + behringerRechts.mixerBank; behringerRechts.callBank(lastOne); toggleOFF(bcrLive, (int)midiChannel.C16, triggerCCsendEfx[0] + activeSendEfx); } if ((dat >= midiCCInstrument[0]) && (dat <= midiCCInstrument[3])) //------------------instrumente-------------- { int whichOne = dat - midiCCInstrument[0]; writeRecordFocus(whichOne); behringerLinks.callBank(whichOne); sendIsActiveLinks = 0; sendIsActiveRechts = 0; if (dat == midiCCInstrument[0]) { midiYake = 0; } if (dat == midiCCInstrument[1]) { midiYake = 1; } if (dat == midiCCInstrument[2]) { midiYoke = 0; guru = guruA; } if (dat == midiCCInstrument[3]) { midiYoke = 1; guru = guruB; } } if ((dat >= midiCCefx[0]) && (dat <= midiCCefx[3])) //------------------effekte------------------------ { lastOne = dat - midiCCefx[0]; behringerRechts.callBank(lastOne); sendIsActiveLinks = 0; sendIsActiveRechts = 0; if (triggerCCefx[lastOne] != -1) { toggleOFF(bcrLive, (int)midiChannel.C16, triggerCCefx[lastOne]); } } } break; default: break; } }