About the ED Shape Envelope module: How to use it.

This neat little module, with a a few other modules allows you to define your own “ADSR” envelope with as many segments as you like. To use the module it’s as simple as drawing the envelope shape by adding/removing nodes and changing their positions to define your output shape. The envelope output can be; Linear, Curve 1, or Curve 2. This is selected with a drop down list, and sent to the Shape editor as a GUI Integer, and the Shape Envelope as the default DSP List Entry.
This is where a little bit of Data conversion is needed…
All this adds up to a neat little module that can be a very versatile replacement for the standard ADSR2 module.

Curved or straight line envelopes?

The Shape Envelope module allows us to draw envelopes with straight lines (Linear), and two curves; Curve1, and Curve 2. Curve2 isn’t really very useful in this application, so I have just used Linear and Curve1.
We can select the different Interpolation Methods using the usual DSP drop down list, and on the GUI side an Integer. It would be good to be able to select the same ITP methods for both the GUI Shape Editor module, and the DSP Shape Envelope module. We can do this, but we need to do a bit of Data Type conversion.
We have two fixed values set; 10 (Linear), and 20 (Curve1). You could include 30 (Mode2), but it’s really not necessary in this application. These are selected via a Switch(Many->1) (Yes they are integer values going to voltage plugs but it will work perfectly well with integer values-although I did add a Volt to Int converter on the output-just in case).
This goes from the output of the switch via the Volts to Int converter, into a PatchMemory Int Out module this sends our DSP Integer value to the Shape Editor’s ITP plug. It also splits off and goes to a useful redirection module, the
RH Int Redir and from there into the Choice plug of a PatchMemory List 3. The Value Out plug on this module then feeds our choice into the Shape Envelopes ITP plug (No, there’s no mistake in the layout, in this case there is no need for the Item List plug to be connected).
This is the simplest way I have found (so far) of connecting the List Entry box to both the Shape Editor and the Shape Envelope’s two different ITP Choice plugs. Using this method we can see accurately what the shape of the Output of the Shape Envelope module will be.

BLOB converter.

This is purely to get the DSP module connected to the GUI module

Envelope duration display (time display).

Aside from the visual Level Bar, and the control knob there’s a time readout too- this is a standard enough layout. A Floating point input taken from the Animation Position plug of the PatchMemory Float3 that the Knob and ED Level Bar are connected to. It’s fed through an ED GUI Multiply float so that we convert the default 0-1 range of the Knob control to the required 0 to 10000 range to give the correct envelope time in mS. The float to text module converts the value to a text readout, with decimal places set to 0.

The complete Shape Envelope structure.

The completed structure (below) does not have a trigger input. The gate input is all it needs. The length of our envelope is determined by the time set using the Duration (mS) plug. So you can equally well connect the Gate plug to either Trigger or Gate-both work equally well here. Don’t forget the duration is in mS so for a duration of 1 Second the controls maximum will need to be 1000, and for 5 Seconds 5000 and so on. Keeping the default range of 0 to 10 on the Patch Memory Float will only give you a brief 10 mS maximum. (it’s a personal choice obviously) but as a start I would suggest a Minimum of 100, and a Maximum of 5000 giving you a range of 100 mS to 5 S.
The ED level bar also gives you some visual feedback, plus you can use the level bar to adjust the envelope length too.
Overall level controls the maximum output voltage of the Envelope
Shape Editor Settings:
As I have used the ultra compact version of the Shape Envelope module there are some settings in the Properties panel to be changed:
Base Line:- To give an easy to understand envelope shape this should be set to -5.
Editable:- Make sure this box is ticked.
Lock First/Last Node:- I very strongly suggest that you tick this box.
If the first and last nodes are not left at zero, you’ll get some nasty clicks and pops at the start and end of each envelope (due to almost instantaneous rise and fall times of the envelope.
Shape Envelope Settings:
Sustain Node:-
This can be left at -1 if you want a mode “conventional” envelope behaviour. Otherwise it can be changed, setting a node number (Integer) defines where the sustain portion of the envelope begins, in this mode the envelope is held at the sustain level (the level defined by the node selected as the sustain point) the shape envelope then resumes when the key is released on the keyboard.
Note: This means that the behaviour of the Envelope duration has been changed as the duration will have had the key down time added to it.
Gate:- Leave this property unticked.
Clip Shape:- Leave this property unticked. It’s unlikely the curve will exceed the maximum 10V if Curve2 is not used.

Setting a Sustain node.

With a few more modules we can allow for selection of a point where the envelope is put into sustain mode. All that’s needed is a Fixed Values (Int) module, with a Many->1 switch to select our sustain point.
The list I have used is; -1 = off (no nodes selected), 2 = node 2, 3 = node 3 and so on. If there are more nodes listed than are in the Shape Envelope, then selecting a number higher than the last node will have no effect.