BACK



function glide(bool,ms,eighths){if(bool){controlChange(65,65,ms,eighths);}else{controlChange(65,0,ms,eighths);}}
function releaseSwitch(bool,ms,eighths){if(bool){controlChange(88,65,ms,eighths);}else{controlChange(88,0,ms,eighths);}}


function modWheel(ccNum,ms,eighths){controlChange(1,ccNum,ms,eighths);}
function modWheelFine(ccNum,ms,eighths){controlChange(33,ccNum,ms,eighths);}

function MOD1(ccNum,ms,eighths){controlChange(2,ccNum,ms,eighths);}
function MOD1Fine(ccNum,ms,eighths){controlChange(34,ccNum,ms,eighths);}

function MOD2(ccNum,ms,eighths){controlChange(4,ccNum,ms,eighths);}
function MOD2Fine(ccNum,ms,eighths){controlChange(36,ccNum,ms,eighths);}

function glideRate(ccNum,ms,eighths){controlChange(5,ccNum,ms,eighths);}
function glideRateFine(ccNum,ms,eighths){controlChange(37,ccNum,ms,eighths);}


//modulation controls

function lfoRate(ccNum,ms,eighths){controlChange(3,ccNum,ms,eighths);}
function lfoRateFine(ccNum,ms,eighths){controlChange(35,ccNum,ms,eighths);}

function lfoSync(ccNum,ms,eighths){
	if(ccNum == 1){controlChange(67,0,ms,eighths);}//Off
  if(ccNum == 2){controlChange(67,32,ms,eighths);}//MIDI
	if(ccNum == 3){controlChange(67,64,ms,eighths);}//KB
	if(ccNum == 4){controlChange(67,96,ms,eighths);}//Env. Gate
}


function modAmount(ccNum,ms,eighths){controlChange(6,ccNum,ms,eighths);}
function modAmountFine(ccNum,ms,eighths){controlChange(38,ccNum,ms,eighths);}
function modSource(ccNum,ms,eighths){
	if(ccNum == 1){controlChange(68,0,ms,eighths);}//Tri
	if(ccNum == 2){controlChange(68,16,ms,eighths);}//Square
	if(ccNum == 3){controlChange(68,32,ms,eighths);}//Osc3
	if(ccNum == 4){controlChange(68,48,ms,eighths);}//S&H	
	if(ccNum == 5){controlChange(68,64,ms,eighths);}//On/MOD2	
	if(ccNum == 6){controlChange(68,80,ms,eighths);}//Noise/PGM	
}
function modDest(ccNum,ms,eighths){
	if(ccNum == 1){controlChange(69,0,ms,eighths);}//Pitch
	if(ccNum == 2){controlChange(69,16,ms,eighths);}//OSC2
	if(ccNum == 3){controlChange(69,32,ms,eighths);}//OSC3
	if(ccNum == 4){controlChange(69,48,ms,eighths);}//Filter
	if(ccNum == 5){controlChange(69,64,ms,eighths);}//Wave
  if(ccNum == 6){controlChange(69,80,ms,eighths);}//LFO Rate/PGM
		
}
function modShaping(ccNum,ms,eighths){
	if(ccNum == 1){controlChange(70,0,ms,eighths);}//Filt. Envelope
	if(ccNum == 2){controlChange(70,32,ms,eighths);}//Velocity
	if(ccNum == 3){controlChange(70,64,ms,eighths);}//Aftertouch
	if(ccNum == 4){controlChange(70,96,ms,eighths);}//On/PGM	
}

function pedalAmount(ccNum,ms,eighths){controlChange(8,ccNum,ms,eighths);}
function pedalAmountFine(ccNum,ms,eighths){controlChange(40,ccNum,ms,eighths);}

function pedalSource(ccNum,ms,eighths){
	if(ccNum == 1){controlChange(71,0,ms,eighths);}//Tri
	if(ccNum == 2){controlChange(71,16,ms,eighths);}//Square
	if(ccNum == 3){controlChange(71,32,ms,eighths);}//OSC3
	if(ccNum == 4){controlChange(71,48,ms,eighths);}//S&H
	if(ccNum == 5){controlChange(71,64,ms,eighths);}//On/MOD2
  if(ccNum == 6){controlChange(71,80,ms,eighths);}//Noise/PGM	
}

function pedalDest(ccNum,ms,eighths){
	if(ccNum == 1){controlChange(72,0,ms,eighths);}//Pitch
	if(ccNum == 2){controlChange(72,16,ms,eighths);}//OSC2
	if(ccNum == 3){controlChange(72,32,ms,eighths);}//OSC3
	if(ccNum == 4){controlChange(72,48,ms,eighths);}//Filter
	if(ccNum == 5){controlChange(72,64,ms,eighths);}//Wave
  if(ccNum == 6){controlChange(72,80,ms,eighths);}//LFO Rate/PGM
		
}
function pedalShaping(ccNum,ms,eighths){
	if(ccNum == 1){controlChange(73,0,ms,eighths);}//Filt. Envelope
	if(ccNum == 2){controlChange(73,32,ms,eighths);}//Velocity
	if(ccNum == 3){controlChange(73,64,ms,eighths);}//Aftertouch
	if(ccNum == 4){controlChange(73,96,ms,eighths);}//On/PGM	
}


//Oscillator 1 Controls
function osc1Octave(ccNum,ms,eighths){
	if(ccNum == 1){controlChange(74,0,ms,eighths);}//32'
	if(ccNum == 2){controlChange(74,16,ms,eighths);}//16'
	if(ccNum == 3){controlChange(74,32,ms,eighths);}//8'
	if(ccNum == 4){controlChange(74,48,ms,eighths);}//4'
	if(ccNum == 5){controlChange(74,64,ms,eighths);}//2'	
  if(ccNum == 6){controlChange(74,80,ms,eighths);}//1'
}
function osc1Wave(ccNum,ms,eighths){controlChange(9,ccNum,ms,eighths);}
function osc1WaveFine(ccNum,ms,eighths){controlChange(41,ccNum,ms,eighths);}

function osc1Level(ccNum,ms,eighths){controlChange(15,ccNum,ms,eighths);}
function osc1LevelFine(ccNum,ms,eighths){controlChange(47,ccNum,ms,eighths);}
function osc1On(bool,ms,eighths){if(bool){controlChange(82,65,ms,eighths);}else{controlChange(82,0,ms,eighths);}}
function oneTwoSync(bool,ms,eighths){if(bool){controlChange(77,65,ms,eighths);}else{controlChange(77,0,ms,eighths);}}



//Oscillator 2 Controls
function osc2Octave(ccNum,ms,eighths){
	if(ccNum == 1){controlChange(75,0,ms,eighths);}//32'
	if(ccNum == 2){controlChange(75,16,ms,eighths);}//16'
	if(ccNum == 3){controlChange(75,32,ms,eighths);}//8'
	if(ccNum == 4){controlChange(75,48,ms,eighths);}//4'
	if(ccNum == 5){controlChange(75,64,ms,eighths);}//2'	
  if(ccNum == 6){controlChange(75,80,ms,eighths);}//1'
}
function osc2Wave(ccNum,ms,eighths){controlChange(11,ccNum,ms,eighths);}
function osc2WaveFine(ccNum,ms,eighths){controlChange(43,ccNum,ms,eighths);}

function osc2Freq(ccNum,ms,eighths){controlChange(10,ccNum,ms,eighths);}
function osc2FreqFine(ccNum,ms,eighths){controlChange(42,ccNum,ms,eighths);}

function osc2Level(ccNum,ms,eighths){controlChange(16,ccNum,ms,eighths);}
function osc2LevelFine(ccNum,ms,eighths){controlChange(48,ccNum,ms,eighths);}
function osc2On(bool,ms,eighths){if(bool){controlChange(83,65,ms,eighths);}else{controlChange(83,0,ms,eighths);}}

//Oscillator 3 Controls

function osc3Octave(ccNum,ms,eighths){
	if(ccNum == 1){controlChange(76,0,ms,eighths);}//32'
	if(ccNum == 2){controlChange(76,16,ms,eighths);}//16'
	if(ccNum == 3){controlChange(76,32,ms,eighths);}//8'
	if(ccNum == 4){controlChange(76,48,ms,eighths);}//4'
	if(ccNum == 5){controlChange(76,64,ms,eighths);}//2'	
  if(ccNum == 6){controlChange(76,80,ms,eighths);}//1'
}
function osc3Wave(ccNum,ms,eighths){controlChange(13,ccNum,ms,eighths);}
function osc3WaveFine(ccNum,ms,eighths){controlChange(45,ccNum,ms,eighths);}

function osc3Freq(ccNum,ms,eighths){controlChange(12,ccNum,ms,eighths);}
function osc3FreqFine(ccNum,ms,eighths){controlChange(44,ccNum,ms,eighths);}

function threeOneFM(bool,ms,eighths){if(bool){controlChange(78,65,ms,eighths);}else{controlChange(78,0,ms,eighths);}}
function threeKB(bool,ms,eighths){if(bool){controlChange(79,65,ms,eighths);}else{controlChange(79,0,ms,eighths);}}
function threeHI(bool,ms,eighths){if(bool){controlChange(80,65,ms,eighths);}else{controlChange(80,0,ms,eighths);}}

function osc3Level(ccNum,ms,eighths){controlChange(17,ccNum,ms,eighths);}
function osc3LevelFine(ccNum,ms,eighths){controlChange(49,ccNum,ms,eighths);}
function osc3On(bool,ms,eighths){if(bool){controlChange(84,65,ms,eighths);}else{controlChange(84,0,ms,eighths);}}

function externalLevel(ccNum,ms,eighths){controlChange(14,ccNum,ms,eighths);}
function externalLevelFine(ccNum,ms,eighths){controlChange(46,ccNum,ms,eighths);}
function externalOn(bool,ms,eighths){if(bool){controlChange(81,65,ms,eighths);}else{controlChange(81,0,ms,eighths);}}

function noiseLevel(ccNum,ms,eighths){controlChange(18,ccNum,ms,eighths);}
function noiseLevelFine(ccNum,ms,eighths){controlChange(50,ccNum,ms,eighths);}
function noiseOn(bool,ms,eighths){if(bool){controlChange(85,65,ms,eighths);}else{controlChange(85,0,ms,eighths);}}




function pitchBendUp(ccNum,ms,eighths){controlChange(107,ccNum,ms,eighths);}
function pitchBendDown(ccNum,ms,eighths){controlChange(108,ccNum,ms,eighths);}



//filter Controls
function filterCutoff(ccNum,ms,eighths){controlChange(19,ccNum,ms,eighths);}
function filterCutoffFine(ccNum,ms,eighths){controlChange(51,ccNum,ms,eighths);}

function filterSpacing(ccNum,ms,eighths){controlChange(20,ccNum,ms,eighths);}
function filterSpacingFine(ccNum,ms,eighths){controlChange(52,ccNum,ms,eighths);}


function filterResonance(ccNum,ms,eighths){controlChange(21,ccNum,ms,eighths);}
function filterResonanceFine(ccNum,ms,eighths){controlChange(53,ccNum,ms,eighths);}


function filterKBAmount(ccNum,ms,eighths){controlChange(22,ccNum,ms,eighths);}
function filterKBAmountFine(ccNum,ms,eighths){controlChange(54,ccNum,ms,eighths);}
function filterHiLow(bool,ms,eighths){if(bool){controlChange(86,65,ms,eighths);}else{controlChange(86,0,ms,eighths);}}


function filterEGAmount(ccNum,ms,eighths){controlChange(27,ccNum,ms,eighths);}
function filterEGAmountFine(ccNum,ms,eighths){controlChange(59,ccNum,ms,eighths);}

//Envelope Generator
function filterAttack(ccNum,ms,eighths){controlChange(23,ccNum,ms,eighths);}
function filterAttackFine(ccNum,ms,eighths){controlChange(55,ccNum,ms,eighths);}
function filterDecay(ccNum,ms,eighths){controlChange(24,ccNum,ms,eighths);}
function filterDecayFine(ccNum,ms,eighths){controlChange(56,ccNum,ms,eighths);}
function filterSustain(ccNum,ms,eighths){controlChange(25,ccNum,ms,eighths);}
function filterSustainFine(ccNum,ms,eighths){controlChange(57,ccNum,ms,eighths);}
function filterRelease(ccNum,ms,eighths){controlChange(26,ccNum,ms,eighths);}
function filterReleaseFine(ccNum,ms,eighths){controlChange(58,ccNum,ms,eighths);}

function volumeAttack(ccNum,ms,eighths){controlChange(28,ccNum,ms,eighths);}
function volumeAttackFine(ccNum,ms,eighths){controlChange(60,ccNum,ms,eighths);}
function volumeDecay(ccNum,ms,eighths){controlChange(29,ccNum,ms,eighths);}
function volumeDecayFine(ccNum,ms,eighths){controlChange(61,ccNum,ms,eighths);}
function volumeSustain(ccNum,ms,eighths){controlChange(30,ccNum,ms,eighths);}
function volumeSustainFine(ccNum,ms,eighths){controlChange(62,ccNum,ms,eighths);}
function volumeRelease(ccNum,ms,eighths){controlChange(31,ccNum,ms,eighths);}
function volumeReleaseFine(ccNum,ms,eighths){controlChange(63,ccNum,ms,eighths);}

function envGate(bool,ms,eighths){if(bool){controlChange(87,65,ms,eighths);}else{controlChange(87,0,ms,eighths);}}



function mainVolume(ccNum,ms,eighths){controlChange(7,ccNum,ms,eighths);}