Sig++ is a work in progress. Sig is a set of C++ classes for use in creating sound synthesis/filtering programs -- primarily for the uninterpreted elegant environment of a Unix command line.
Sig is somewhat similar to cmix, but is designed for use in a real program by someone who has already taken courses in C/C++ -- after the program is written and compiled using sig it should be general-user friendly (see example programs). Eventually I may write an interpreter script to combine signal generators and control them, or maybe not. Sig is also somewhat similar to Perry Cook's Synthesis Toolkit (STK). Another similar project is called spkit from the University of Helsinki Music Research Laboratory.
Computational efficiency is important, but perhaps not as much as readable code and generality. The end goal is for me to learn about implementing this sort of stuff, and also to generate nice simple powerful computer-music composition tools that can be used on any type of (Unix) computer as well as in larger programs such as this picture-to-sound converter. See clm if you can't wait around for something more encompassing. A longer-term goal is to have a self-contained sub-operating system for realtime music control which will be explained more later.
The paradigm for sig++ implementation is to imagine a flowgraph consisting of signal manipulators which are connected to each other to do something interesting. Sig is not graphical, unless someone else writes a graphical interface to do code generation, such as in SynthBuilder.
An example flowgraph could be the following:
The implementation in code of the preceding picture is rendered in the mix.cpp example program as:
leftScale1.connect(insound1); leftScale2.connect(insound2); leftDelay.connect(leftScale2); addLeft.connect(leftScale1); addLeft.connect(leftDelay); outsound.connect(addLeft); if (header.getChannels() == 2) { rightDelay.setDelay(offsetSamples); rightScale1.connect(insound1, 0, 1); rightScale2.connect(insound2, 0, 1); rightDelay.connect(rightScale2); addRight.connect(rightDelay); addRight.connect(rightScale1); outsound.connect(addRight); }
The round objects in the picture above are Signal Generators: objects which accept no input signal, but generate output signals. The rectangular objects in the picture above are Signal Filters: objects which accept both input and output signals. Signal Filters could be replace by Signal Generators by just not giving any inputs to a Signal Filter, but for pedagogical purposes, I split the Signal objects into those two general categories.
All Signal objects can have an arbitrary number of inputs (except Signal Generators, of course) and also an arbitrary number of inputs. In the picture above, the little numbers near the connections refer to the input/output channel that an object is receiving/sending a signal on. Inputs can be connected to outputs of other signals, or they can be set to fixed values. One major advantage of this setup is that input parameters can be either fixed at a constant value, or can be varied in time. See for example the resonator.cpp example program which uses the Resonator class and which can create neat time-varying filtering effects on soundfiles/whitenoise (resonator sound [.au | .wav]).
Signals traveling between signal filters are in floating point (doubles), and must be normalized between +/- 1.0 for saving to output soundfiles (for now).
Sig is designed to be generalized C++ code as much as possible so that it will port easily to any computer with a C++ compiler with slight modifications only for hardware IO (today, we are in the Dark Ages of sound IO). Currently, sig is working and being tested in these operating systems (see downloads):
The classes for sig++ are grouped into sublibraries which organize classes with similar functions. Also, there are two sublibraries called improv and museinfo which are self-contained subsets of the sig library. The classes for sig++ are described here.
Example programs which use the library classes above are organized by one of the three complete libraries:
Bugs? None. Just lots and lots of features -- actually works very reliably for me, the person who wrote it. Of course, whenever I add something new, it might break something else, but that's what Object-Oriented coding is supposed to prevent.
Recent/Future developments in semi-chronological order:
Here's an interesting statistic: there are 61,838 lines of code in the sig library on 14 April 2000 plus 22,860 lines of example programs.
What? You're still reading this page? Perhaps you might be interested in implementing your own programming system. It's the best way to learn about this stuff but it can be tedious. Here are references to many books and resources which I have consulted in writing the sig++ class set.
You might like to see some other stuff I have done with Mathematica and Computer Music, but it is all theoretical and no sound implementations of anything -- just graphical visualizations for DSP concepts. It is called the SCMP.
Craig Stuart Sapp
craig@ccrma.stanford.edu