SUBTOTAL
DISCOUNT
VAT
TOTAL
In this tutorial, I'll continue building an envelope in Reaktor Core. In the previous...

# Building an Envelope in Reaktor Core, Part II

In this tutorial, I’ll continue building an envelope in Reaktor Core. In the previous tutorial, we laid down the groundwork for building an envelope – a router macro that determines which stage of the envelope is currently active.For those who are unfamiliar with the Core environment, there is a three-part series on that serve as an introduction here.

##### IMPLEMENTING THE ENVELOPE STAGES

The Attack, Decay, and Release stages of an envelope all have several things in common structurally. Each one has a starting point, an ending point, and a time that determines how long it takes to move from the start to the finish. In addition, each of these stages has a single output that is somewhere between the starting point and the ending point, and receives a clock input from the larger structure that determines when the stage is active.

[aside title = “Envelopes”]The Attack, Decay, and Release sections are identical[/aside]

The Sustain stage could also be implemented in this way, in theory, with a starting point equal to the ending point, and an arbitrary length of time to travel between the two. However, such an implementation would be wasteful – we’d be calculating unnecessary math whenever the Sustain stage was active. Instead, during the Sustain section, the value of the Sustain knob can simply be stored and sent to the output. In fact, you’ll see later that we can actually ignore the Sustain section altogether!

Okay, let’s get down to brass tacks. We can begin by creating a simple black box version of the Attack, Decay, and Release stages that I outlined above:

Since we’ve already calculated the length of each stage in terms of the sampling rate, let’s assume that the ‘Time’ input is also measured in samples. The ‘Clk’ input, aside from letting us know that the stage is active, also keeps track of the number of samples that have occured since the last MIDI gate value has arrived (both gate on and gate off messages will reset the counter, which is useful for the Release stage).

Therefore, we can fill in our black box macro from above to look something like this:

Keep in mind that this macro should only send a value to the output when a value arrives at the ‘Clk’ input. Therefore, the final calculated value is stored in a latch macro (found in the Expert Macro menu, in the memory section) which is triggered by the incoming clock.

Mostly, our work now becomes simply plugging in the proper values to the inputs of this macro. We outlined many of the specifics in the previous tutorial. For instance, rather than restarting from a value of zero every time, the Attack section can actually use the last previous output from the envelope as it’s starting point. Generally this will be zero, however, in case the envelope is triggered before the previous note is finished, this method will prevent a ‘click’ sound.

Here’s a view of our final Core cell:

Utilizing the basic structure that was designed for last weeks tutorial, we have simply plugged our new envelope stage macro in place and merged together their outputs (only one will be outputting values at any given point in time). A new gate input triggers many things, controlling the start values of all three stages (depending on whether the gate is on or off) and the end time of the Attack stage.

Notice here how the Sustain stage is simply ignored entirely. The reason for this is simple – we don’t need it! Once the Decay section is complete, the envelope is already at the value determined by the Sustain knob. Since the output is already the value we want it to be, we simply do nothing until we receive a Gate off event and begin the Release stage.

##### CONCLUSION

Alright, so now we have a working envelope. It is nothing special, of course, and there are many improvements that could be made. For one, this envelope has linear growth and decay, whereas higher quality envelopes generally use exponential curves for the stages. Other features could include: a peak knob that determines the maximum level of the envelope Attack stage; a maximum velocity option to always treat incoming gates at their maximum possible value; adding a looper like the envelopes in Ableton’s Operator synth; a GUI for controlling and visualizing the resulting envelope; etc.

If there is interest, we can cover some of these options in a future tutorial.

## RELATED COURSES

### Reaktor Core Masterclass

×
PLAYLIST
Clear all
WISHLISTS
Create an account to use wishlists
×
SAVE TUTORIALS
Create an account to save tutorials
×
×
• Create product wishlist
• Regular discounts and exclusives
CREATE ACCOUNT
• Get days all ADSR courses free
• Create product wishlist
• Regular discounts and exclusives
Remember me

2. Click "Send info"
IMPORTANT: Is this product compatible with your system? Please check the product system requirements tab before purchasing. To proceed with this purchase you must check the box to confirm you have checked the requirements.

I have read the system requirements and agree to the return policy. I understand that refunds will not be given due to limitation of my software or operating system.

, you have loyalty credit available. To redeem click the button to claim !
Claim

For every \$5 you spend on ADSR receive 1 free credit for Sample Manager.

Even better, we have back-dated this so any purchases you made since 2017 have also been credited to your account!

Click the button below to claim your free credit.

Get my free credits
Loyalty credits
1Every purchase you make on ADSR* now earns you 1 loyalty credit for every \$5 spent