Betacantrips/ bits/ Zynaddsubfx 101

zynaddsubfx is a high-quality software synthesizer primarily for Linux. It is written by Paul Nasca and is available here. Software synthesizers are a digital orchestra; zynaddsubfx is one such orchestra, and though it is very powerful and a lot of fun, it is also tricky to learn.

Below is the main screen for zynaddsubfx (2.2.1 from unstable). This is what I see when I first start the thing up.

Click VK to open the zyn keyboard. Play some notes. You'll probably find that the higher notes are easier to hear.

To understand zyn as much as possible, it's helpful to turn off as many extraneous things as possible. To this end, change EffType to No Effect.

Play more notes on the keyboard. The faint echo that was previously there is gone.

Click Edit Instrument. You'll see a window like this:

Zyn has support for three different synthesized instrument types. The first of these is the one we'll start with. ADDsynth comes from the technique of creating many voices which are all slightly detuned from one another and adding them together to make an instrument. Click the Edit button underneath the label ADDsynth.

This is approximately where I began to lose my mind. There are dozens and dozens of knobs here and it's not very clear what any of them do. However, there are two important categories that are worth covering specifically.

  • Envelopes. An envelope is a function that specifies values for some aspect of an instrument. A D S R stands for Attack Decay Sustain Release. See ADSR.
  • LFO. Sounds are made by oscillations at various frequencies -- 440 Hz is an "A", for instance. These oscillations can be modified by a much lower frequency oscillator called an LFO (low-frequency oscillator). See low frequency oscillation.

We'll play with these things later. Right now click on "Show voice parameters".

Most of these settings are grayed out. That indicates that the parameters are going to be the same as the "global parameters of the instrument" that we were just at. That's fine for now. Note the big sine wave at the bottom. That's the oscillator you heard when you played on the keyboard! Let's change it to something else. Click "Change".

The row of sliders is intimidating but for now we ignore it. Click Base F on the right and change it from Sine to Pulse. Play some notes on the keyboard. Hear the difference? It probably sounds more electronic, bleepy, or video-game-y. I happen to really like the sound of pulse waves so let's leave them for now. Also, note that you can hear much clearer now the notes on the low end of the keyboard. This will be helpful in illustrating filters later.

Let's start playing with envelopes. Start with the Amplitude envelope, that will be the easiest to hear. Change A.dt to a slightly higher value (9 o'clock or so on the dial) and then press a note on the keyboard. Although the note is the same loudness, it has a lighter, more feathery sound to it. The volume of the instrument is specified in four parts -- Attack, Decay, Sustain, and Release. You changed the attack, increasing its length, and now it takes longer to get to its peak loudness. You can click on the "E" button to get a visual representation of this.

Some instruments start out very strong but die off. A xylophone or bell, for instance, has a very sharp sound that fades away. The dying off is accomplished by the sustain and decay. The length of the decay is specified by the dial labeled D.dt and the value of the sustain is set by S.val. If the sustain is all the way at the right, as it is now, decay is meaningless. The instrument will remain at the "sustain" level as long as the key is held down. When it is let go, the amplitude decays further according to the release component of the envelope.

Envelopes can be specified for things besides amplitude -- you can see there is an envelope for Filters that have six components, and another envelope for frequency of the instrument that has only values for attack and release.

If your releases go on too long, you can press the "Panic!" button on the Zyn main window to shut off all synthesis going on right now. Blissful silence.

LFOs can be used to vary the volume and amplitude as well. Turn the depth of the Amplitude LFO up to about 9 o'clock. Hear how the note wavers? You've specified that the volume of the note now varies according to a sine wave. If you turn the depth up to 12 o'clock, you'll hear a much more pronounced effect. Try turning the frequency down too. The technique of varying the amplitude is often called tremolo. In a similar way you can vary the frequency of the instrument; this is called portamento or vibrato. The depth of an LFO is the amount it varies the base quantity; an LFO with depth 0 is inactive. Turn off all the LFOs for now; they'll only distract from what you're about to do.

Pulse waves are fun but they still sound somewhat tinny. To change this, we can add body to the instrument by adding some slightly detuned voices.

Go to the voice parameters section of Zyn and enable the second voice.

Towards the bottom there is an option "Use Oscil." Select "Ext. 1" and it will use the same oscillator as your first voice. There's a big slider in the middle that says "Frequency"; slide it up to about 5.97. Play some notes. Sounds thicker, doesn't it? Do the same thing with voice 3, only change the detune to some other number, say -12.

You can spend a lot of time tweaking detunes on voices. To make it a little easier, you can go to the Global Parameters window and click "Show Voice List".

You can also change "vib depth"; this changes the per-voice LFO depth, which is disabled on all voices by default. (To enable it you have to go into the Voice Parameters dialog.)

That should be enough information to get you started playing around making your own instruments. Some tips:

  • Zyn closes all the dialogs related to one instrument when you switch to editing another. This can make it very difficult to see what the differences are. I recommend using a program like KSnapshot to take screenshots of the two instruments, so you can compare them dial-by-dial. You can also copy and paste settings using the blue "C" and "P" buttons, and see if this envelope was the magic one.
  • Save your instruments.
  • If you like lo-fi 8-bit sounds, you might check out my zynaddsubfx nes page.

Blue Sky design by Jonas John.