// Instr [i-3], Gain [i-2], FreqX [i-1], Period [i],
// so to get array position first element is 0 so
// for Instr you need i (which moves from the start pos 3) to be -3 to be 1st or [i-3]
// for Gain you need i (which moves from the start pos 3) to be -2 to be 2nd or [i-2]
// for Freakwency you need i (which moves from the start pos 3) to be -1 to be 3rd or [i-1]
// for Period you need i (which increments from the start pos 3) to be -0 to be 4th item or [i]
// Instr [i-3], Gain [i-2], FreqX [i-1], Period [i],
//Instr, Gain, FreqX, Period
[
3, 50, 50, 16, 7, 80, 120, 1,
7, 70, 75, 15, 3, 50, 100, 16, 4, 70, 100, 16,
3, 50, 100, 16, 7, 50, 200, 16, 4, 50, 100, 16, 4, 70, 200, 16,
2, 50, 100, 16, 7, 70, 100, 16, 2, 50, 75, 16, 1, 50, 100, 16,
2, 70, 75, 8,
0, 0, 100, 8, 0, 0, 100, 8,
2, 80, 100, 8, 2, 50, 400, 16, 2, 70, 100, 16
] @=> int Perc1Array[]; //sequence data
[
3, 50, 50, 16, 7, 80, 120, 1,
7, 70, 75, 15, 3, 50, 100, 16, 4, 70, 100, 16,
3, 50, 100, 16, 7, 50, 200, 16, 4, 50, 100, 16, 4, 70, 200, 16,
2, 50, 100, 16, 7, 70, 100, 16, 2, 50, 75, 16, 1, 50, 100, 16,
2, 70, 75, 8,
0, 0, 100, 8, 0, 0, 100, 8,
2, 80, 100, 8, 2, 50, 400, 16, 2, 70, 100, 16
] @=> int Osc1Array[]; //sequence data
//800::ms => dur wait => dur the_wait;
1 => int i;
Gain g => dac;
.1 => g.gain;
SndBuf Perc1[8];
me.dir() + "data/snare-chili.wav" => Perc1[1].read;
me.dir() + "data/kick.wav" => Perc1[2].read;
me.dir() + "data/snare-hop.wav" => Perc1[3].read;
me.dir() + "data/snare.wav" => Perc1[4].read;
me.dir() + "data/hihat-open.wav" => Perc1[5].read;
me.dir() + "data/hihat.wav" => Perc1[6].read;
me.dir() + "data/Menupopup.wav" => Perc1[7].read;
SndBuf Osc1[9];
me.dir() + "data/k_cp80_90_46.wav" => Osc1[1].read;
me.dir() + "data/pno_wh_03.wav" => Osc1[2].read;
me.dir() + "data/s_em_10.wav" => Osc1[3].read;
me.dir() + "data/s_es_120_02.wav" => Osc1[4].read;
me.dir() + "data/s_es_120_16.wav" => Osc1[5].read;
me.dir() + "data/s_n3_96_84.wav" => Osc1[6].read;
me.dir() + "data/syn_ni_trp_60.wav" => Osc1[7].read;
me.dir() + "data/s_nfx_125_20.wav" => Osc1[8].read;
while (true){
for( 3 => int i; i < Osc1Array.cap(); i+4 => i)
{
Perc1Array[i-3] => int ThisPerc1Instr;
Perc1Array[i-2] => int ThisPerc1Gain;
Perc1Array[i-1] => int ThisPerc1FreqX;
Perc1Array[i] => int ThisPerc1Period;
Osc1Array[i-3] => int ThisOsc1Instr;
Osc1Array[i-2] => int ThisOsc1Gain;
Osc1Array[i-1] => int ThisOsc1FreqX;
Osc1Array[i] => int ThisOsc1Period;
// Instr [i-3], Gain [i-2], FreqX [i-1], Period [i],
//*** Set Frequency Multiplier on SndBuf for the instrument
ThisPerc1FreqX *0.01=> Perc1[ThisPerc1Instr].rate;
ThisOsc1FreqX *0.01=> Osc1[ThisOsc1Instr].rate;
//*** Set Period and play it
//*** Set Gain on Instrument
Perc1[ThisPerc1Instr] => g; //patch in Perc1
Osc1[ThisOsc1Instr] => g; //patch in Osc1
1 => Perc1[ThisPerc1Instr].pos;
1 => Osc1[ThisOsc1Instr].pos;
ThisPerc1Gain*.001 => Perc1[ThisPerc1Instr].gain; // turn on SndBuf
ThisOsc1Gain*.001 => Osc1[ThisOsc1Instr].gain; // turn on SndBuf
Perc1[ThisPerc1Instr].gain() => float currentPerc1GainGain;
g.gain() => float currentGainGain;
dac.gain() => float currentDacGain;
Perc1[0].gain() => float currentPerc10Gain;
Perc1[1].gain() => float currentPerc11Gain;
Perc1[2].gain() => float currentPerc12Gain;
Perc1[3].gain() => float currentPerc13Gain;
Perc1[4].gain() => float currentPerc14Gain;
Perc1[5].gain() => float currentPerc15Gain;
Perc1[6].gain() => float currentPerc16Gain;
Perc1[7].gain() => float currentPerc17Gain;
Perc1[ThisPerc1Instr].rate() => float currentPerc1FreqX;
<<< "FreqX Perc1Array[i-1]=", currentPerc1FreqX, ", Period Perc1Array[i]=", ThisPerc1Period >>>;
<<<"GainGain", currentGainGain,", InstrGain", currentPerc1GainGain >>>;
<<<"DacGain", currentDacGain >>>;
<<<"Perc10Gain", currentPerc10Gain >>>;
<<<"Perc11Gain", currentPerc11Gain >>>;
<<<"Perc12Gain", currentPerc12Gain >>>;
<<<"Perc13Gain", currentPerc13Gain >>>;
<<<"Perc14Gain", currentPerc14Gain >>>;
<<<"Perc15Gain", currentPerc15Gain >>>;
<<<"Perc16Gain", currentPerc16Gain >>>;
<<<"Perc17Gain", currentPerc17Gain,"\n" >>>;
ThisPerc1Period*15::ms => now;
ThisOsc1Period*15::ms => now;
// 2::second => now;
0.0 => Perc1[ThisPerc1Instr].gain; // turn off SndBuf
0.0 => Osc1[ThisOsc1Instr].gain; // turn off SndBuf
// 0.04 :: second => now; // hang out a bit
} //end for loop
} //end while true
// 0.04 :: second => now; // hang out a bit
// let time pass for reverb to go...
No comments:
Post a Comment