Stuck with a SynthEdit project?

Tag: Pins

Signal and Data Types


Patch leads and Plugs are colour coded depending on the signal type.
Plugs (AKA Pins) are the coloured ‘spots’ on the modules, and Patch leads are the cables we “draw” to connect the modules.

The text, and coloured spot on each module represents a plug that can be used to connect to other modules using patch cords.
A plug allows parameters of the module to be changed using the output of another module, such as a control, information to be transferred, control voltages, to be sent and received and
Input plugs are normally located on the left of a module, and output plugs are on the right of a module.
There are a few exceptions to this rule in the range of GUI modules
Plugs are colour coded depending on their signal type, as are the patch cords.

DSP versus GUI data.

This is the section that contains some of the controls for the DSP modules, and the interface/control panel itself, GUI handles all the key clicks, mouse events
So you can see what type a module is the DSP modules are grey, and the GUI modules are blue.
In general you are not able to connect GUI to DSP directly, but there are some modules that allow information to pass between GUI and DSP modules. GUI/DSP Converters are part Light Blue part Light Grey.

DSP or Digital Signal Processing.

This covers Oscillators, Filters, Modulators, Inverters, Level control, Voltage controlled amplifiers, and the controls such as knobs, lists, sliders, lamps and switches. These are the modules that generate, control, and process your sounds. Most controls send voltages to the modules, but some such a list entry, allow you to select one value out of a pre defined list in a module. There are some with values you can pre-set such as Boolean (0 or 1), Voltage,

DSP versus GUI Data.

DSP data cannot be directly connected to a GUI module due to the different ways of handling data. Synthedit will not allow the direct connection. The data speeds are higher for DSP reflecting the amount of data which must be processed, and GUI data rates are lower to allow more CPU priority to be given to the DSP signal handling.
You must use a special data conversion module to communicate between the two types of data, and never use this to process DSP data, the conversion should only be used to send signals from a GUI control to a DSP module to change it’s operating parameters. Never try and use GUI to DSP for modulation or other rapid changes.

Timing.

In Synthedit communications between DSP and GUI is meant to be accurate enough to handle controls and visual display items. There is no guarantee of precision accuracy.
This means that for for fast timing and data updates there is a risk that data will be skipped or mis-timed. For this reason (and others) you should never convert DSP data to GUI to use GUI modules to process DSP signals. Not ever.
DSP Sample rate data is at 44 kHz or more while GUI communication takes place at roughly 30 to 60 Hz!
In short do not try and use GUI modules to handle DSP data. It will fail.

Bit Depth

SynthEdit processes all signals internally at 32 bits floating point.
When SynthEdit write to files it outputs either 16 bit integer, or 32 bit floating point samples.

Sample Rate

Many software synths separate control signals and audio signals. Control signals e.g. LFO’s and Envelopes are processed at a low sample rate, this saves on CPU power, but results in sluggish envelopes and zipper noise (noticeable stepping clicks on fast envelopes, panning or volume fades). You also have the hassle of having conversion modules.
To maintain sound quality, SynthEdit uses the same high sample rate for all audio signals. As a result SynthEdit just sounds cleaner and more responsive than many other soft synths. SynthEdit supports any sample-rate.  The Oscillator waveforms are generated at run time to suit the sample-rate.

The types of data signals.

Blue:- Normal Audio or Control Voltage signal. DSP use only.
Audio, or control voltage signals. Voltage is essentially floating point data. It is used to send Audio from one DSP module to another, or to send control voltages from one DSP module to another to control the recipients behaviour.
DSP Floating Point and Volts pins will inter-connect. Connecting a Float output plug to a Volts input plug should cause no problems, because smoothing of the Float value will take place automatically. However it’s not good practice to connect a Volts output plug to a Float input plug, as many of the Float inputs on a DSP module are not intended for use with fast changing modulation values and making this type of connection can cause crackling and audio dropouts when modulating the value on the plug.


Note: Voltage plugs are always DSP Plugs.

—————————————————————————————————-

Light Blue:- Floating point values
A floating point number, is a positive or negative whole number with a decimal point. For example, 5.5, 0.25, and -103.342 are all floating point numbers, while 91, and 0 are not. Floating point numbers get their name from the way the decimal point can “float” to any position necessary within the number.
Note: With large numbers, there are times when maths results from floating point calculations are not 100% accurate.

—————————————————————————————————-

Red:- Text data.
The Text data type stores any kind of text data. It can contain both single-byte and multibyte characters that the locale supports. The term simple large object refers to an instance of a Text or Byte data type.
Text can be GUI or DSP.

—————————————————————————————————-

BLOB:- Binary Large OBject.
This is a more technical aspect of data in Synthedit, and is not often used except in passing large amounts of binary data in or between modules when using or creating samplers, or sample players.
In Synthedit it has a built in limit of 5MB. trying to pass more than 5MB of data won’t work that amount of data can’t be handled and will just be dropped (ignored) and not transmitted.
A “BLOB” is a common acronym for “Binary Large OBject”, which means it’s a data object holding a large amount of binary data. Some languages have native BLOB types, but C++ doesn’t. Never the less, creating a blob is simple enough – you just create an array of bytes. This is done by creating an array of characters. This might be confusing, though, as an array of characters has a special meaning in C++ – it’s also a string.
For more information you really need to read in depth C++ programming tutorials and documentation.

—————————————————————————————————-

Orange:- Integer/ Integer64.
The Integer data type stores whole numbers that range from -2,147,483,647 to 2,147,483,647 for 9 or 10 digits of precision.
Note:- The number 2,147,483,648 is a reserved value and cannot be used. An Integer value is stored as a signed binary integer and is typically used to store counts, quantities, and so on.

—————————————————————————————————-

Yellow:- MIDI data.
MIDI is an acronym that stands for Musical Instrument Digital Interface. It’s a way to connect devices that make and control sound — such as synthesizers, samplers, and computers — so that they can communicate with each other, using MIDI messages.
Synthedit takes the MIDI input from your chosen device, and converts it into control signals (voltages) that it’s modules can understand to control the modules actions.

—————————————————————————————————-

Green:- A list of values. For example, Waveform names. DSP Only. Usually connects to a drop-down list.

—————————————————————————————————-

Black:- Boolean (logic on/off). This (for those of you familiar with electronics) is like the system used by TTL and CMOS logic chips.

—————————————————————————————————-


NOTE: SynthEdit will not allow you to connect patch cords to plugs of a different signal type without using a converter except for Voltage and Float (But you should always use a data type converter).

SynthEdit:- How Plugs, Patch Cables and Data are used.

Here I’m listing some of the more commonly used Module plug names, the types of data they carry, and their usage along with useful notes.

BLOB data module

Not used very often in SynthEdit, except in passing large amounts of binary data in or between modules when using or creating samplers, or sample players.
In SynthEdit it has a built in limit of 5Mb.
A “BLOB” is a common acronym for “Binary Large Object”, which means it’s an object holding a large amount of binary data. Some languages has native blob types, but C++ doesn’t. Never the less, creating a blob is simple enough – you just create an array of bytes. In your example, this is done by creating an array of chars. This might be confusing, though, as an array of chars has a special meaning in C++ – it’s also a string.
For more information on BLOBS you really need to read in depth C++/DSP programming tutorials and documentation.

Boolean data module

A Boolean or Bool is a data type with two possible values:
true or false (0 or 1). It’s named after the English mathematician and logician George Boole, whose algebraic and logical systems are used in all modern digital computers.
In SynthEdit any value above 0 is considered as “True”.

Floating point module

A floating point number, is a positive or negative whole number with a decimal point. For example, 5.5, 0.25, and -103.342 are all floating point numbers, while 91, and 0 are not. Floating point numbers get their name from the way the decimal point can “float” to any position necessary within the number.
Note: Floating point math by it’s nature cannot be precise when handling very large numbers so you can’t always trust math modules when they are applied to floating point data.

Integer module

The Integer data type stores whole numbers that range from -2,147,483,647 to 2,147,483,647 for 9 or 10 digits of precision. Note:- The number 2,147,483,648 is a reserved value and cannot be used. The Integer value is stored as a signed binary integer and is typically used to store counts, quantities, and so on.

MIDI Module

MIDI is an acronym that stands for Musical Instrument Digital Interface. It’s a way to connect devices that make and control sound — such as synthesizers, samplers, and computers — so that they can communicate with each other, using MIDI messages.
These messages are not only the note that is played on a keyboard, it can be a wide range of data related to volume, positions of controls, how hard the key is pressed etc.
SynthEdit takes the MIDI input from your chosen device, and converts it into control signals (voltages) that it’s modules can understand to control those module’s actions.
With the new MIDI2 standard this has become more complex.

Text module

The Text data type stores any kind of text data including numbers (but these are always treated as text, not values). It can contain both single-byte and multibyte characters that the locale supports. The term simple large object refers to an instance of a Text or Byte data type.

Audio/voltage module

Used to carry Audio, or Control voltage signals. Voltage is essentially floating point data. It is used to send Audio from one DSP module to another, or to send control voltages from one DSP module to another to control the recipients behaviour. DSP Floating Point and Volts pins will inter-connect, but you really should use a Float to Volts converter. You can then set the rate at which the conversion takes place and ensure that the control operates smoothly, and predictably. Leaving out the Float to Volts module can result in the possibility of the control being somewhat “glitchy” and unpredictable.

Control and Audio voltage plugs.

Voltage (audio):
Audio voltage plugs transmit blocks of samples to be processed at sample rate by other input audio plugs. This means that they are operating at the sample rate set in the preferences.
Voltage (Control):
Plugs used for control signals like Volts (non-audio), float, int, string, bool and BLOB work differently, they are event based meaning that processing of a single value at time happens only when a new value is created, for example a control is moved/operated.
The Audio module code is managed differently: it’s done by using a sub process which processes the sample blocks or by an “event handler” respectively.
Accuracy:
Both kinds of data however are transmitted and processed on a sample rate accurate clock. Nothing technically prevents a module from sending an update to a control plug (e.g. float) 48 000 times a second but that would be very inefficient in terms of CPU because the handler used for the receiving modules will be processed continuously at 48 000 times a second to process occasional single control update values.
Control plugs are not meant to transport audio data:
Jeff programmed a suitable converter module which “down samples” an audio stream to send the sample values to a float pin at a much slower rate of 60Hz or even less. Control pins are only suitable for slowly changing parameters or automations, and must never be used for audio streams.

An Example showing an Audio and control plugs:
The Oscillator:- The Audio Out plug carries a very rapidly changing audio voltage (up to the current audio stream rate), so this would naturally be an Audio voltage.
All of the left hand voltage plugs however are considered as control voltages and are not updated as frequently as the Audio output.
The ADSR2:- All of these plugs, both left and right hand side are considered as Control Voltages, and not updated as frequently. Also even though the Attack/Decay/Release sections may change quite rapidly, even the signal out plug carrying the ADSR envelope voltage is not handled as audio.

Note: Voltage plugs are always DSP Plugs, whereas Float Plugs can be DSP or GUI. You cannot connect GUI plugs to DSP plugs without a suitable converter such as a Patch Memory module.
You should never convert a DSP audio voltage to a GUI signal to process using GUI modules…it will be very inefficient and glitchy! Converting Control signals is fine as long as you use the correct modules for the job.

Patch cables.

These are our links between the plugs on the modules, much like hardware patch leads. The colours of the leads match the types of data they carry. Synthedit will not allow you to connect incompatible data plugs and sockets- you will just get an error message:

Or if you try and connect a DSP plug to a GUI plug even if it’s the same data-type you’ll get this error message:

More about patch cables.
When you click on a cable it’s highlighted in yellow. As you can see below there are also different styles of line; some have nodes added (the white dots) which can be added by clicking on the line once it’s selected. These allow us to “bend” the cables. By right clicking on a selected patch cable we get the menu shown, with the options; Straighten line (remove all bends), Delete Line, Curvey (I know it’s miss spelled-but I’m using the spelling from Synthedit to save confusion), and Straight. Curvey give us a line in the style of the one highlighted, and straight – the one with sharp corners. To move a node just select the cable then click on a node and drag it to the new position.

Spare Plugs.
Where you see a plug like the one below with the title “Spare Output” this is a self replicating plug which means that as soon as you connect it, another appears below it titled “Spare Output“. These plugs when connected take their title from that of the plug they are connected to.

The correct way to convert a GUI Floating Point control value to a DSP Voltage control value.

You should always use a Patch Memory module to convert from GUI to DSP and vice versa. Likewise Floating Point must always be converted to Volts using a Float to Volts module to ensure the controls work smoothly with no data loss.

Converting GUI control floating point to DSP voltage


Some ways in which data plugs are used:

Hint:- (Text) This text displays as a popup yellow tooltip when the mouse hovers over a control on the VST’s panel.
Both of the items below (Menu Item and Choice) form the replacement for the older “Drop Down List” and form a selection menu based on an “Enumerated List
Menu Items:- (Text) Comma separated text list. Provides a right-click popup context menu for the image. Commonly used for adding a MIDI-Learn menu.
Choice or Menu Selection:- (Integer) Selects items from the list based on their numeric position in the text also Commonly used for adding a MIDI-Learn menu.
(NOTE: An enumerated list starts always at 0, not at 1). This also provides a right-click popup context menu for a control or image. Commonly used for adding a MIDI-Learn menu.


Animation Position: (Floating Point) Returns the position of a knob or slider control. The value of this is (normalized) to between 0 and 1, so for controlling DSP modules needs to be scaled up to the usual 0 to 10 Volts range Patch Memory (Float) modules do this scaling automatically.
This Animation Position data is normally Bi-Directional.


Mouse Down: (Boolean) Sends a “True” value when a control or image receives a left click from a mouse.

Properties.
Some settings or controls may not always be available as Plugs, they may only be available in the Module’s Properties panel:
Writeable:- (Boolean) Makes read-only or writeable.
Greyed:- (Boolean) Displays text in a disabled, grey style.
Background Colour: (Text)
Foreground Colour: (Text)
Ignore Program Change: (Boolean)
Mouse Down:- (Boolean) Provides a Boolean “True” signal whenever the mouse is left clicked on the image.
Read Only:- You can only read data from a module when this is set to True, it will not accept any inputs.
Greyed:-

NOTE: Fixed value modules only have outputs, and their values are set in the properties panel so they cannot be altered in any way from the VST’s control panel, however you can allow the VST plug-in’s user to select from a bank of fixed values via a drop down list, or similar selector.