Check out Syd Central
1.1 A Syd Tutorial -- a short tutorial prepared by the author, Jim Bumgardner Oscillator2.2 Sound Modifier Units Amplifier2.3 Structure Units Speaker (Output)2.4 Score Units CSound Score3.0 Expressions input vars3.2 Operators functions - basic math & trig4.0 Menu Commands FileVersion History Jim Bumgardner (Letter from the
Author) 0.0 Preface Top of Page First of all, I'd like to say hi to any CalArtians who are reading this - I attended that fine institution (music composition) from '80 to '84. Those days were pre-MIDI for CalArts, but they did have two analog electronic music studios which featured Buchla 200 synthesizers, which were maintained by John Payne who must have had a love/hate relationship with them. I am now a Macintosh programmer with a small collection of digital toys, but I miss those days of patch cords, razor blades and 2-track tape immensely. One weekend, in late March of '97, in a fit of nostalgia, I decided to write a software synthesis program for my Mac that would share some interface elements with the Buchla 200. Working Buchla 200s are hard to come by, and I wanted to recreate the experience of patching modules together and hearing the results. So I spent the weekend writing a program called "SS" which stands for Soft-Synth (I've since changed the name to avoid confusion with other products with similar names). By the end of the weekend, I had a simple patchable interface working that was capable of generating some interesting sounds. I've since spent considerably more than a weekend working on it, and have learned a bit more about digital audio. After learning about CSound and other Music-N languages, I incorporated some of the features in those languages, while still trying to retain some of the ease of use that the graphical "patch" interface provides. I believe there are a few trends which prevent serious computer music tools from reaching a wider audience. One of them is that these tools have an unnecessary level of complexity, which is primarily due to historical precedent - performance considerations forced programmers to make systems which are awkward to use. CSound and similar systems are only easily understood if you are nearly knowledgeable enough to have programmed them yourself. Music compilers don't need to be this complex. The increasing speed of desktop computers should enable us to rethink how we approach these tools. I'd like to offer the source code of this program to other interested amateurs - for any hobbyists who wish to tinker around with a digital synthesis program. If you'd like a copy, drop me an email. Also, if you develop some interesting sounds, I'd like to hear them - feel free to send me a copy of your patches. Enjoy! Jim Bumgardner 1.0 Introduction to Syd Top of Page Syd, short for "Synthesis Demonstration" or "Synthesis Donut" is an instrument editor and software synthesizer. You can find the latest version of Syd here: http://www.thePalace.com/jbum/syd/ Features: 1. Graphical Interface for patching instruments and creating scores.
1. Keep it simple to use - for example, you can patch an oscillator to a speaker, and hear a sound.
Go to: Landes SYD Tutorial [This Tutorial is one that was created by the Instructor] [The Tutorial below is the one that is included in the SYD documentation.] The main interface in Syd is graphical. You create "patches" (algorithms for creating sound) by dragging the "modules" at the top into the large central area of the window. These modules are "patched" together using patch cords. The patch cords indicate the direction of signal flow. In Syd signals generally flow either to the right or down. When a patch cords is coming out of a module, depending on the angle of the patch cord, it will either be coming out of the right side, or out of the bottom. On the other end, the patch cord will be "going in" to the left side or the top of another unit. In this quick tutorial, we're going to create a simple FM-controlled oscillator. You'll notice as you slide the mouse over the modules at the top, that each one identifies itself in the help box at the bottom of the window. Similarly, once you've constructed your patch, each element unit and patchcord will identify itself in this way, helping you keep track of what's what. You'll notice there is already an output unit (the one with the speaker icon) in place. All patches require an eventual output, so this is already placed for you. To add an oscillator, click on the oscillator icon (the second unit from the left with the sine wave on it) and drag the oscillator unit down into the main working area. To patch the oscillator to the speaker, position the mouse over the right edge of the oscillator unit until the cursor changes into a phono-plug. Then click and drag, connecting the oscillator unit to the speaker unit. When you drag over the speaker unit, the speaker unit will highlight itself. Release the mouse. You'll see that the oscillator and speaker are now connected with a patch cord. Congratulations! You've made your first patch. Let's listen to it. To synthesize the sound, hit the "Synthesize" button. During synthesis, the watch cursor will spin, and some text will appear in the log window. Synthesis should end fairly quickly, particularly if you are on a PowerMac. After synthesis is done, you can listen to it by hitting the "play" button (If the patch is fast enough, you can listen to it while it is being synthesized -- see the Options menu). What you're hearing is a sine-wave oscillation beating at 440 times a second. The entire sound lasts for 2 seconds. If you'd like to make the sound last longer, double-click on the output unit (the "speaker") - a dialog box will appear. In the dialog, change the "duration" value to some other time (how about 10.53 seconds?). You'll also notice that the sound is being saved to a file called "Untitled.aiff". You can change the file name here as well. Then hit "OK" and synthesize again. Aren't sine waves lovely? Now, let's lower the pitch of the oscillator. Double click on
the oscillator. You can view the sound you just made visually by using the "Graphics"
option on the menu (Cmd-G). When the graphics window appears,
a graphic representation of the last sound you synthesized will appear.
The graphics window responds to mouse clicks and a few keystrokes as
follows: Click Zoom into the area clicked.
Modules typically have one output, and one or more inputs. Different color patch cords correspond to differing inputs. Once you've patched the two oscillators together, pass the mouse over the patch cord going from the new oscillator to the old oscillator. You'll see from the help panel that the patch cord is going in to the "am" input of the first oscillator. Click on the patch cord and use the pop-up menu that appears to change it to go into the "fm" input of the oscillator. You'll see that once you've changed the assignment from "am" to "fm", the color of the patch cord will change from blue to green. Eventually you'll learn to recognize green patch cords at a glance as "fm" patch cords. Once the patch cord is assigned to the "fm" input of the oscillator, you can refer to it's value within the oscillator by editing the oscillator's settings. Double-click on the first oscillator again. A dialog will appear. Change the "frequency" setting from "220" to "220+fm*10", this will cause the oscillator to use the "fm" input to modulate it's frequency. Hit the "OK" button, synthesize and play the sound again. It's worth noting at this point that you didn't really need to change the patch cord from "am" to "fm". You could have left it at "am" and then used the formula "220+am*10" - this would have had the same effect. The main purpose of changing the patchcord is to provide you with a visual understanding of what is going on. Since we're using the signal to modulate the frequency, "fm" is more appropriate. For some units, however, the choice of input does indeed make a difference. For example, on the filter units (and most other signal modifiers) the signal that is being filtered must always go in the "sig" input, while signals which are used to control the filter should go in the "ctl" inputs. Go to: Landes SYD Tutorial
1.2 Where to go from here? Top of Page At this point, probably the best way to learn more about Syd is to try some of the sample patches that have been included. Some have been designed to demonstrate particular features of the program, while others were included because they demonstrate particular synthesis styles. The "Patches" folder contains a file called "AAA_READ.ME" that describes each of these sample patches. I recommend reading this file and select a patch that sounds interesting to you. You can load any of these patches via the file menu (you may edit multiple patches simultaneously in Syd) or simply double-click on the patch's icon in the finder. After you load in the patch, listen to the sound it makes, and double click on each of it's units to see how they have been set up. If a particular unit being used in the patch mystifies you, look it up in this manual, and you'll find more information. There are two units which are particularly interesting in Syd. One is the one that says "f(x)" on the icon - the Expression unit. This unit allows you to generate (or modify) a signal by typing in any mathematical expression - this manual describes the mathematical syntax that is used in these expressions. In addition, most of the other modules (such as the oscillator, the amplifier, the filters, the function table, and the random score module) also support expressions (in fact, you used one when you made the fm-controlled oscillator). The other unit that is interesting is the "random score" module. This module can make a simple patch far more interesting by playing it with random values, and creating multiple notes which sound simultaneously (polyphany). Some basic Syd units you should know about: • Loudness is usually expressed as a value between 0 and 1.
If you are not sure which unit is which, wave the mouse over the list
of gadgets at the top of the window - the help text will indicate the
name of the unit. 2.1 Sound Generating Units Top of Page Oscillator Top of Page The oscillator is the basic waveform generator. It accepts general expressions for frequency, amplitude and phase. In addition you can optional use an expression to define the waveform, in this expression, "t" will represent the position in the waveform from 0 to 1. You can create waveforms which vary over time using the variable "g" which represents global time. Settings Freq (expression) Amp (expression) Inputs am
There are some pitch conversion functions which allow you to specify pitch in different ways, for example, by MIDI note number, or by octave and step, see below. The WaveType can either be a fixed waveform such as a sine, square, triangle or sawtooth wave; or it can be computed using an expression you provide. For example, the following expression makes a sine wave with two harmonics. sin(t*2*pi)+sin(2*t*2*pi)/2 + sin(3*t*2*pi)/3 Pluck Top of Page Generates a plucked-string sound using the Karplus/Strong algorithm.
These sounds are generated by filling a buffer with random values and
then smoothing the values over time. This generates an interesting
sound and has the added benefit of being extremely fast. Patches
based on this sound can often be generated in real-time on a PowerMac.
Settings
Generates a maraca-like sound using Perry Cook's Maraca simulation
algorithm, which appeared in the Fall '97 Computer Music Journal (Vol
21, #3). SettingsResFreq
Reads a sample (AIFF) file and outputs the sound contained in the file.
At the moment, this unit can only read AIFF files which contain uncompressed,
monophonic, 8 or 16-bit sounds. This restriction will be
dropped in the future. SettingsFile (filespec)Timescale (expression)
Generates random values from 0-1. In an expression, the symbol
"?" produces the same kind of signal. SettingsExpression Top of Pageseed (constant) Expressions can be used both for generating and modifying sounds.
See section 3.0 for more on expressions. Settingsexpression (expression)Inputs
Note: This unit is still "under construction" and will probably be modified in future versions of the software. The HammerBank simulates a piano-like instrument with 128 strings, which are activated by hammers, and have dampers. The action of the hammers and dampers is triggered using one or more Hammer Actuator Units, see below. These units can be used to simulate an instrument which has sustain properties which are triggered independent of the notes. Most of the fields take expressions which can use the "k" variable (key number) to create characteristics which change relative to the register of the key. See the "HammerTest" patch for an example of a HammerBank in action.
SettingsBank# (constant)Inputs
Note: This unit is still "under construction" and will probably be modified in future versions of the software. This unit can be used to activate the hammers and dampen/undampen the
strings of a Hammer Bank unit (see above). See the "HammerTest"
patch for an example. Multiple Hammer Actuators attached to a
single note event can be used to create "sympathetic resonance" effects.
In a typical configuration using a Score unit, a single HammerBank will
sound throughout the entire piece, while Hammer Actuators will be triggered
for each note event. Settingsbank# (constant)
Amplifier Top of Page Amplifies or attenuates the input signal, and then adds an offset value.
Settingsscale (expression)
This is a bare bones ADSR envelope generator. The envlope generation
facility is probably going to be extensively reworked to support graphical
editing of envelope shapes. The current unit generates a signal
using the settings you provide numerically. SettingsMixer Top of PageAttack Time (constant) This module is used to mix together and attenuate multiple signals
which might otherwise cause clipping when added. The output signal
is attenuated based on the number of input signals. Inputs
This module is used to create a common kind of filter called a 2nd-order Section. Such a filter can be expressed as outputting a series of vaues y[0...N] based on a series of input values x[0...N] with the following formula: y[n] = a0*x[n] + a1*x[n-1] + a2*x[n-2] + b1*y[n-1] + b2*y[n-2] Note: The "classic" 2nd order section uses subtraction, rather than addition for the "b1" and "b2" terms. If you want this, use negative values for the b1 and b2 coefficients. If you are looking for a more "musical" filter that is easier to understand,
I suggest using the Butterworth filter (see below). Settingsa0 (expression)
SettingsFilter Type (pull down menu)
A simple delay unit. The output y[n] is expressed as (a0*x[n] + a1*x[n-delay]) Settingsdelay (expression)Controls the length of the delay - expressed in seconds. If the delay is too large, you may run out of memory. You can use time-varying expressions (a time-varying delay will cause pitch shifts).
Outputs 1 if the input signal is above a particular threshhold value,
otherwise, outputs 0. SettingsSample and Hold Top of Page When a trigger is received, this samples the current intput signal
and continues to output that value until the next trigger is received.
Try using a square wave oscillator for a t rigger. Settingsnone
Inverts the signal by inverting its sign (multiplying by -1).
SettingsnoneInputssig
Smoothes the signal by averaging subsequent values. This is a
simple lowpass filter where y[n] = (x[n]+x[n-1])/2. For more predictable
and controllable effects, use the (slower) Butterworth filter. Settingsnone
The following units control the overall structure and form of the patch, rather than generating or modifying audio signals directly. Speaker (Output) Back to Top There is always at least one speaker unit. This is meant to be
the final terminus for the patch. Any signal being fed into the
speaker is "heard". As described below, the settings are only
meaningful if the patch is being used as the "main instrument". If the
patch is being used as a folder instrument, the output settings are
ignored. Settingsoutput to memory (radio button)Inputs
Folders are used to encapsulate entire instruments, which are stored in separate patch files. This makes it easier to create complex instruments without clutter. For an example, look at the "combo.syn" patch, which combines 2 folder instruments. Folders are also useful for defining the instruments to be patched
into a score. A score might need 10 instruments patched into it,
and there isn't enough space in the patch window to fit all of them.
Settings
Folder inputs are used to document the inputs into an instrument which is meant to be played as a Folder Instrument. They also provide default values for these inputs so the instrument can be tested on its own, without having to being played as a folder instrument. For an example, see the "quietreverb.syn" patch, which accepts a folder
input. SettingsParam (Score) Input Back to TopF number (constant) Parameter (Score) Inputs are similar to Folder Inputs. They are used to document the inputs into an instrument which are meant to be provided by a Score. They are similar to Folder inputs, but refer to the parameter values (p1,p2,p3 etc) which are generated by a Score unit. They also provide default values for these inputs so an instrument can be tested without a score. See Scores, below. For an example, see the "shepsco.syn" patch, which reads parameters
SettingsP number (constant)
These units are used to load values into global variables, which can
then be accessed from other instruments (using the notation g0,g1,g2
etc.). These units output 0, so they can't be used
in a path which is directly generating an audible signal (however, you
can fork off such a path to create the assignment). SettingsG number (constant)
Function tables are provided as a means of speeding up calculations. A function table's contents are precomputed when the instrument is initialized. Subsequently, the table's contents can be accessed from any expression using the function ftab(n,t) where "n" is the function table number, and t is a number from 0 to 1 which accesses a particular table element. The (slower) function ftabi() [ not yet supported ] can be used if linear interpolation between table values is desired. All your tables should have different numbers, and ideally, tables
should not be defined in folder instruments. Settingsftab number (constant)Inputs
Score units are used to create entire pieces of polyphonic music. They use the instruments that are patched into them to sound each note in a "score". Although you can patch them together as you can the other units, their behavior is considerably different. Each input into a score unit will be treated as a separate "instrument". Whenever a note is played in the score, a unique "instance" of the sub-patch that corresponds to the instrument number will be temporarily created and sounded for the duration of the note. Multiple instances of instruments allow for multiple notes to sound simultaneously, creating polyphony. If the score refers to multiple instrument numbers, you can patch in multiple instruments - one for each type used in the score. I suggest using folder instruments (see above) for this purpose, to reduce icon clutter. In this case, you would have one patch for each instrument, and one "master" patch which shows how those instruments are assigned to the score. Since scores allocate instances of instruments, they may cause considerable amounts of memory to be consumed. Since Syd is still not very well behaved when it runs out of memory, I suggest saving your work before hitting the "Synthesize" button. Score modules use the same conventions as CSound score files, where
the note parameters are provided in variables named p1, p2, p3 etc.
The first three parameters have fixed meanings: p1 is the instrument
number, p2 is the start time of the note, p3 is the duration of the
note. Syd treats score modules just like other modules. This means that a score module can "play" another score module as an instrument, and the output can be patched into a sound module (e.g. reverb or amplifier) for post processing. The ability to patch two score modules together is particularly useful when used in conjunction with the random score unit, which generates events based on a set of formulas. For example, one way to use the random score unit is to thicken an instrument that is being played by a CSound score - the random score can cause each note event to trigger multiple note events, each with slightly randomized parameters, turning one instrument into a whole chorus. Random scores can also be used to correct, adjust, swap or embellish the parameter values in a CSound score, allowing it to be used with an instrument which wasn't originally designed to be used with that score. This means you will spend less time modifying instruments to work with different scores, instead, you can use the random score unit to "map" a particular score to a particular instrument. CSound Score Back to Top The CSound Score unit reads a "CSound" score file and plays it using
the instruments that are patched into it. At the moment, Syd's
support for CSound scores is very minimal - function tables and ramps
are not yet supported. The sample patch "prelude_pluck.syn"
shows an example of CSound score being played. Settingsfile (file spec)
The Midi Score unit (when it is implemented) will read a standard MIDI file and play it, assigning the parameters as follows: p1 channel number+1 This unit has not been implemented yet. In the mean time, if
you want to read MIDI files, I suggest getting a copy of CSound and
using one of the MIDI to CSound conversion utilities. Settingsfile (file spec)
The random score unit creates a series of notes (or more accurately - "events"), which are generated using random numbers or other formula. It has many uses, including creating aleatoric scores, testing instruments and fattening sounds. Various options allow you to specify the number of notes, their starting times, durations, and other parameters. A random score can be played by another random score. In this case, the formulas in the random score can refer to "p2 p3 p4" etc., which refer to the note values provided by the parent score which is playing it. If an instrument isn't being played by a score module, the values of p1,p2,p3 are assigned reasonable defaults. In particular: p1 is 1 By nesting random scores in this manner, you can achieve a great deal of complexity. In any of the formulas used in a random score, the variable "n" refers
to event number, from 0 to (#events-1). Settings
The expression syntax used by the Expression Unit also applies to the
input fields of most of the other units (unless those fields are described
in this manual as accepting "Constants"). 3.1 Variables Back to Top input vars Back
to Top Any patches into a unit can be referenced by using the input variable name. For example, the inputs into an oscillator are "am, fm, amwidth and fmwidth". These names are provided as mnemonics for their suggested uses, the signals can be used in any manner you wish. So for example, the pitch of an oscillator might be specified as "440+fm", where "fm" is the input from another oscillator.
The variables "p1", "p2", "p3" etc. are provided when the instrument feeds into a Score generator (such as a Random Score unit or a CScore Score Unit). These are the parameters provided by the instrument events in the score. Generally, p2 is the start time of the note, p3 is the duration of the note. For the random score unit, p4 is the amplitude (0-1) and p5 is the pitch (cps). p1 = 1
The variables "g0", "g1", "g2", etc are provided for storage of global variables, which allow crosstalk between separate instruments. You can store a value into a global variable using the "Global Variable Assignment" units.
d duration of piece in seconds
For a note this is note time.
The time relative to the note being sounded (provided by the score modules).
If the expression is being used to generate the notes of the random score, this value will correspond to the note number, from 0 thru n-1, which is useful for creating linear note spacing. In versions of Syd prior to 1.0.6, the variable "n" was used for this purpose, and this method is still supported for backward compatability.
If the expression is being used in a Hammer Bank unit, this value will correspond to the key number, from 0 thru 127.
If the unit is connected to a HammerBank unit, this value contains the string energy, which will start around 1.0 when the string is struck, and then decay using the decay coefficient provided in the HammerBank module.
The time relative to the section as a whole.
The current sampling rate (determined by the output module).
On Macintoshes, the symbol ? may also be used (Option-P).
The value of ? multiplied by 2. This is equivalent to exp(1).
The random number generator used is a fairly decent one, as described in Stephen K. Park and Keith W. Miller, "Random Number Generators: Good Ones Are Hard to Find", Communications of the ACM, vol. 31, p. 1192 (October 1988).3.2 Operators Back to Top + Addtion3.3 Functions Back to Top Syd has a fairly rich set of functions available -most of these were inherited from the expression parser that is used in my Image Processing software "Pixel Magic". This means that if you like playing with the Mandelbrot set, you can use it to generate sounds too. functions - basic math
& trig Back
to Top int(x) Convert to Integer
ftab(n,t) Access function table N (0+) at position T (0-1) These functions are used to access the tables which are created by the "FTAB" units. The basic ftab() function uses the value of T to access the values of Funtion Table #N. If T is less than 0 or greater than 1, then a value of 0.0 will be returned. Otherwise, the value of T (from 0 to 1) is used to access a value from the beginning to the end of the table.
These functions are typically used for converting a linear representation of pitch to oscillator frequency which is supposed to be expressed in cycles per second (which is logarithmic).functions - signal modifiers Back to Top These functions, which are borrowed from CSound, are useful for creating envelopes and otherwise modifying signals.functions - fractals and noise Back to Top mandel(x,y) Mandelbrot Set, level set method (also mand) manc(x,y) Mandelbrot Set, CPM methodfunctions - misc Back to Top cond(exp,a,b) if exp is non zero, a, otherwise, b.
File Back to Top New
UndoOptions Back to Top Log Show Memory
3/31/97 Version 0.9.9 Released to Public on 3/31/97 "as is" 9/27/97 Version 1.0 9/29/97 Version 1.0.1 10/3/96 Version 1.0.2 10/14/96 Version 1.0.3 10/16/96 Version 1.0.4 10/17/96 Version 1.0.5 10/29/96 Version 1.0.6 |