ENVELOPES, FREQUENCY RAMPS, AND VALUE RAMPS
Envelopes, Frequency Ramps, and Value Ramps are the mechanism for precisely varying a value over the duration of a sound. As a developer, it bugs me to have 3 different names for the same underlying object, which they are, under the hood. The names, however, reflect the specific cases in which the underlying object is used – Envelopes control amplitude, the name having been used for this purpose since the invention of synthesisers; Frequency Ramps are used to vary frequency, in any and all of the places frequency values are used; and finally, Value Ramps vary any other fully modulatable floating-point parameter. I will also use the term “Envelope” to broadly refer to all 3 concepts.
Envelopes are built in stages. They start at a value (0 for amplitude envelopes, current/configured value for other ramps), and define a path over its parameter’s range, where the value will travel over a duration of time. How a value varies from the beginning of an envelope stage to that stage’s final value is defined by a curve. The diagram below shows a 4-stage amplitude envelope – the envelope starts at 0, and reaches a peak of 1.2 in 0.25 seconds – this is commonly called the “attack” stage. The amplitude follows an exponential path – it increases slowly, in small intervals at first, and increases more rapidly as the stage progresses – in this case, as a power of 2. The next stage brings the amplitude down to 1.0 in 0.5 seconds, also in an exponential curve. This mimics the path of the vast majority of acoustic sounds, such as a piano note, where the sound takes some amount of time to reach a peak, then immediately tapers to a lower value, from which it gradually fades. The second stage in this example is commonly called the “decay”. The third stage might look in the diagram as though it doesn’t do anything – it holds the amplitude at 1.0 – however, the duration of the stage lasts as long as the key is held; this is the “sustain” stage. Finally, when the key is released, the sound gradually fades to an amplitude of 0 over 1 second – in this case, it fades along an exponential curve, quickly at first. Because it happens after a key is released, it is commonly called the “release” stage.
On the Isle I-1, an envelope is not limited to 4 stages – you can define any number of stages, including 0. The names given to the stages above are historic, but in the Isle I-1, only the Sustain stage actually executes any differently than the others. Crucially, envelopes do not have to mimic acoustic sounds – for example, an envelope can increase in amplitude in the final stage rather than fade to 0.
For non-looped amplitude envelopes, a sound executes until its amplitude envelopes have finished. If a sound is stopped before its envelope has reached its sustain stage, the envelope immediately skips to the first stage following the sustain stage. An envelope does not have to have a sustain stage, in which case, it doesn’t matter when the sound’s “key is released” (of course, the notion of a sound being played by a key, which can be held indefinitely, is keyboard-centric and does not map to a great many instruments or MIDI controllers). For envelopes without a sustain stage, the sound executes the envelope to its completion, regardless of when or if the sound was ever told to stop. An envelope cannot have more than one sustain stage. Once all of the amplitude envelopes in a sound have completed, the running sound is terminated and removed from the active sound buffer, freeing a slot for a new sound.
Envelopes may be looped – loops can execute forward, backward, or bounce between the beginning and end of the envelope. Looped envelopes do not hold their sustain stage until a key is released; the sustain stage in a looped envelope is simply a marker to indicate which stages should execute immediately when a sound is told to stop, and the envelope executes until the final stage is reached in whichever direction it is running. System-level Oscillators can only contain looped envelopes, as these objects execute continuously, and outside of the control of any specific audible sound – they effectively never end.
An envelope with 0 stages does not execute – the value it controls is set to its configured value and stays there until the sound is stopped. If all of the amplitude envelopes in a sound have 0 stages, the sound starts at full amplitude, lasts as long as its key is held, and stops immediately when that key is released. Thus, it is not strictly necessary to define any envelopes.
The primary amplitude Envelope, shaping the overall amplitude of the sound (pre-effects), is on the Mixer; each Oscillator can also have its own, independent Envelope, with its own definition of stages, timings, sustain, etc. Oscillators and the Mixer each additionally have a Frequency Ramp; the Mixer’s Frequency Ramp controls a sound’s root frequency. Any parameter which represents a frequency – not just the frequency of an Oscillator, or the root frequency of a sound, but filter cutoff frequencies, frequency parameters in various effects, etc., can also define a frequency ramp. Any other floating-point value which is fully-modulatable can define a Value Ramp, which is similar to a Frequency Ramp, but is typically only expressed in a single unit.
In a new Patch, Oscillator, Mixer, etc., the envelopes and other ramps will initially be empty. To add an envelope stage, click the Plus icon below the box – you will now see a single stage panel appear inside the envelope definition. To remove a stage, click the trash can icon in the upper right corner of the stage panel. You can also insert a new stage into any position of the envelope – specify the position in the edit box next to the Insert icon, then click the icon.
The envelope stage panel has two sliders – duration, in seconds, and level, in the units of the parameter. For amplitude envelopes, level is amplitude and ranges from 0.0-2.0 – this is intended to give some headroom for, say, extra attack. Think of a clanging bell – you probably think of the sustained ring of the bell as its full amplitude, equating to an amplitude of 1.0; however, the initial attack as the bell is stuck is louder than the sustained ring. For Frequency Ramps, the level slider is expressed in the chosen unit of frequency – Ratio, Octaves, Named Interval, Semitones/Cents, or Hz. Each envelope stage in a Frequency Ramp can be expressed in different units – you may want the initial stage to be a ratio of the sound’s root frequency, but converge on a single fixed frequency in the next stage, regardless of note played.
Check the stage’s Sustain checkbox to mark the stage as the sustain stage. There can only be one sustain stage in the envelope, so checking this box will deselect Sustain on another stage if Sustain has already been set. Uncheck the box to deselect Sustain – it is not required to have a Sustain stage on an envelope.
An envelope stage starts at a value and “ramps” to a closing value. That value changes according to a curve, which can be selected from the Curve dropdown. Curve types are:
- No Operation – the stage does not change the value at all – what goes in is what comes out. The stage still lasts for the specified duration
- Constant – the value immediately changes to the end value, and stays there for the specified duration.
- Linear – up or down at a constant rate, at least in the numeric sense, though that might not be how our ears interpret the parameter
- Logarithmic – values increase quickly at the beginning of the curve, and more slowly as the curve approaches the end. You can specify the base of the logarithm.
- Exponential – values increase slowly at the beginning of the curve, and more quickly as the curve approaches the end. You can specify the power, with a power of 1 being linear.
- Squared and Cubed – convenience settings for Exponential curves with powers of 2 and 3, respectively
Envelopes can be looped – set the Looped checkbox. Looped envelopes, when executing the final defined stage, will treat the first defined stage as next when executing in the forward direction. If running backwards, the stage following the first defined stage will be the last defined stage, and for each stage, the defined ending point of the previous stage will be the target of the currently-executing stage. Envelopes can run backward, even if not looped – leave the Looped checkbox unchecked, and set the Direction dropdown to Backward or Backward-Then-Forward.
Reset Envelope To Initial Value on Loop – When the envelope is looping in the forward direction, the envelope will reset to its initialization value (0 for amplitude, parameter value for value ramps, and the Initial Frequency parameter for frequency ramps) when the last stage of the envelope transitions to repeating the first stage. If the ending value of the last stage is different from the initialization value, you will hear a sudden change in that parameter. When this flag is off, the envelope smoothly transitions from the ending level of the last stage to the ending level of the first stage, along the first stage’s curve. When the envelope is looping in the backwards direction, the last-executing (first sequentially-defined) stage’s ending level is set to the envelope’s initialization value, and at the start of the first-executing (last sequentially-defined) stage, the envelope’s level is set to the configured ending level of the new stage. Again, if these values are different, you will hear a sudden change; if the flag is off, the stages will smoothly transition along the stage’s curve.
There are two additional options for each envelope stage of a Frequency Ramp:
- Inverse Below Threshold – Each stage of a frequency ramp can optionally be applied as its inverse value when below a specified threshold note. The note numbers are MIDI notes in the current tuning. If a stage is configured to go up 1 octave above the current frequency, any notes played below the threshold value will go down 1 octave.
- Apply frequency ramp relative to Initial Frequency parameter – this flag locks the frequency ramp to be applied on top of the setting(s) of the Initial Frequency parameter – if the Initial Frequency is +1 octave, and the frequency ramp stage is also +1 octave, the frequency sounding at the end of the ramp stage will be 2 octaves above the note played.