Cabbage Logo
Back to Cabbage Site

Madsr not working?

Hi there, apologies for the noobiness of this post but I can’t figure out why my envelope controls are not working for a simple vst I’m building. I’ve extracted the core elements of the vst in attempt to solve that problem first. I’m essentially using a vco2 opcode with a combobox to select waveforms. However, the madsr does not seem to be controlling the envelope of the signal as expected. What am I doing wrong exactly?

Thanks.

Synth test.csd (2.4 KB)

Hey - I had a look at the parameters in the editor. I changed the Attack variables to the following and it seems a bit better (I think :thinking:)
Min = 0.00
Max = 1.0
Skew = 1.0
Increment = 0.0100

No hasn’t worked it seems. The attack is still clicking and the release is quite abrupt although it does hold signal length.

There’s two things I think that are going on here…

First, I suspect gain isn’t doing what you think it is here. A simple multiplier should do the trick, such as:
aOutmain = aOut*kGain1

Next up, the envelope. It appears to be working as expected… but the default values you are using might be tricking you a little. Press a note and immediately release it, you’ll hear the release phase. But because your default sustain level is SO low, if you hold a key too long it drops through the decay phase to a sustain level so low you can’t really hear it.

Hopefully that helps!

Blockquote First, I suspect gain isn’t doing what you think it is here. A simple multiplier should do the trick, such as:
aOutmain = aOut*kGain1

This suggestion solved it, thank you very much. So simple. Please pray of us beginners.
:upside_down_face:

1 Like