MyApp(){ lpf.type(LOW_PASS); // Set filter to low-pass response lpf.res(4); // Set resonance amount to emphasize filter env.attack(0.01); // Set short (10 ms) attack env.decay(0.4); // Set longer (400 ms) decay tmr.freq(120./60.*4.); // Set timer frequency to 120 BPM tmr.phaseMax(); // Ensures timer triggers on first sample modCutoff.period(30); // Set period of cutoff modulation modCutoff.phase(0.5); // Start half-way through cycle freq.lag(0.1); // Lag time of portamento effect step=0; }
int main() { tmr.period(3); // Reset the envelope every 3 seconds env.attack(0.01); // Attack time env.decay(0.05); // Decay time // Delays, lowpass, and allpass filters setup code goes here // lpf.type(LOW_PASS); lpf.freq(2600); lpf.res(sqrt(2.0)/2.0); AudioIO audioIO(frameCount, samplingRate, audioCallBack, NULL, channelsOut, channelsIn); Sync::master().spu(audioIO.framesPerSecond()); audioIO.start(); printf("Press 'enter' to quit...\n"); getchar(); return 0; }