diff options
Diffstat (limited to 'main.cpp')
| -rwxr-xr-x | main.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -1,6 +1,6 @@ #include "maximilian.h" -//This shows how to use maximilian to build a polyphonic synth. Works but something weirds going on with the ticks. Hmm.. +//This shows how to use maximilian to build a polyphonic synth. //These are the synthesiser bits maxiOsc VCO1[6],VCO2[6],LFO1[6],LFO2[6]; @@ -9,7 +9,7 @@ maxiEnvelope ADSR[6]; //These are the control values for the envelope -double adsrEnv[8]={1,5,0.125,50,0.125,125,0,100}; +double adsrEnv[8]={1,5,0.125,100,0.125,200,0,1000}; //This is a bunch of control signals so that we can hear something @@ -39,19 +39,13 @@ void play(double *output) { } ADSR[voice].trigger(0, adsrEnv[0]);//trigger the envelope from the start - pitch[voice]=voice; + pitch[voice]=voice+1; voice++; - - cout << "tick\n";//ticking twice for some reason - cout << voice;//ticking twice for some reason - cout << "\n";//ticking twice for some reason - - - lastCount=currentCount;//set the last count to the current count + lastCount=0; } - + //and this is where we build the synth for (int i=0; i<6; i++) { |
