void set_option_double(PluginOption::ID id, double val) { switch (id) { case DRYTIME: rev_l.setdry(val); rev_r.setdry(val); break; case WETTIME: rev_l.setwet(val); rev_r.setwet(val); break; case DAMPING: rev_l.setdamp(val); rev_r.setdamp(val); break; case ROOMWIDTH: rev_l.setwidth(val); rev_r.setwidth(val); break; case ROOMSIZE: rev_l.setroomsize(val); rev_r.setroomsize(val); break; } }
// partially based on the Audio Programming Book by Lazarini static void process(const Methcla_World* world, Methcla_Synth* synth, size_t numFrames) { Synth* self = (Synth*)synth; float* in_L = self->ports[kReverb_input_0]; float* in_R = self->ports[kReverb_input_1]; float* out_L = self->ports[kReverb_output_0]; float* out_R = self->ports[kReverb_output_1]; const float room = *self->ports[kReverb_room]; const float damp = *self->ports[kReverb_damp]; const float wet = *self->ports[kReverb_wet]; const float dry = *self->ports[kReverb_dry]; model.setroomsize(room); model.setdamp(damp); model.setwet(wet); model.setdry(dry); model.processreplace(in_L, in_R, out_L, out_R, numFrames, 1); }