Previous: Kiwi User's Manual Up: Kiwi : A Parallel System for Software Sound Synthesis Next: Building an Orchestra

Object-Oriented Programming and Timbre Definition

Unlike previous software synthesizers, Kiwi uses an object-oriented language called C++. C++ is easy to work with because it uses the familiar C syntax while providing object-oriented features that make programming easier.

The view of a timbre definition as a relationship between objects can be traced back to the first analog synthesizers, where a timbre was specified by connecting objects like oscillators and filters with patch cords. Kiwi models this framework by replacing the hardware modules (oscillators and filters) with C++ objects.

Object-oriented languages work by passing messages from one object to another. In C++ these messages are called member functions. All the Kiwi Sound objects have a next_sample member function which computes the next sample for that particular sound. A particular object's sound may depend only on internal parameters (like an oscillator), or it may depend on other objects (like the source for a filter). In the latter case, an object may call the next_sample member function for its source, and then use that sample to compute its own next sample. In this way Sound objects are arranged in a tree. The next_sample messages flow down the tree while the samples flow up until the sample corresponding to the entire timbre pops out at the root of the tree.


[Bill's Home Page] Comments to walker@shout.net