Stuck with a SynthEdit project?

Month: April 2024

ED Shape modules: A Shape Editable Morphing Oscillator.

The ED Shape modules allow us to create an oscillator which can morph between two or more wave-shapes. The shapes are defined using the ED shape editor, these shapes are converted from GUI to DSP inside the Shape Editor 5S prefab ready to feed into the ED Shape Morpher 2. The floating point value (0 to 1) on the Morph (0-1) plug determines the contents of the BLOB string which is fed into the ED Shape Osc 2 module and hence the output waveform.
The ED Shape amplifier is included as some waveshapes may clip when Interpolation methods such as Curve 2 are in use.
Note: Whenever a Volts to Float converter module is used for controlling any of the Shape modules, the update rate should be set to the maximum of 60Hz to ensure the response to the voltage is as smooth as possible.

Default Control Values.
Shape Reset:- I have set a reset value for all the Shape Editors of (-5,0)(5,0) to give a straight line (no output) when the reset button is clicked to give a way of quickly clearing all shape values.
Morph Slider:– Minimum 0V, Maximum 0.99V. The Morph CV input should be kept to within 0 to 1V, otherwise the changes will become very abrupt.
Shape Amp Slider:- Minimum -1V to +1V. -1V is fully inverted, and +1 is full amplitude.
Shape amplitude and ITP Curves:- Especially when using ITP Curve 2 the resulting output shape may well clip, hence the addition of the Shape Amp control (The Shape Oscillator is internally clipped at +/- 5 Volts signal level).

Shape Editor 5S.
We need to convert the GUI BLOB output of the Shape Editor to DSP BLOB data for the Shape Morpher to do its work, for which I used the ED PM BLOB NAC Volatile to do the conversion. To keep the main project structure a bit simpler this is containerized, and the structure is shown below.

Output Shape
This is another Shape Editor used as a display of the resulting shape from the oscillator. The shape changes in real time along with the Oscillators output signal. Here we have the stock SE Patch Memory BLOB Out, and a Patch Memory BLOB Int Out, the additional PM is so that we can change the Interpolation Choice on the display in line with the Oscillators Interpolation mode. The Editable box on the ED Shape Editor 5 properties should be unticked.

Bool Switch 4 Out.
To reset all the Shape Editors simultaneously I had to create this Prefab so I could have the GUI Bool outputs on the left, and also when using the RH Bool-Redir module it only lets you connect to one module at a time, hence the four separate modules and LHS Output plugs.

ED Regular Shape Generator

Using this Module we can make the Shape string Y level Nodes editable, whilst leaving the X positions locked. This allows for a much simpler, if slightly less flexible method of creating our shapes.
The module generates a regular shape by assigning auto-duplicating input Floating Point plugs to the Y positions of nodes equally spaced in the X plane.
Since a shape must have at least two nodes, the first two float pins will always be present on the module box, corresponding to the first and the last node.
The Y positions of the nodes must be specified in the correct shape units: from -5 to +5 volts and are they internally clipped by the module.
Every time any of the input values are modified, a new shape string will be transmitted to the output BLOB pin.
Important Note: the resulting shape must not be stored anywhere; it is the result of calculating and assembling the BLOB in real time with the same number of nodes as there are active Y Input plugs on the module.
Every input value is supposed to have its own Patch Memory float in case of manual or automated GUI controls, or to be connected to a DSP control voltage source such as LFO, Envelope, MIDI control, or manual slider control.

The Regular Shape Generator module:
The Module itself has only a few plugs.
On the input side we have Y #0, Y #1 and Y #n(Spare) the spare indicating that after Y #1 the Floating Point inputs are self replicating.
Note: The Shape Out plug creates in real time, and sends a new BLOB shape description when, and only when at least one of the Y #n Plug values is changed. This is not a continuous control signal.

Basic Shape Editor usage.

A basic setup is shown below using some Sliders, Volts to Float2 converters, the Shape Generator, a Patch Memory to convert from DSP to GUI, and the resulting shape displayed in the Shape Editor.
Note: Although the Sliders could in theory be connected directly to the Floating Point input plugs this is not a reliable method, as you can get missed data and “jerky” responses to control movements.

Fixing the “Start” and “End ” node values.

This structure is all well and good, but we will quite likely want to make the first and last nodes fixed at 0 Volts. All we need to do for this is make a slight change to our controls side of the shape generator. By adding a Fixed Values (float), set to 0, and connected to the first plug Y #0 and to the plug immediately after the last slider control we have now added fixed values to the start and end of the shape.

A Shape Oscillator controlled by a Regular Shape Generator.

This is an expansion of the structure shown above, with the addition of more control sliders, the Shape oscillator, and a sub-control to select the interpolation mode. The sub control is needed as we have two methods of selecting the ITP mode: by an Integer on the Shape editor, and a drop down list on the oscillator.
This is an expansion of the structure shown above, with the addition of more control sliders, the Shape oscillator, and a sub-control to select the interpolation mode. The sub control is needed as we have two methods of selecting the ITP mode: by an Integer on the Shape editor, and a drop down list on the oscillator.
As the Shape editor is only required to display the shape the Editable option in the module properties can be disabled, and the Y values of the 0 and 8 nodes are locked by using Fixed values of 0.
This is an expansion of the structure shown above, with the addition of more control sliders, the Shape oscillator, and a sub-control to select the interpolation mode. The sub control is needed as we have two methods of selecting the ITP mode: by an Integer on the Shape editor, and a drop down list on the oscillator.
This is an expansion of the structure shown above, with the addition of more control sliders, the Shape oscillator, and a sub-control to select the interpolation mode. The sub control is needed as we have two methods of selecting the ITP mode: by an Integer on the Shape editor, and a drop down list on the oscillator.
As the Shape editor is only required to display the shape the Editable option in the module properties can be disabled, and the Y values of the 0 and 8 nodes are locked by using Fixed values of 0.
A new shape BLOB will be sent to the oscillator whenever a slider position is updated.

The ED Shape Editor.

The Shape Editor for the Shape oscillator and wave-shaper modules.

The Shape Editor is a fully configurable graphical editor for standard ED Shapes for the Shape Oscillator using the new efficient binary BLOB transmission format.
The “legacy” shape format (string-based and using Volts values) is still supported for entering Shapes as strings by hand or through the appropriate conversion modules provided for compatibility but using this module for shape transmission is now discouraged.
A compact and an ultra-compact version are also included, which occupy less space in the structure view, by having less and less pins exposed (most times you probably won’t need to have all possible plugs exposed for connection).
More shape editors can be stacked making the background transparent. In this case, to allow editing of the background editor (click-thru), the bool option LockAddRemNodes must be enabled or editing must be disabled totally for the foremost editor, otherwise any mouse click in empty areas will be intercepted.

Shape Editor features and usage:

Shapes support from two to 100 nodes. A shape can never have less than two nodes. No such thing exists as an “empty” shape: a “void” or default shape is a shape with just the first and the last node set to zero.
Node values are internally defined in normalized float units: from 0 up to and including one horizontally, and from -1 to and including 1 vertically.
However, for compatibility reasons, node positions are still displayed and accepted in Volts by all ED Shape modules: from -5 to 5 Volts horizontally, from -5 to 5 Volts vertically.
Note about Nodes:
The first and the last node are fixed at position -5 and +5 and cannot be moved horizontally. They must always be present. The nodes between these must be present sequentially. Vertical positions must be in -5 to +5 range. No other characters or spaces may be present. Invalid strings will be rejected.
Legacy String Format:
The “legacy” string format consists of nodes defined between parentheses in Voltage units, for example: (-5,0)(1,-1)(5,1).
This format was inherited from the stock SynthEdit WaveShaper 3.
Connecting GUI Shape Modules to DSP:
Shape information is now stored and transmitted using a new efficient binary BLOB format. This means that every Shape Editor must be linked to the destination module(s) through a Patch Memory Blob module, and where required a Shape BLOB to text string converter.
Adding and removing Shape nodes:
Shape nodes can be added or removed by a double-click. A double click anywhere in the edit field will create a new node at the corresponding mouse position. Double-clicking on a selected node will delete it. The first and last node cannot be deleted: a double click on them will snap them to the specified
baseline for convenience.
Editing/Moving shape nodes:
Shape nodes can be activated with a mouse click and dragged around within their allowed limits: between the neighbouring nodes, and vertically within -5 and 5 or within a smaller range, in cases where custom MinY/MaxY values have been specified.

About Interpolation.

Interpolation Type:
Interpolation Type is still transmitted separately from Shape data. Since different Shape-utilizing modules may support only certain Interpolation Types or even just one, their DSP List pin is always properly set to relay this information to the main Patch Memory List, whose Menu Selection pin must be connected to the corresponding Shape Editor pin, and which will be automatically
configured to only list the supported Interpolation mode(s).
Important: Users must never make any assumptions about the list position of Interpolation Types and their integer values, since they might change in the future and/or more Types could be added upon need.
Interpolation None (0): This mode does not correspond to a physical interpolation and is module-specific. It really means that a module actually only needs node positions (example: to render spectral peaks or sinc pulses …) and not an actual curve. The Shape Editor will simply draw vertical lines starting from the specified baseline.
Interpolation Linear (10): plain linear interpolation (default)
Interpolation Curve 1 (20): equivalent to the former “Spline” method, uses modified cubic splines. Curve interpolation which will never fluctuate but can result non smooth in transitions from intervals of very different width.
This mode still produces a very smooth result (comparable to Curve 2) with uniformly spaced nodes.
Interpolation Curve 2 (30): Natural cubic splines. Always produces an smooth curve interpolation (second derivative is always continuous) at the expense of even huge fluctuations, close to intervals much smaller than their neighbouring ones

ED Shape Editor Plugs:

Shape I/O (BLOB): Outputs the shape description as a BLOB string. Every time the current shape is modified an updated Shape is transmitted from the Shape I/O pin. Every time a new shape is received, the editor will be updated immediately.
Interpolation Choice In (Integer): Allows the user to choose between the three types of Interpolation; None (0), Linear- the default method (10), Curve1 spline (20) and Curve2 cubic spline (30)
Active Node (Integer): The index of the active node, as available to the Active Node pin, this value is not internally stored in any parameter. To maintain it throughout sessions, please connect it to a Patch Memory Integer module.
Whenever the Interpolation Type must be fixed and not user-selectable,
simply do not connect a List Entry or Patch Memory List module, and simply select
the desired Interpolation Type from the Properties or by supplying Integer values.
Editable (Boolean): The editor can be set to read-only mode by setting this plug to “False”. This disables any editing of nodes, allowing use of the module as a graphic display of the shape string.
Lock X (Boolean): When set to “True” the horizontal (x plane) position of nodes is locked, allowing the user to edit just their vertical positions.
Lock Add/Rem Nodes: Addition and removal of nodes can be disabled, to force working with a fixed number of shape editing nodes.
Lock First/Last Nodes (Boolean): When set to “True” editing for the first and last node is disabled.
Y max/Y Min (Floating Point): The editing range for vertical positions can be constrained to within a minimum and a maximum value (Default Min/Max is +/- 5V outside this range the shape is clipped internally by the module)
Base Line (Floating Point): The vertical position of a convenient reference baseline can be specified as needed between -5 and +5 (0 by default)
Reset Value (Text String):- Specify a shape in Legacy string format to use as default value for the Reset pin. If no shape is specified (empty pin), a straight two-points shape (line) at the specified baseline will be used as default
Mouse Down (Boolean):- Outputs “True” active when the user clicks on the editor
Hint (Text):- Set here the “bubble” help text as per usual
Node Size (Integer): Sets the size of the Node in pixels. The size is in pixels from 4 to 20
Node Thickness (Integer): Sets the Nodes border thickness in pixels when the Node is not filled. The size in pixels is from 0 to 4.
Circular Nodes (Boolean): Nodes can be displayed as either squares or circles, setting this plug to “True” sets the shape as circular.
Fill Nodes (Boolean): Switches the Nodes between filled or empty, When set to “True” the nodes are filled.
Shape Thickness(Integer): Sets the thickness of the line defining the shape in pixels allowed values are 1 to 4 pixels.
Border% (Floating Point): The display box’s border size can be specified as a percentage of the total box size. This is the percentage of the border area, expressed as a percentage of every dimension, from 0 to 25 (e.g. setting 25, left and right borders will result each one 1/4 of the box width, and top and bottom borders will result each one 1/4 of the box height)
Border Clip (Boolean):- Setting this plug to “True” prevents parts of the interpolated shape which may result in shapes larger than +5 or smaller than -5 (mostly because of curve interpolation) from being drawn in the border area, and replaces them with a clipping line.
Note: Most shape-utilizing modules do not clip values internally, however when they do, this is clearly specified. Therefore, always set the Border Clip in a consistent way, since a clipping line visible in the editor can be misleading when it’s not expected.
Grid Horiz Divs (Integer): Sets the number of Horizontal (x-plane) display divider bars the values allowed are 0 to 40. (Note: these are the bars running from top to bottom of the display box)
Grid Vert Divs (Integer): Sets the number of Vertical (y-plane) display divider bars the values allowed are 0 to 40. (Note: these are the bars running from side to side of the display box).
BG Top ARGB/BG Bottom ARGB (Text String): Specifies the Alpha, Red, Green, Blue colour for the top of the display box, as standard 32 bits hexadecimal ARGB strings (e.g. 80FF00FF is a half-transparent magenta). When two different colours/transparencies are defined the box’s colour/transparency will change from one to the other gradually.
Grid ARGB (Text String): Specifies the Alpha, Red, Green, Blue colour the display grid, as standard 32 bits hexadecimal ARGB strings (e.g. 80FF00FF is a half-transparent magenta).
Base Line ARGB (Text String): Specifies the Alpha, Red, Green, Blue colour for the Base Line, as standard 32 bits hexadecimal ARGB strings (e.g. 80FF00FF is a half-transparent magenta).
Vert Line ARGB (Text String): Specifies the Alpha, Red, Green, Blue colour for the Vertical Line, as standard 32 bits hexadecimal ARGB strings (e.g. 80FF00FF is a half-transparent magenta).
Diag Line ARGB (Text String): Specifies the Alpha, Red, Green, Blue colour for the Diagonal Line, as standard 32 bits hexadecimal ARGB strings (e.g 80FF00FF is a half-transparent magenta).

The Grid:
Base Line- Shown in Red
Vert Line- Shown in Green
Grid- Shown in White
Diag Line- Shown in Yellow
Shape Fill1- Shown as an empty value.
Shape Fill2- Shown as an empty value.

Elements of the Shape Editors graphic box

Shape ARGB (Text String): Specifies the Alpha, Red, Green, Blue colour for the Shape Line, as standard 32 bits hexadecimal ARGB strings (e.g. 80FF00FF is a half-transparent magenta).

Fill Grad1 ARGB: Specifies the Alpha, Red, Green, Blue colour for the Shape Fill1, as standard 32 bits hexadecimal ARGB strings (e.g. 80FF00FF is a half-transparent magenta).
Fill Grad2 ARGB: Specifies the Alpha, Red, Green, Blue colour for the Shape Fill2, as standard 32 bits hexadecimal ARGB strings (e.g. 80FF00FF is a half-transparent magenta).
The Fill Grads.
The left hand image is with Fill Grad 1 and 2 set to light blue, and the right hand image with just Fill Grad 1 set to light blue.

Fill Graduations for the shape display

Nodes ARGB (Text String): Specifies the Alpha, Red, Green, Blue colour for the Shape Nodes, as standard 32 bits hexadecimal ARGB strings (e.g. 80FF00FF is a Active Node ARGB (Text String): Specifies the Alpha, Red, Green, Blue colour for the Shape Node currently selected for editing, as standard 32 bits hexadecimal ARGB strings (e.g. 80FF00FF is a half-transparent magenta).

Notes about shapes and shape fill gradients:
**Shape fill gradients will be drawn originating from the specified baseline**
**Double clicking on a node which cannot be deleted (like the first and the last node, or all nodes when addition/removal is disabled) will cause the node to be snapped to the specified baseline**
**When no default shape is specified in the Reset Value pin, a two-nodes straight line shape at the baseline will be used**
**For example, when the shape represents positive values, it makes sense to place the baseline at the bottom (-5); when the shape represents a spectral filtering curve, it may be more logical to set the baseline at top (+5); when it represents signed values, the baseline is more logically placed in center (zero)**

About ARGB Colour settings
These are 32 bit colour settings (including alpha channel transparency) can be specified for every graphical element of the editor as a 32 bits Hex string (e.g. 80FFFF00 is a 50% transparent yellow), allowing for display customization and transparencies. When the alpha channel (first byte) is set to zero, the corresponding element will not be drawn at all. In case of the Background, setting an alpha channel value less than FF will progressively reveal other GUI controls placed on the background in the Panel view by increasing the transparency.

Right Hand Side plugs.

Edit X/Edit Y (Floating point): A pair of Float value editing plugs (Right hand side) which are linked to the currently active node, so that its x,y value can be displayed and entered by hand if needed, by connecting a couple of Text Entry and other suitable modules. (Note: There were originally left hand edit plugs, but these have now been removed, to prevent undue connection of Patch Memories to the module which results in conflicting double storage of values.)
Reset (Boolean): Setting the plug to “True” triggers the reset function, which sets the shape to the one specified on the Reset Value Plug.
Flip X (Boolean): Flips the Shape horizontally.
Flip Y (Boolean): Flips the Shape vertically.

**CTRL key support for precise movements Note: with SE 1.4, CTRL does not work in Structure View.**

The Shape Editor 5 Plug layout

The ED Shape Oscillator.

About the Shape Oscillator.

The oscillator is based on a Look-up-table (LUT) oscillator whose waveform can be drawn, edited and supplied in form of a standard ED Shape. ED shapes are defined, stored and transmitted in the BLOB format.
The Shape Oscillator supports a Sync pulse in Boolean form to reset the Oscillator phase as well as allowing Phase Modulation of adjustable amount and feedback. The total Phase Modulation amount is the sum of the Phase plug voltage scaled by the Phase Amount value and then summed to the oscillator signed output scaled by the overall Phase Feedback value.
The internal waveform LUT is computed by interpolating through the x,y Shape nodes according to the selected Interpolation Type.
Shapes can be modulated by the various means currently provided by the ED Shape Modules pack (e.g.. by usage of a Shape Morhper or Shape Node Modulator etc.) if implemented correctly without any clicks or artifacts.
When using custom drawn waveforms, these are frequently vertically unbalanced, and for this reason an optional DC filter is provided, which will automatically remove any DC bias from the results of all LUTs.
Optional oversampling (up to 32x) for aliasing reduction is also provided.

The ED Shape Oscillator plug layou
t

Important notes about using the Shape Osc.

NOTE: Junction Points.
When drawing waveforms, especially when using the curve interpolations, the user is responsible for setting the junction points properly, in order to preserve waveform continuity (unless you want discontinuity of course). It is also a good idea to set the first and last nodes to zero in the Shape Editor and disable their editing.

NOTE: Level Fluctuations:
Curve interpolation types may cause audio levels to exceed the clipping level (+/- 10V). Internally, the LUTs are therefore always clipped at -10 and +10 V.

NOTE: About Anti-Aliasing.
Any waveform containing sharp edges (sawtooth or pulse for example) will produce aliasing at higher pitches, which can be detected in the Analyzer and heard as a nasty inharmonic (harsh and discordant) component.
The internal oversampler can be set up to a factor of 32x.
So as not to sacrifice CPU efficiency, a simple averaging filter is used for the decimation stage. It can’t offer the accuracy of SynthEdit oversampling or of an actual long sinc filter, but it is effective enough at reducing any aliasing products to a level below the audible threshold and at a fraction of the CPU cost (at least 10x less CPU load).
Keep in mind that anti-aliasing measures may well not be required, unless your shapes (or the result of shape modulation) contain sharp edges.
In the event that you would prefer to use SynthEdit oversampling, please disable the internal oversampler so as not to waste CPU unnecessarily.

NOTE: About shape modulation.
To modulate the input shape with the provided Shape Modifier modules, it is mandatory to use the SE stock Volts 2 Float converter to drive the control float pins of the modifiers with an audio signal (for example from an LFO, ADSR or MIDI control), and to set the conversion rate to its maximum value (currently 60 Hz).
Connecting a Voltage line to a Floating Point plug directly will result in a much lower conversion rate, with very disappointing results.
Actually nothing prevents shape modulation up to (theoretically) the audio rate by using a custom volts->float conversion module or other unconventional means, however despite this transmitting blobs at sample rate or close to it is highly inefficient and is strongly discouraged.
Important: The module will not parse and render any shape to an LUT more than 60 times per second anyway, so there is no real point in trying to do this!

Shape Oscillator Plug descriptions and usage.

.Off/On (Boolean):- Turns the oscillator On or Off.
Please note that, when an oscillator is used in polyphonic mode, there is usually no reason to turn it off, since will be disabled automatically by SynthEdit when no notes are playing.
.Shape (BLOB):- Input for defining the output waveform’s shape in a standard BLOB format (Maximum range -5 to +5 Volts).
Values larger than +/- 5V are internally still allowed despite this the curve may be displayed clipped depending on your Shape Editor settings. The curve will always be clipped at -/+ 10 V internally by the module though.
Important note: Two nodes cannot have the same x co-ordinates (even if their y co-ordinates are different). There must be a very small difference between them.
.Shape ITP (List):- Sets how the shape nodes will be interpolated. The options are; Linear, Curve1, Curve2.
.DC Filter (Properties):- turns off or on the built-in DC filter to prevent DC offsets from appearing on the oscillator output.
.Oversampling (Properties) :- selects the internal oversampling factor
.Pitch Units (Properties):- Selects whether voltage to pitch is to be converted as 1 Volt per Octave or 1 Volt per Hz (Note: not 1 Volt per kHz)
.Pitch (Voltage):- Oscillator frequency (LUTs for second), in Hz or Octaves as specified by the Pitch Units set in properties. The allowed range is from 0 Hz or 0 Octaves, (which still corresponds to a non-zero frequency), up to half Nyquist frequency (or 10 Octaves = 14080 Hz) depending on the Pitch Unit setting.
.Sync (Boolean) :- A true pulse resets the oscillator phase to zero (To the start point of the LUT, unless an additional Phase modulation offset is applied.
.Phase (Voltage):- (Range -10 V to +10V) oscillator phase shift, can be used for phase modulation. A voltage of +5V represents a phase phase shift of half the wave period forward (+PI) while -5V half period backwards (-PI)
.Phase Range (Voltage):- (Range 0 to +10V) Limits the amount of phase modulation applied by the Phase pin
.Phase Feedback (Voltage):- (Range -10V to +10+) Sets the amount of signed oscillator output sent back and summed to the Phase input to achieve a DX7 – like FM feedback . -10V is phase inverted and +10V is in phase.

Using the Shape BLOB string.

Shapes:
Shapes support from two to 100 nodes. A shape can never have less than two nodes. No such thing exists as an “empty” shape: a “void” or default shape is a shape with just the first and the last node set to zero.
Node Values:
Node values internally are represented in normalized float units: from 0 to and including one horizontally, from -1 to and including 1 vertically. However, for compatibility reasons, node positions are still displayed and accepted in Volts by all ED Shape modules: from -5 to 5 Volts horizontally, from -5 to 5 Volts vertically.
First and last nodes:
The first and the last node are fixed at position -5 and +5 and cannot be moved horizontally.
String Format:
The “Legacy” string format consists of nodes between parentheses in Volt units, e.g. (-5,0)(1,-1)(5,1).
Nodes and Node positions:
The first and the last nodes must always be present, and their horizontal position must always be -5 and 5 respectively, and they must all be sequential. Vertical positions must be in -5 to 5 range. No other characters or spaces shall be present. Invalid strings will be rejected.
(This format was inherited from the stock SynthEdit WaveShaper 3)
Shape information storage:
Shape information is now stored and transmitted using a new efficient binary BLOB format. This means that every Shape Editor module must therefore be linked to the destination user module(s) through a Patch MemoryBlob module
Adding and removing nodes:
Shape nodes can be added or removed by a double-click. A double click anywhere in the edit field will create a new node at the corresponding mouse position. Double-clicking on a selected node will delete it. The first and last node cannot be deleted: a double click on them will snap them to the specified baseline for convenience.
Moving Nodes:
Shape nodes can be activated with a mouse click and dragged around within their allowed limits: between the neighboring nodes, and vertically within -5 and 5 or within a smaller range, in case custom MinY/MaxY values are specified

Understanding how the shape is defined:
The easiest way to understand the Shape BLOB format is to look at the ED Shape Editor 5 in operation. It works as a grid of (x-y) co-ordinate values (referred to as “nodes”, each one of which is shown as a circle), so looking at the Shape Editor grid below, this shape would be described as:
(-5,0)(-4,5)(0,0)(4,-5)(5,0)
Breaking this down our first node has the co-ordinates x=-5 and y=0
The second node has x=-4 and y=5
The third node has x=0 and y=0
The fourth node has x=4 and y=-5
The fifth node has x=5 and y=0

Note about x and y: As in map reading the horizontal (X) position is specified first, followed by the vertical (Y) position. The x and y co-ordinates must always be separated by a comma.

The waveshape resulting from (-5,0)(-4,5)(0,0)(4,-5)(5,0)

The waveshape resulting from (-5,0)(-4,5)(0,0)(4,-5)(5,0)

So if you wanted to define a square wave the shape string would be as follows;
(-5,0)(-4.999,5)(-0.009,5)(0,0)(0.009,-5)(4.999,-5)(5,0)
Why (-4.99,5) for the second node? You cannot specify the same x co-ordinates for two nodes, there must be a very small difference between the two, likewise for (-0.009,5) and so on. So OK it’s not a perfect square wave, but we can get extremely close to this.

The waveshape resulting from (-5,0)(-4.999,5)(-0.009,5)(0,0)(0.009,-5)(4.999,-5)(5,0)

The waveshape resulting from (-5,0)(-4.999,5)(-0.009,5)(0,0)(0.009,-5)(4.999,-5)(5,0)

Getting the Shape Editor and Oscillator to communicate.

Because the Oscillator is DSP and the Shape Editor is a GUI module we need a PatchMemory Blob to link them up. If you want you can even display the Node co-ordinates by including an ED GUI Shape BLOB-> String converter (we need this to convert the shape definition from Binary data to ordinary an ordinary numeric string) feeding a Text Entry4 module to display the information.

Using the Shape Oscillator with a Shape Editor.

The ED Shape Editor5.

I used the compact version of the Shape Editor above, as this doesn’t have the colour options for the graphic editor window to make things a little less confusing.
The full version has quite a few plugs and options so that’s on it’s own separate post to cover all the options: go to the Shape Editor post.