Stuck with a SynthEdit project?

Month: November 2024

About LFOs- using the standard Oscillator.

An LFO is a low-frequency oscillator that is used to modulate a synthesizer controls automatically, and in a regular fashion. They are often used to modulate the filter cut-off frequency at a slow rate, for vibrato and for tremolo effects. Though it’s almost identical to an oscillator that produces audible waveforms, its frequency lies in the subsonic range between 10 Hz and 0.001 Hz. The most common waveforms are sine and triangle as shown below.


We can use the standard oscillator module to create an
LFO in SynthEdit.
Click on the module, and in the oscillator’s Properties window you will
see two modes for setting the frequency;
1 Volt/Octave,
1 Volt/kHz.
I recommend using 1V/kHz as it’s easier to work out your frequency ranges.
Since 1V = 1kHz, then 0.001V = 0.001kHz or 1Hz. It’s easier to work out 1 volt per kHz values, than using the 1 volt per octave formula below (unless you enjoy maths).

How low can you go? The stock SE Oscillator will (Since an update in 2019) go down as low in frequency as -1e27 kHz (0.00000000000000000001 kHz)… that’s well below 0.01 Hz.
An oscillator’s default output range is +5 to −5 volts. By adding a Level Adj
module in after the oscillator’s Audio Out plug you can adjust the
LFO’s output amplitude.
Note: If you make the range of the Level knob -10 V low to 10 V high, then when the Input 2 voltage is negative it will invert the phase of the waveform, and when it is positive the waveform will be in it’s normal phase.
Using the LFO is as simple as connecting to the Pitch plug of a filter (NB there are some filters such as the Butterworth EQ range that should not be modulated), the Pitch plug of an Oscillator (only small amounts are needed here) or the Volume plug of a VCA (it’s better to use a VCA than a Level Adj module).

By default this LFO will be “monophonic” this is because it is not connected to the MIDI-CV converter module. However we really don’t need to have a polyphonic LFO (and it would be a waste of valuable CPU resources too).
If you decided you really needed a polyphonic LFO, then you could connect the Phase Mod plug to the Pitch plug of the MIDI to CV module, and set the PM depth level to 0.
This is OK if you don’t mind having a few options an LFO wouldn’t normally have such as Pink/White noise. There is however a couple of excellent 3rd party LFO modules from TD modules which give you lots of extra options, see the TD LFO modules post.
We can also have even more complex modulation possibilities with a “complex LFO” by having a number of LFOs modulating each other.

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

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.

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”

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.

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.

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.