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.
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)
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)
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.
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.