Stuck with a SynthEdit project?

Author: Stephen (Page 2 of 13)

Registration checking..

Registration system for VST plugins.

These modules allow you to have a simple Registration System for your VST Plugins by having a serial number that is directly linked to both the product name (name of your VST) and the registered user name.
The “Registration Check” module allows you to provide a basic system to register users of your plugins. The idea is you issue each user with a serial number. The serial is linked to the user’s name (or email).
Use two “User Setting – Text” modules, one to save the user’s name, and a second to store their serial. This data will be stored on disk and recalled any time the user loads the plugin. Each User-Setting-Text module needs a “key” which identifies what the setting is called. On the first User-Setting module, set “Key” to “Registration Name” or similar, and set the second module’s Key to “Serial” or similar. (Ref to the diagram below).
Registration Setting information will be saved to the following folders:
For Windows systems;
Windows C:\Users\UserName\AppData\Local\ProductName\Preferences.xml
For MAC OS systems;
MacOS ~Library/Preferences/ProductName/Preferences.xml.

Basic example.

In the example shown below a LED is used to indicate that a valid serial number has been entered.
In practice, you might choose to use this signal to restrict the features of your instrument, or to add periodic noise bursts etc.
To generate serials, use the “Registration Serial Generator” module
Important Note: You must not share this module with your end-users. 
Note: You must ensure you enter the same “random seed” into the Registration Serial Generator that you used in the Registration Checker. The seed should be different for each of your plugins (otherwise the same serials will activate all of them). Currently, it’s necessary to generate each serial number manually.

The Registration Checker in use in a VST:

Product Name:
Ensure you enter a unique product-name into the User-Setting-Text module at the time of creating your VST. Otherwise the system will mix up serials from different products and you’ll end up with a total mess.
The “Default” setting is not important, it can be left blank, however you can put a useful message in here such as “Enter User Name”. Note: If you are using the Password hide module there is no point as your message will become **********, so it would be better to use another Text Entry with the appropriate control labels.
Random Seed:
You must enter this Integer in the Registration Check module’s properties when programming the VST It MUST be unique to each plug-in you create (not for each one of the same type you sell though!)
User Name:
The user enters their User Name or E-Mail address in here, which they have supplied to you (email is best, the chances of two people having the same e-mail address are, well pretty remote).
Serial Number:
The user enters the serial number generated by the combination of their user name, and the Random Seed Integer.
In this example Text Entry 4 Changes to Registered = True when all the three variables match: Random Seed, User Name, and Serial Number. In practice you can use this to disable certain parts of the VST, add random noise bursts etc. which will then be removed when the correct registration details have been entered.

Hiding your passwords.

One more helpful thing you can add is the password hide. So if a user is making a video of something with the plugin the serial numbers are shown as asterisks after entry like ****** instead of 235256 for example if the registration screen is displayed on the main control panel.

Creating Passwords.

This just needs the Registration Serial Generator, and the Text Entry4 module to display the generated password.
All you need here is the Rego Name – this is ideally the clients email address, and the Random Seed Number.
Important: The Random Seed number must not be shared. The Registration Serial Generator must never be shared or left in the final VST.

User Setting – Text module.

Passes the relevant information to the Registration checker for validation.

Plugs:
Left Hand Side:
-> Product:- (Text) The Product name i.e. the name of your VST. This must match in both the User and Serial modules!
-> Key:- (Text) The Key value of User Name, or Serial Number. Leave as Default when programming.
-> Default:- (Text) Leave as Default when Programming.

Right Hand Side:
<- Value:- (Text) User Name or Serial number input from a Text Entry4 module by the end user.
<- Value:- (Text) User Name or Serial number sent to the Registration Checker module.

Registration Check: Module.

There are two versions of these GUI and DSP. They both check the combination of User Name, Seed, and Serial Number to ensure they are a valid match.

Plugs:
Left Hand Side:
-> Rego Name:- (Text) Input of the User name. Put a default value in the properties during programming.
-> Serial:- (Text) Input of the Serial Number. Put a default (false obviously!) value in the properties during programming.

Right Hand Side:
<- Is Valid:- (Boolean) Returns a value of “True” if all the conditions match.

Properties:
♦ Seed:- (Integer) This is your random Seed Number for your VST module to identify it. This MUST be a unique number entered into the modules properties during programming of your VST. It must never be made public.

LED2 without PatchMem

By using a third party module it is possible to avoid using a PatchMemory Float Out3 module in the LED2 control. It can be replaced with a QTN_Float2GUIFloat, to convert from DSP Floating Point to GUI Floating Point.
By setting Input 2 to a value of 10 V the LED will “Illuminate” at 5 V on the Signal In plug.
Note: If you set the Input 2 plug to 0 the LED will always be “On” (You cannot divide by zero, so the module will not provide a valid output.
Note: If you want to provide a quick and easy “Clipping detection” LED, then Set Input 2 to 1V, and change the Response plug on the Volts to Float module to “Clip Detect”. This will provide a fast method of clipping detection.

By adding another Divide module connected to Input 2 of the original Divide module, and setting this new module with an Input2 value of 2V we can then provide a second input with which to set the voltage at which the LED “Illuminates”.

Colour changing LED.

We can also add another similar input chain to give control over the LED colour. If the Input2 of the divide is set to 10 this will allow an input voltage of 0 V to 10 V to control the colour of the LED. If you want to colour change in response to a variable voltage I would suggest setting the Response of the Volts to Float to at least 20 Hz to avoid the colour change looking “stepped”. You can see this in action by connecting up a slow running oscillator, but don’t forget that this will give a -5 V to +5 V voltage swing, so you’ll need to ad a 5 V offset to the colour plug to get the correct range.

Trigger to MIDI and MIDI Monitor

Sends a MIDI note-on message, and appropriate MIDI values whenever the gate input goes over 0 Volts. The voltage at the pitch input determines the MIDI note number, and the voltage on the Velocity plug sets the MIDI velocity number.

Trigger to MIDI

Plugs and properties:
Left Hand Side:
->Gate:- (Voltage) Triggers the Note on message
->Pitch:- (Voltage) Sets the note pitch. For details see signal level conversions.
->Velocity:- (Voltage) Sets the note velocity. 0 – 10V maps to MIDI Velocity from 0 to 1. he default level is 0.5
->Channel:- (List) MIDI Channel number (or “All”) to output on
Outputs:
<-MIDI Out:- (MIDI) Standard MIDI 2 Output
Properties:
**Freq Scale:- Select from: 1V/Octave or 1V/kHz.
**Channel:- Select the MIDI channel number or “All”
Note: If you connect a MIDI-CV2 module to this module it will still produce the usual Trigger pulse as the Gate button is pressed.

MIDI Monitor.

Displays the MIDI status and MIDI values being received.

The display format.
Sound ON = Sound engine is running.
2C1 shows that you are using MIDI Channel 1 as the output channel.
Note on shows that the module has received a gate signal. Turning the gate off will result in a Note off output.

2C16 Note On (111, 0. 84):
Channel 16: Gate is on, 111 is the MIDI note value, 0.84 is the velocity.

2C16 Note off (111, 0.5)
Channel 16: Gate is off, 111 is still the MIDI note value, and the velocity has returned to it’s default of 0.5

2C16 Note On (116, 0.84)
Channel 16: Gate is on, the MIDI note is now 116, and the velocity is still 0.84.

MIDI Note to voltage conversion.

Note: By this table middle C (60) is C3, not C4 as per ISO system standardized by Acoustical Society of America
This conversion table doesn’t apply to MIDI note lists of the sort contained in the ‘MIDI Filter’ module. For those a simple ’10/127 x note number’ formula works.

MIDI | VOLTS
000 = -0.75
001 = -0.667
002 = -0.583
003 = -0.5
004 = -0.417
005 = -0.333
006 = -0.25
007 = -0.167
008 = -0.083
009 = 0
010 = 0.083
011 = 0.167
012 = 0.25
013 = 0.333
014 = 0.417
015 = 0.5
016 = 0.583
017 = 0.667
018 = 0.75
019 = 0.833
020 = 0.917
021 = 1
022 = 1.08
023 = 1.17
024 = 1.25
025 = 1.33
026 = 1.42
027 = 1.5
028 = 1.58
029 = 1.67
030 = 1.75
031 = 1.83
032 = 1.92
033 = 2
034 = 2.08
035 = 2.17
036 = 2.25
037 = 2.33
038 = 2.42
039 = 2.5
040 = 2.58
041 = 2.67
042 = 2.75
043 = 2.83
044 = 2.92
045 = 3
046 = 3.08
047 = 3.17
048 = 3.25
049 = 3.33
050 = 3.42
051 = 3.5
052 = 3.58
053 = 3.67
054 = 3.75
055 = 3.83
056 = 3.92
057 = 4
058 = 4.08
059 = 4.17
060 = 4.25
061 = 4.33
062 = 4.42
063 = 4.5
064 = 4.58
065 = 4.67
066 = 4.75
067 = 4.83
068 = 4.92
069 = 5
070 = 5.08
071 = 5.17
072 = 5.25
073 = 5.33
074 = 5.42
075 = 5.5
076 = 5.58
077 = 5.67
078 = 5.75
079 = 5.83
080 = 5.92
081 = 6
082 = 6.08
083 = 6.17
084 = 6.25
085 = 6.33
086 = 6.42
087 = 6.5
088 = 6.58
089 = 6.67
090 = 6.75
091 = 6.83
092 = 6.92
093 = 7
094 = 7.08
095 = 7.17
096 = 7.25
097 = 7.33
098 = 7.42
099 = 7.5
100 = 7.58
101 = 7.67
102 = 7.75
103 = 7.83
104 = 7.92
105 = 8
106 = 8.08
107 = 8.17
108 = 8.25
109 = 8.33
110 = 8.42
111 = 8.5
112 = 8.58
113 = 8.67
114 = 8.75
115 = 8.83
116 = 8.92
117 = 9
118 = 9.08
119 = 9.17
120 = 9.25
121 = 9.33
122 = 9.42
123 = 9.5
124 = 9.58
125 = 9.67
126 = 9.75
127 = 9.83

The volts values can be fed to ‘Trigger To MIDI’ and ‘SampleOscillator2’ modules at ‘Pitch’ pin for example, the values can be calculated as well, but it’s not so straightforward and due to deviations product requires constant manual adjustment, the table saves you this tedious process, it’s accurate and verified

A dB scaled Level control with readout.


The idea is that a normal control knob (Using Vector, SVG or a regular image) can be connected up to the standard Level Adj module, but the control will behave like a regular dB volume control, and will show the equivalent dB gain in a text entry module.

The GUI value conversion.

The neatest and simplest way to do this uses third party modules. Elena Novaretti has a dB to Volts converter in her module pack, which do the job very nicely.
All we need to do is set the Patch Memory Float3’s Min and Max values to some useful levels such as -40 to + 3, which then gives you a gain range between -40 and +3 dB. I have also used the Name plug set to “dB Gain” to use for the control’s title display module
The only GUI conversion needed is the float to text module for the readout. This is already scaled for our needs.

Adding a PWM type effect to a non square wave.

Most VCO’s have a PWM function on the square wave audio output, but it is possible with some use of comparators, and by using Level Adjustment modules as “audio gates” we can achieve a similar function on sine, saw, ramp and triangle waves. The example prefab is here

Keeping the PW input under control.

Due to the way the gating works, we need to keep the range of the CV input under control. Rather than leaving things so that each CV you might use to control the prefab would have to be range limited I have done this in the prefab itself. We just need to limit the output range really, this needs to be from +5 volts, to +9.9 V.
Going outside this range won’t cause the prefab to crash, or do anything bad to the VST, it just won’t work as expected. However I have limited the input range from 0 to 10 V. Negative CV’s won’t work at all.

Setting the width of the output waveform.

This is done by controlling the point at which the Level Adjusters used as audio gates switch on, and whether they turn on on the positive or negative cycles of the input waveform.
Here I’m feeding in a +/- 5V peak to peak sine wave from an Oscillator, and the PW input as at 0 volts, by using the Scope3 we can see what’s going on.

Example 1 100% signal

By the time we get to 5 V on the PW input you can see how the gate pulses have changed, and with that, the output is no longer a sine wave. It’s not clipped but the shape has changed.

Example 2 50% gating

And at 9 V on the PW input the change is quite drastic.

Example 3 90% gating

And the effect of the prefab on a Sawtooth-

Example 4 Sawtooth gating

This module will work on all waveshapes except a square wave (Square wave is just an on/off signal, so changing the module doesn’t work at all on a square wave).
Feeding noise through the modulator will give an output ranging from full noise, to more of “static” type noise.

Adding an ADSR Time readout to a Knob in Synthedit.

This is a question I have seen asked on the Synthedit group, and the Forum, so I thought it would be a useful sub-control & conversion prefab post to save others the hassle of re-inventing the wheel as it were. Whilst it’s a definite advantage in SE, not everyone is a mathematics wizard (including me!)

Converting voltage to time for the ADSR2 module.

The heart of the process of adding a time readout for the Knob is using this small prefab Volts2-ADSR-Time. The conversion takes place in the Waveshaper2B module using the formula (10^(x * 0.4-3))*10 – (note the order of the brackets).
This method is not 100% accurate, but is close enough for our purposes.
once the input Voltage has been converted to the correct curve it’s then converted to a GUI float value, and from there to on converted to a text string, and displayed in the ED Text Entry box. By connecting the second text box to the PatchMemory Float3 module and changing its name to the appropriate Attack/Decay/Sustain label we have a convenient way of adding a control name to the Knob.

You don’t have to use one of the Vector knobs, you can just as easily use the standard sub control Image2 as a control knob.

I have made the prefab available as a download here but as you can see from the screenshots you will need some third party modules, and the vector control is only for V1.5.

Making a (very) basic Synthesizer in SynthEdit.

I’m covering this as (as when I first started out in SynthEdit there are a few little “gotchas” that can leave you scratching your head.

I’m getting no audio out, what’s “broken”?

It’s tempting to jump straight and in leave out the VCA and ADSR… if you do you may well not get any audio out of it, just a low frequency buzzing. Synthedit expects the VCA to be there, and to be connected to the Trigger and Gate plugs.

The ADSR isn’t triggering properly when I play quickly.

You must have both the Trigger, and the Gate connected for the ADSR to work correctly, these two signals work as follows;
Trigger: This is a short pulse received every time a key on the keyboard is depressed. This initiates the ADSR cycle.
Gate: This is necessary for the sustain portion of the ADSR envelope to be present. If it’s not connected then at best you’ll just get the Attack and Decay cycle, or it will just fail to work correctly .

The Tuner (AKA Detuner).

I recommend connecting this module up, and having a look at what goes on inside it, as it will give you an insight into how the 1 volt/Octave pitch to voltage works in SynthEdit. The octaves are just steps of one volt, and the fine tune knob is set with a maximum value of 0.083 V so that you can fine tune against other instruments, or if you have two oscillators you can vary the pitch of one to get a (very) basic chorus effect.
I have added a Level Adjust module on the output and fed this to the Pitch plug on the VCF, that gives us the classic “Moog” filter sweep sound especially with the Resonance or “Q” turned up to about 8 Volts.

I’m getting a pronounced click at the start of the note, why?

This often occurs when you have a very short (or zero) attack time set, it’s unavoidable, just set the attack time so the click disappears.

Measuring Pitch voltage.

I tried to measure the voltage on the Pitch plug on the MIDI-CV2 module and the readings don’t match what I would expect. Why is this?
Because of the way SynthEdit works you’ll just keep getting voltages coming and going as keys are depressed your Synth will work out what’s going on, but the voltmeter can’t make sense of it.
Likewise if you hook up the ‘scope to the VCO while you’re playing you will see multiple signals instead of one composite audio signal. This is normal, and is due to the way SynthEdit handles Polyphonic operation. You’ll only see a single signal if you force the Synth to operate as “Monophonic” i.e. one note at a time.

Making a Saturator.

A Saturator is a good way of adding a bit of colour and “oomph” to a bass or lead synth line, but how can we make one in SynthEdit?
What we want to do is not to introduce hard clipping to the signal, that would be too noticeable we are after something more subtle that just adds a few more harmonics to the signal.

Creating a basic saturator.

The core part of this module is the waveshaper, and for saturation we use the formula 5*tanh(x). The idea is not to clip the peaks of the waveform, but to try and emulate the sound of a slightly overloaded (or saturated) valve pre-amplifier which tanh(x) does quite well.
This formula applies tanh to the input signal, and then multiplying the result of the tanh(x) calculation by 5 restores the output to the normalized +/- 5 Volts peak to peak. The VCA on the input of the waveshaper controls the level of signal passing through the waveshaper, and being applied to the output mixer.
The inverter and divider are used to keep the output level as constant as I could, this works by inverting the slider voltage from the waveshaper VCA’s volume control and applying it to the Volume control. The adjusted negative voltage then reduces the gain of the output VCA as the Waveshaper signal is increased in level . The optimum division value seems to be 2.3 Volts (but may need “tweaking” slightly). The input VCA has its response set to Exponential, and the output VCA is set for a linear response, I found this gave the best results with signal levels.
The input level control is set to have a range of 0 to 20 so that we have plenty of gain. This is the only non-standard min-max range on the controls.

A basic stereo saturator structure.

The output with no saturation applied:
The signal is passed directly to the output VCA and is a pure sine wave with no added harmonics.

No saturation

The output with maximum saturation applied:
Here you can see that once we pass the signal through the waveshaper the sine wave peaks have been reduced smoothly which increases the level of harmonics without introducing too much harshness into the output. The higher the level of signal passed through the waveshaper the more harmonics we generate.

100% Saturation.

To give a bit more control over the audio I have added a TD Stereo EQ module, that gives us the options of Low Shelf boost/cut, Band boost/cut and High Shelf boost/cut.

The whole structure…

The finished Saturator project with its panel layout and links to the 3rd party modules, prefab and VST3.

My final panel layout

I have made the finished project available as a V1.5 .seprefeab file and as a completed VST3 plug-in. However you will need some extra 3rd party modules from TD Modules, Sasha, and Davidson.

Changing the Harmonic structure.

By adding in the (highlighted) inputs to the Waveshaper modules we can offset the equation, causing the addition of odd as well as even harmonics. All it needs is for this offset Plug in the IO Module to be connected to a suitable control then we can control the amount of odd harmonics that are added to the signal by changing the offset voltage. I would suggest that a range of 0 Volts to +4 volts is a suitable range for the offset (negative voltages have the same result).
The High pass filters are added to prevent DC from the offset appearing in the output, and can be set to an appropriate frequency such as 14 Hz to minimize any changes in the output signal.
Here is a link to the Thoracious prefab version V1.5 seprefab file

Below is the spectrum with 0 volts offset.

No offset.

Compared with an offset of 1 Volt

1 volt offset.


This was a modification suggested by Thoracious Apotite, https://www.thoracius.com/ in the comments. Many thanks Thoracious! Comments such as this are always welcome.

SVG “Analogue” Knob

Customising the look of the Analogue Knob.

@Label: (Text) The text label that appears below the control. (The colour is set by the “Print” ARGB)
@ Value: (Text) This is the value or alternative text that replaces @Label when the mouse hovers over the control. (The colour is set by the “Neon” ARGB)
@Color: (Text) Controls the colour of the “skirt” and main body of the knob.
Cap: (Text) Controls the colour of the cap insert in the centre of the knob.
Neon: (Text) Sets the hover colour for the @Value text.
Pointer: (Text) Sets the colour of the dot on the body of the knob.
Print: (Text) Sets the colour of the scale markings and the @Label text.

Changing the appearance of the knob.

Changing the behaviour of the knob.

Shown below are some useful properties settings for the knob:
Offset angle: This offsets the starting position of the knob, by changing this to 90 we add 90 degrees to the starting position of the knob.
Sweep Angle: By changing this to 180 we can limit the range down from the usual 300 degree control knob sweep, to a180 degrees sweep, or any other range that might be required. Note: This will not change the scale markings!
Scale: Adjusts the size of the control knob.
Opacity Normal: By setting this to 0 we obtain the behaviour where the @Label text is swapped for the @Value text as the mouse hovers over the control. If the value is left as 1 then only the @Label text will be seen..
Setting the Min/Max Range: This is the same as any other SynthEdit knob or Slider, and is set in the Patch Memory in the Prefab properties panel.

Changing the behaviour of the knob

Changing from a continuously variable control to stepped.
It’s a simple as changing the Patch memory From Float3 to List 3, and connecting up a module with a list plug, then connecting Choice and Item List plugs. Add a List to Text module to feed the choice to @value and it’s done. The Patch Memory sets it all up for you.

Using the knob as a stepped switch control for Lists.

Sasha’s SVG Controls.

Sasha, one of the 3rd party module developers has released some SVG controls for SynthEdit. These modules are not free (only in a demo mode), but cost 49 Euro, and are available here.
These controls have two main advantages:
1) They can be re-sized with no loss of quality.
2) Highly customizable.
The basic set of control is shown below.

The basic SVG control.

The Help Files.

s SVG Control:
This is the module on which all the SVG controls can be created. It displays SVG files and makes them interactive by using @commands, and animation
Filename: (Text) Supplies the SVG file path.
Animation X/Y: (Floating Point) These plugs send and receive (exactly as the default SE controls) the horizontal (X) and vertical (Y) animation position of the control as a GUI Float value between 0 and 1.
Modulation Value: (Floating Point) The input plug for animation modulation. This animates each layer which name contains the “@modulate” command with the modulation value. This must be connect to a Patch Memory Float Out’s Value pin. Input is scaled so that 0-10 corresponds to the default of 0-1.
List Choice: (Integer) Sends and receives index value of the selected List Item as with other SynthEdit sub-controls.
List Items: (Text) Input for the list of items. Any input other than blank makes module the operate in a stepped mode, a blank input allows for a
continuous (un-stepped) movement of the control. A single item input makes the module operate in trigger (on-off) mode. Each list item’s text will replace the “@item” text in the SVG file.
Note: For the stepped option to operate correctly there must be the same number of List items as there are list choices. Important: the Integer list for choices must start at 0, not 1 if there are 5 List Items, then the List Choice shall be 0,1,2,3,4.
Mouse Down (X/Y): (Boolean) Outputs mouse pressed state.
@image: (Text) Supplies the bitmap file path. The Bitmap is displayed on a rectangle in the layer name (in the SVG file) which contains the “@image” command.
@label: (Text) Inputs the text string which is used for replacing the “@label” text in the SVG file.
@value: (Text) Input to supply the value text. This is used for replacing the “@value” text in the SVG file when the mouse pointer is over the control. Note about Hover: For the @value text to be visible the Opacity Normal value in the s SVG Control’s properties must be set to 0.
All Color plugs: How to specify the colours- This is either standard HTML colour names (i.e. Red, Orange, Yellow…), or hex color codes in the following formats: #RGB, #ARGB, #RRGGBB, #AARRGGBB.
@color: (Text) Input for the main control colour.
Cap: (Text) Input for the colour of the cap on the control knob.
Neon: (Text) Input for the hover text colour, and the “slot” for the slider control.
Pointer: (Text) Input for the colour of the pointer control knob.
Print: (Text) Input for the default text and scale colours.
Hint: (Text) Input for hint text (mouse hover)
Menu Items: (Text) Input for context menu items
Menu Selection: (Integer) Outputs the context menus item index value.
Position (X/Y): (Floating Point) Outputs the mouse pointers horizontal (X) and/or vertical (Y) position in the normalized floating point range (0.0 to 1.0)
Mouse Over: (Boolean) Outputs the mouse hover state.

Shown below are the controls Sasha has provided as pre-fabs with the SVG module pack.

Some of the SVG controls
« Older posts Newer posts »