mschack / VCV-Rack-Plugins

Plugins for VCV Rack
MIT License
61 stars 19 forks source link

Allow SynthDrum to be run without LVL plugged in #58

Open holgerschurig opened 6 years ago

holgerschurig commented 6 years ago

Code like this --- in SynthDrum::step() --- will allow this:

    // process sounds
    float lvl = inputs[IN_LEVEL].active ? clamp(inputs[IN_LEVEL].value / CV_MAX, 0.0, 1.0) : 1.0;
    outputs[OUTPUT_AUDIO].value = GetAudio() * AUDIO_MAX * lvl;
mschack commented 6 years ago

good idea