Xsynth-DSSI is a classic-analog (VCOs-VCF-VCA) style software synthesizer which operates as a plugin for the DSSI Soft Synth Interface.
Xsynth-DSSI began as a simple DSSI port of Steve Brooke's Xsynth, but has since grown considerably to include the following features:
a new, more stable filter mode, and
Xsynth-DSSI is written by Sean Bolton, and licensed under the GNU General Public License, version 2 or later.
When developing open-source software for a niche market such as Linux audio, it can be hard to know how many people are using one's work, and to feel like it's worth the effort to maintain it.
If you find Xsynth-DSSI useful, please share your appreciation by sending me any or all of the following:
an email stating where you're from and how you're using Xsynth-DSSI, sent to (sean at smbolton dot com)
copies of or links to music you've created with Xsynth-DSSI (and let me know if I can share it here!)
any patches you create for Xsynth-DSSI
suggestions for improving Xsynth-DSSI
offers of paying work writing this sort of code!
Most major distributions include an Xsynth-DSSI package:
Source tarballs: http://sourceforge.net/projects/dssi/files/xsynth-dssi/
Github repository: https://github.com/smbolton/xsynth-dssi
Xsynth-DSSI requires the following:
DSSI version 0.9 or greater.
liblo version 0.12 or later (0.23 or later recommended), a library implementing the Open Sound Control (OSC) protocol.
pkgconfig with PKG_CONFIG_PATH set appropriately to pick up DSSI and liblo.
GTK+ version 1.2 or 2.x. (If GTK+ is not found, the plugin will be built without the GUI.)
the LADSPA v1.x SDK.
the ALSA headers (DSSI plugins use ALSA structures, but not the actual drivers, so you don't necessarily need the drivers installed.) Users of non-Linux systems can use libdssialsacompat.
a working DSSI host. Xsynth-DSSI has been tested with jack-dssi-host, available in the DSSI distribution, and with ghostess.
automake 1.7, autoconf 2.58, and libtool 1.4.3 or better if you wish to recreate the build files.
The generic installation instructions in the enclosed file INSTALL aren't particularly helpful, so try this instead:
Unpack the tar file.
Make sure PKG_CONFIG_PATH is set correctly to locate the dssi.pc and liblo.pc pkgconfig files. On many systems, this will be:
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig $ export PKG_CONFIG_PATH
'cd' into the package directory and execute './configure'. configure will add '-Wall' and my favorite optimizations to CFLAGS for you if you don't include any '-Wall' or '-O' options. If you're using gcc and wish to provide your own optimization flags, you MUST at least use '-finline' and a non-zero '-O' flag to get decent results.
Enable debugging information if you desire: edit the file src/xsynth.h, and define XSYNTH_DEBUG as explained in the comments.
Do 'make'. Hopefully it should build without warnings (or errors.)
'make install' will install the following:
<prefix>/lib/dssi/xsynth-dssi.so <prefix>/lib/dssi/xsynth-dssi/Xsynth_gtk <prefix>/share/xsynth-dssi/factory_patches.Xsynth <prefix>/share/xsynth-dssi/version_0.1_patches.Xsynth
Feedback on your experiences building Xsynth-DSSI is appreciated.
To run the Xsynth-DSSI plugin under the jack-dssi-host provided in the DSSI distribution, I do the following:
Start jack-dssi-host, supplying the correct plugin path and filename (substitute <prefix> as appropriate):
$ DSSI_PATH=<prefix>/lib/dssi sudo jack-dssi-host xsynth-dssi.so
jack-dssi-host should start, and moments later the Xsynth-DSSI graphic user interface should appear.
Use aconnect or kaconnect to connect jack-dssi-host to a MIDI source, such as vkeybd.
Begin playing sounds! If you get no response, try clicking the 'Send Test Note' button in the Xsynth-DSSI GUI. This sends a note directly via the host to the plugin, so if you hear sound now, look for a problem between the example host and your MIDI source. If you still don't hear sound, I'd look for a problem between the example host and your output device. If you continue having trouble, you might recompile with XSYNTH_DEBUG bit 2 set, which will cause the plugin to continuously output a quiet buzz to help debug your outgoing signal path.
Xsynth-DSSI starts up with a small set of sound presets, or 'patches', that you can select either by selecting the GUI 'Patches' tab and clicking on the patch name, or by sending a MIDI program change from your MIDI source with the appropriate program number.
Selecting the 'Patches' tab displays a list of all the patches loaded. Clicking on the name of a patch causes that patch to be selected.
The 'Test Note' controls allow you to send a test note to the plugin, by clicking on the 'Send Test Note' button. Changing the 'key' and 'velocity' sliders will change the pitch and velocity of the test note. A key of 60 is generally considered to be 'Middle C'.
This tab allows you to edit patches.
The controls in the VCO1, VCO2, LFO, MIXER, PORTAMENTO, EG1, EG2, VCF, and VOLUME sections all offer real-time control of the synthesis parameters used by the plugin to create sound. The voice architecture is described in more detail below.
Note that the rotary knobs may be manipulated in several ways:
Clicking and dragging a knob with mouse button 1 sets the value directly, by making the knob pointer point toward the mouse pointer.
Clicking and dragging a knob with mouse button 3 allows incremental adjustment of the knob's current value (without a sudden jump.) Horizontal movement produces large variation in the knob value, while vertical movement allows finer control.
Clicking on a knob with buttons 1 and 3 increment and decrement the knob value.
The NAME text box allows you to change the name of a patch.
Once you have edited a patch to your satisfaction, you may save it back to the patch bank by clicking the 'Save Changes' button. You will be asked to which program number you would like to save your new patch. If you do not wish to overwrite an existing patch, selected the highest available patch number, next to which '(empty)' will be displayed, to save your changes to a new slot. Be sure to then use 'Save Patch Bank...' from the 'File' menu to save your changes to a file (or use a DSSI host that will save the session; see FAQ Question 4 for more information.)
Sets the tuning of this instance of the plugin, as Hz for A-above-middle-C.
Sets the maximum polyphony for this instance of the plugin. If you attempt to play more notes than this setting, already-playing notes will be killed so that newer notes can be played. If you are getting xruns, try reducing this setting.
'Off' - polyphonic operation.
'On' - monophonic operation, where the envelopes are retriggered upon each incoming note on event.
'Once' - monophonic operation, where the envelopes are triggered only on the first note on of a legato phrase -- that is, if you hold one note while playing a second, the envelopes will not be retriggered for the second note.
'Both' - monophonic operation, where the envelopes are retriggered at each note on, and upon note off when other keys are still held.
'Legato Only' - portamento (a 'slide' in pitch between two notes) is only used when a new note is played while another is held.
'Non-legato Only' - portamento is only used for single (staccato) notes, or the first note of a legato phrase.
'Always' - portamento is always used.
'Leftover' - like 'Always', but ... more difficult to predict.
'Off' - disables portamento.
Set the pitch bend range, from 0 to 12 semitones, for this instance of the plugin.
Xsynth-DSSI models a simple analog synthesizer, where two oscillators (VCO1 and VCO2) are mixed (MIXER) and fed to a low pass filter (VCF), which then feeds an amplifier (VCA) controlling the output volume:
.. aafig:: +------+ | VCO1 | +--+---+ | v +-------+ +-----+ +-----+ +--------+ | MIXER |-->| VCF |-->| VCA |-->| output | +-------+ +-----+ +-----+ +--------+ ^ | +------+ | VCO2 | +------+
Modulation of these elements is possible using two envelope generators (EG1 and EG2), a low-frequency oscillator (LFO), and the MIDI key and velocity.
The frequencies of VCO1 and VCO2 are controlled by the MIDI key, plus the value of the 'pitch' control. Compared to a base pitch of '0', a value of '5' is one octave higher, and a value of '10' is two octaves higher.
The pitch from the MIDI key may be lagged by the PORTAMENTO 'glide' value, as determined by the glide mode and other keys in play (see above).
The frequency of VCO2 is also affected by the 'pitch mod' amounts from EG1, EG2 and the LFO.
The waveforms available for both oscillators are:
The 'pw/slope' control sets the width and slope of waveforms 5 and 6, respectively. It has no effect when waveforms 0 through 4 are selected.
VCO2 may be 'hard synced' the VCO1, so that its phase resets whenever VCO1 completes a cycle, by selecting the 'osc sync' checkbox.
A 'balance' setting of '0' causes the mixer to output only VCO1, a setting of '10' outputs only VCO2, and a setting of '5' results in an equal mix of both.
The VCF cutoff frequency is set by the 'cutoff' control, plus the 'filer mod' amounts from EG1, EG2, and LFO.
The filter resonance, or 'Q', is set by the 'resonance' control. Be aware that the filter is not always stable when the resonance is very high, and when the resonance is very low but the cutoff is very high.
The 'mode' option menu controls which of the three filters is used:
'12 db/oct' - the original Xsynth two-pole filter.
'24 db/oct' - the original Xsynth four-pole filter.
'MCVLPF-3' - Fons Adriaensen's MCVLPF-3, modeled after the voltage-controlled lowpass filter invented by R. A. Moog.
The gain of the VCA set by both the 'volume' control and the envelope generator EG1.
The envelope generators are classic 'ADSR'-style: the 'attack' control sets the time it takes from key-on for the envelope to reach full output, the 'decay' control sets the time it then takes to fall to the 'sustain' level, where it stays until key-off. The 'release' control sets the time it then takes to fall back to zero output.
The 'vels sens' (velocity sensitivity) control determines the amount the envelope output is reduced by low MIDI velocities. At a sensitivity of '0', the envelope always goes to full output. At maximum MIDI velocity (127), the envelope always goes to full output. Otherwise, the lower the velocity and higher the sensitivity, the greater the reduction of the envelope's output.
The duty cycle of the waveform 5 (rectangular) is fixed at 25% high, and waveform 6 (variable-slope triangular) is not available.
For DSSI hosts that support MIDI controller mapping, Xsynth-DSSI requests that they map two MIDI controllers:
MIDI Control Change 5 "Portamento time" is mapped to the PORTAMENTO 'glide' control, although in a somewhat backward way: higher CC values map to shorter glide times, and lower CC values to longer glide times.
MIDI Control Change 8 "Balance" is mapped to the MIXER balance control.
Xsynth-DSSI itself interprets several other MIDI control messages:
MIDI Control Change 7 "Volume" controls the output level, without affecting the VOLUME control.
MIDI Control Change 1 "Modulation wheel" reduces the VCF cutoff.
MIDI channel pressure and key pressure are combined to boost the VCF resonance.
Q1. Woah! Where'd that nasty sound come from?
A1. A certain grittiness has always been part of Xsynth's charm for me, but if you're getting really nasty sound from a patch, check for the following:
Volume too high: especially when using high resonance, your signal may be so hot it's clipping.
Resonance too high: yep, the filter will go to self-oscillation with high resonance settings. Try backing the resonance off.
Resonance too low: Xsynth's filter is unstable near zero resonance when used with high cutoffs. Try setting the resonance to 0.2.
Resonance getting boosted by keyboard or channel pressure: try playing softly or turning your keyboard's pressure sensitivity off. I know, this should be configurable....
XSYNTH_DEBUG XDB_AUDIO set: if you've got a ~600Hz buzz in the output even when you're not playing anything, your plugin was probably compiled with the XDB_AUDIO debug bit set. Fix that and recompile.
Pitch too high: even with the band-limited oscillators, it is possible to get audible aliasing on very high notes. This is especially true when using oscillator sync while VCO2 is producing a sine wave, since the band-limiting technique doesn't deal as well with waveforms having continuously varying slope.
Q2. Help! I just installed Xsynth-DSSI 0.9.x, and now my sessions that used the older Xsynth-DSSI 0.1.x don't sound right. What should I do?
A2. Xsynth-DSSI 0.1.3 is the last 0.1.x-compatible version, but it does include the anti-aliased oscillators and MVCLPF-3 filter. If you just want to use your existing sessions, you'll have to use version 0.1.3. If you want to convert them to 0.9.x, you'll need to save any custom patches or patch banks using a 0.1.x version, then install 0.9.x, load the custom patches, then tweak the mix and glide settings as needed. (Note that the version 0.1.x default patch set is installed by later versions as <prefix>/share/xsynth-dssi/version_0.1_patches.Xsynth)
Q3. Why aren't the GUI slider values and the corresponding LADSPA port values the same?
A3. The LADSPA port values are the actual numeric values used by the synthesis code, while the GUI slider values are all the 0-to-10 values used in Steve Brookes' original Xsynth interface.
Q4. Why aren't my patch edits being saved between sessions?
A4. When you edit and save patches, the patch data (which is really just the settings for the DSSI plugin ports) can exist in four places, only two of which may persist between runs. Twiddling the knobs in the Xsynth-DSSI Patch Editor, or in your DSSI host's port editor, changes the values the plugin is currently using to make sound (represented by the leftmost box in the diagram below.) If you want to save your edits as a one of the patch ‘Presets’ (the middle box), use the ‘Save Changes’ button on the Patch Editor. Note that the middle box only exists in the plugin's working memory, and if you want to permanently save your changes, you need to get them to one of the boxes on the right.
One option is to use ‘Save Patch Bank...’ from the ‘File’ menu, so save the patch bank to a file (the bottom right box) which you can then reload later using ‘Open Patch Bank...’.
The other option (the top right box) is to use a DSSI host which will save the session data for you, and restore it upon reopening the session (not all hosts do this). Until you fully understand how your host works, it's best to save a file, too.
.. aafig:: +---------------+ "DSSI Port Values" | | +--------------------------------------------------->| "DSSI Host" | | | -- | | Patch Bank Data |"Saved Session"| | +------------------------>| Data | | | | | v v +---------------+ +-------------------+ +------------------------------+ | "DSSI Ports =" | | "Plugin Patch Bank =" | | "Patch ‘Knobs’" | | Plugin ‘Presets’ | | -- |<----| -- | +--------------------+ | "Change with GUI" | |"Select with GUI Patches List"|<---| Patch Bank File | | "Patch Editor" | | "or MIDI Program Change" | | on Filesystem | +-------------------+ +------------------------------+ +--------------------+ | ^ | ^ | | | | +---------------------+ +--------------------+ "Use Patch Editor" "Use File Menu" "‘Save Changes’" "‘Save Patch Bank...’" to Save to Save
It includes contributions and bits of borrowed code from many others, all under various copyleft or non-copyleft open-source licenses. See the file AUTHORS for details.
In particular, if you're interested in Steve Brooke's original Xsynth, the code can still be found here.
Copyright © 2017 Sean Bolton. Created with Sausage Grinder.