+void iosynthApp::processAudio( uint64_t inSampleOffset, uint32_t ioSampleCount, audio::Buffer32f *ioBuffer ) {
+
+ for( int i = 0; i < ioSampleCount; i++ ) {
+
+ float sample = 0;
+
+ // render each voice
+ for (auto v : voices) {
+ sample += v->tick();
+ }
+
+ // delay line
+ sample += maxiDelay.dl(sample, 2048 * 8, .6); // * 0.9125;
+
+ // filter
+ // sample += maxiFilter.cutoff
+
+ // master reverb
+ sample = reverb.tick(sample);
+
+ // gate
+ // sample = fmin(sample, 1);
+
+ // master gain
+ sample = sample * mMasterGain;
+
+
+ ioBuffer->mData[i * ioBuffer->mNumberChannels] = mAudioSamples[0][i] = sample;
+ ioBuffer->mData[i * ioBuffer->mNumberChannels + 1] = mAudioSamples[1][i] = sample;
+ }
+}
+
+