Chapter 5. Music Synthesis and Processing

Table of Contents
Music Synthesis and Processing
The MKOrchestra Class
Interactivity versus Dependability
Sharing Allocations
MKOrchestra's Device Status
MKOrchestra Output
Using the DSP Serial Port
The MusicKit MKSynthPatch Subclasses
Pluck
Wavetable Synthesis
Frequency Modulation
Waveshaping Synthesis
Building a MKSynthPatch
A Simple MKSynthPatch
A Better MKSynthPatch
Adding a MKWaveTable
Doing Real-time Sound Processing
Creating a MKUnitGenerator Subclass
Using dspwrap
Modifying the Class

Music Synthesis and Processing

In this document “synthesis” refers to creating sound from scratch, while “processing” refers to modifying sound from elsewhere. However, the MusicKit provides a unified model of synthesis and processing. Thus, nearly all operations that apply to synthesis can also be used in sound processing.

There are four levels of MusicKit classes involved in synthesizing and processing music on the DSP:

Figure 5-1. Synthesis classes

The MKSynthInstrument class is described in Chapter 6. The rest of this chapter is devoted to the other classes listed above.