MusiKraken
MusiKraken
Experimental MIDI Controller Construction Kit

Envelope

The envelope allows you to generate a curve that goes through the following phases once you play a note: The value goes up to 1.0 (attack time), then decreases it (decay time) by going back to a fixed value (sustain level). Once you stop the note, the value goes back to 0.0 (release time).

The curve is controlled by notes sent into the MIDI-in port. And the generated output value can be sent to any other module.

The typical use case is to slowly increase the volume or modulation when the note is started, keep it at the sustain level while that note is still active or any other notes are started and slowly fade out again once no notes are active anymore.

There is also a MIDI-out port, which is used to keep notes alive while the release time is still active by delaying the Note-Off event. If you do not wish to keep the note alive, simply connect to the MIDI-in port only and ignore the MIDI-out port.

Ports:

MIDIIn:

Any MIDI note sent into this port will set this back to the attack state, which will then go to the decay and sustain state. Stopping the last note will set it to the release state.

valueOut:

This port will send the current value of the envelope.

MIDIOut:

Routing the MIDI events through this will keep the last note alive until the release is finished. Otherwise the notes might be stopped and the release will have no effect.

But you do not need to connect this if you want to control something different with the value output. You can also use the output to for example control the note height or modulation of another instrument. In this case, just connect the MIDIIn, and ignore the MIDIOut.

Settings:

Attack: How long is the attack state (in which the value goes up to 1 after a note has started playing)?

Decay: How long is the decay state (in which the value goes down to the sustain value)?

Sustain: The value on which it rests until the last note is released.

Release: How long is the release state (in which the value goes back to 0 after all notes have stopped)?