Kinds of Processing Classes: Generators, Sinks and Transforms

In the Kahn Process Network model of computation (see 1.5.1) two kinds of subgraphs are of special importance: data sources and data sinks [Parks, 1995]. In section 1.5.3 we also saw how the Data Flow Architecture pattern classified modules into sink, filters, and sources. In a similar way in DSPOOM we identify Generating Processing objects, which are data sources, and Sink Processing objects4.2. Figure 4.5 illustrates a CLAM system with such components.

We define a Generating Processing object as a Processing object that generates data but does not consume it. This means that a Generating Processing objects has no input ports. So, instead of transforming input data, what it does is to respond to the Do operation by generating data that is related to its internal state. In such objects, input controls play a very important role because they are the responsibles for changing the processing internal state and this way modify the data that is generated. Nevertheless this does not mean that if a generating object does not receive an input Control between two consecutive calls it will generate the exact same data. The object internal state may also respond to internally generated control data. An oscillator, for instance, will have an internal oscillating function or table so it will not generate the same samples in two consecutive calls. This behavior highlights the fact that generating objects can be used for converting an asynchronous data flow (usually coming from an external system or interface) into a synchronous one.

One special case of generating objects are the random generators. These generating objects are the exception to the rule in the sense that the output they generate does not respond to the internal state but rather to a randomized variable.

Sink objects are the opposite to generating objects: they consume data without generating any. Thus, they have input but not output ports. The basic responsibility of a sink object is usually taking internal data from our system and translating it to some other format to transmit it to another system or directly to the user. Examples of sink objects are visualizers, audio players or passivators.

On the other hand, regular DSPOOM Processing classes are just coupled to a single data type that is used both as input and output. Processing objects that have a different processing data type as input are called Transforms. Examples of such processing objects are an FFT (input is audio and output is a spectrum) or a Sinusoidal Synthesizer (input is an array of spectral peaks and output is a spectrum).

Figure 4.5: Generators and Sinks