Note: All slope values above are calculated when the corresponding setter methods in the API are called. See the file
EnvelopeGenerator.java or the javadocs for the details.
Electronic Music Components in Action
softsynth.jar (see Resources) contains all of the code from this article series and is made available for demonstration purposes. Using this code you can listen to the following examples of our electronic music components in action.
To hear any of these examples, execute the following command in a shell:
java -jar softsynth.jar X
X is the example number (1 – 11) from Table 1 that you want to listen to. Of course, you must have the Java runtime environment installed on your computer for this to work. Unjar the jar file if you want to get at the source code or javadocs.
In this article, I talked about waveform generation and its relationship to subtractive synthesis and then described how to build two types of oscillators. Envelope generators were then presented and some discussion was provided on how they work. Finally, we provided a means to listen to our electronic music components in operation.
In the next article we will talk about VCA's, VCF's and a simple music player and how these components fit into the electronic music architecture we have presented.
The code for the complete article series can be downloaded here. Source code, javadocs, and executable code are all in this JAR file. Feel free to use the code for any uses you see fit. Let me know of any unique projects you come up with based on this code.
The following books contain valuable information on electronic music production and digital signal processing. Of course the Internet is an amazing source of information as well.
- Computer Music: Synthesis, Composition and Performance, Charles Dodge, Thomas A. Jerse, 1985, 1997. Schirmer Books.
- Elements of Computer Music, F. Richard Moore, 1990, Prentice-Hall.
- A Programmers Guide To Sound, Tim Kientzle, 1998, Addison-Wesley.
- Digital Audio with Java, Craig A. Lindley, 2000, Prentice-Hall.
- PSynth – An iPhone/iPod Touch synthesizer app available from iTunes.
Craig Lindley is a hardware engineer who, until recently, had been writing large-scale Java applications. He is the author of Digital Audio with Java from Prentice-Hall.