Use the above button to bring up a synthesizer window. You may need to wait while it loads if you have a slow connection. Note that, when running as an applet, you cannot save your work (to do that, download the distribution at the bottom of this page and run it locally). You can, however load the examples (see the end of the tutorial). I'd recommend that you use MS Internet Explorer 3.x as your browser; it is much faster than Netscape.
This Java program can be used to generate sounds. You design the sound by putting together basic building blocks (generators): oscillators, envelopes, adders, etc. Once the design is done, you instruct the program to generate the sound (which can take some time, depending on the complexity of the sound).
The most important building block is the oscillator. The oscillator generates a basic wave pattern, such as a sin wave, triangle wave, square wave, sawtooth wave, or a custom wave which could be generated by another program or sampled from the real world. To create an oscillator, select Oscillator from the Generators menu. Then, click the mouse where you want to place it. Once it is placed, the properties dialog box will automatically come up. Here you can select the wave type (for now, leave it as sin) and then click Okay. If you want to access the properties again later, double click on the oscillator.
An oscillator on its own isn't very useful; you need some way to tell it how loud to be, and which frequency to play. The three circles inside the oscillator, labeled `freq', `phase', and `amp', are the inputs accepted by an oscillator. You can feed the output of another generator into each one of these inputs. Lets give this oscillator a frequency of 110hz, and an amplitude of 1.0. Select Constant from the Generators menu, and click where you want it to be placed (a good place is just above and to the left of the oscillator). As before, the properties dialog box will pop up, allowing you to select the value of this constant. Type in 110, and click Okay. Now you have two generators, but you still need a way to hook the output of the constant to the frequency input of the oscillator. This is done by dragging from the center of the constant to the `freq' input of the oscillator. Now crate another constant of value 1.0, and hook it to the `amp' input. The phase input of the oscillator is optional. You could also hook the output of a non-constant generator to any of these inputs. For example, it is very useful to connect the output of an envelope generator to the amplitude input.
Now we have designed a very simple sound: a 110hz pure tone. All that's left is to have the program generate the waveform. But first, we need to tell it which generator to use as the final output. This is done by selecting Output from the Generators menu. You place this as before, and hook the output of the Oscillator to its only input. Now, select Synthesize from the File menu (or click Synthesize in the button bar). Once this is complete, a new window appears which contains the waveform. Click on the Play button to hear what it sounds like.
This concludes this short tutorial. There are a few examples available for you to load. You can see these by selecting File|Open and entering one of these URLs:
To select a generator, click on it. All others will be unselected.
To toggle selection of a generator, click it with the middle button
or ctrl-click it.
To unselect all generators, click on the canvas
To select all generators bounded by a rectangle, drag on the canvas
To move a generator, drag in its border
If you drag in the border of a selected generator, all selected generators will be moved.
You can move the entire contents of the window (if all the generators don't fit) by dragging with the right button (or holding down you Meta key if you only have one button).
You connect two generators by dragging from the center of the source to an input of the destination.
Double click on a generator to bring up its properties, if any.
This has been developed as a project for the Music 207 (Music, Technology, and Computers) course at the University of Victoria.
If you want to be able to load and save files, you will need to run this as an application on your computer. The source code is also available. Get the distribution in .zip format or as a tarball here:
There are many known problems, most of which there isn't much I can do about. There are lots of different implementations of the Java runtime, and they all seem to have their own problems (mostly with the AWT windowing library). Here are the platforms I've tried this on, and some observations about each one. If anyone has suggestions or knows workarounds, please contact me.
The sound output quality is really poor. There's nothing I can do about it. Java can only play 8khz µ-law audio. If you want to hear the sound properly, save the sound to a .WAV file and use another program to play it.
If you have any problems or notice any bugs (of which I'm sure there are plenty), don't hesitate to contact me. I'm also looking for as many reports of how this works under different platforms, so please e-mail me if you use a system not on the above list (especially if it's Linux or MacOS). Also talk to me if you want to add a new type of generator but aren't sure how (or if you have created a new type of generator, I'd love to see it).
You can contact me by e-mail at <email@example.com>
My homepage is at http://zerius.victoria.bc.ca/~manny/