Next: 2.4. PARIS
Back: 2.2. Concurrent Aggregates
Unlike CA, Occam [Whitby-Stevens] has already been used to build a sample generator. The Durham Music Technology group uses Occam to pr ogram a ring of Transputers for additive synthesis [Bowler et al]. Occam is a tightly constrained language, which allows Occam compilers to generate highly efficient code. The Durham group examined the output of their Occam compiler and concluded that han d-written assembly code wouldn't be any more efficient. Occam is attractive for sample generation because it provides efficient control of Transputers, which are inexpensive and easy to work with.
BinaryMixer::generateSamples
WHILE <noteDuration>
SEQ
PAR temp1 ? <subSound1> temp2 ? <subSound2> ENDPAR;
<superSound> ! (temp1 + temp2);
ENDSEQ
ENDWHILE
Oscil::generateSamples
WHILE <noteDuration>
SEQ
phase := (phase + phaseIncr) mod tableSize;
<superSound> ! table[phase];
ENDSEQ
ENDWHILE
Figure 3 - Occam-like code for simple Unit GeneratorsSince Occam programs must specify all their communication patterns at compile time, new unit generators cannot be created during a computation. The composer would have to specify the maximum nu mber of simultaneous instances of each timbre. The Occam program would statically allocate this many copies of each timbre and reuse them throughout the synthesis. When fewer copies of each timbre are required, the processors holding the extra copies would sit idle. Sample computation would basically be serialized within each unit generator (see Figure 3). The system would be driven by a Scheduler, which would extract synthesis parameters from a score or music keyboard. These parameters would be sent to t he unit generators, which would perform the synthesis.