CLAM as an Object-Oriented Framework

CLAM is both a black-box and white-box framework (see section 1.3.3 for a definition of these terms). But as already mentioned, this is a common property of all software frameworks. It is a black-box framework in the sense that already built-in components can be connected with minimum programmer-effort in order to build new applications. And it is white-box in the sense that abstract classes can be derived in order to extend the framework components with new processes or data containers.

CLAM is a framework for audio and music programming. It offers a general infrastructure that can be used for any signal processing application. But the ready-to-use components and tools focus on the music and audio domain.

The framework can be used to construct general audio or music applications for end-users or artists. But its main focus in on developing prototype applications for research purposes. CLAM can be used as a framework for rapid prototyping, testing new algorithms or ideas and general research on the music and audio field.

The framework is truly object-oriented and its design promotes and to some extent ensures modularity, re-usability, separation of aspects, and conceptual encapsulation. It is important to note that targeted users of the framework are mainly signal processing engineers that may not have acquired good programming and design practices before they are exposed to the framework. A lot of care has been put in enforcing these good practices and ensuring that the framework, when used as white-box, is extended without violating its philosophy. For example, data classes are declared using a mechanism called Dynamic Types (see 3.2.2). For declaring a member attribute in a Dynamic Type, a set of special macros must be used. These macros (apart from doing much more interesting things that will later be explained) expand a private attribute and GetX()-SetX() accessors with a user-defined visibility.

Apart from the object-oriented metamodel, or rather as a consequence of, CLAM presents and enforces a particular graphical Model of Computation. The CLAM MoC helps engineers in modeling signal processing systems and as a consequence has immediate benefits on both the analysis of the system itself as its design and implementation. Both the object-oriented model and the MoC derived from CLAM will be introduced in the next chapter.

As already mentioned, CLAM is implemented in C++. This allows for the design of very demanding or time-critical applications. Several real-time applications such as a vocal processor with spectral analysis/synthesis or a sax synthesizer have implemented in the framework. In these cases implementations based on the framework have proven to be even more efficient than the original implementations.

CLAM is also completely cross-platform and portable. A CLAM application developed in GNU/Linux is immediately portable to Microsoft Windows and Mac OSX. Even system-level primitives such as access to sound devices or multi-threading handling are encapsulated in such a way that the target operating system is transparent to the user.

The framework is also completely Free Software (as for the definition given by the Free Software Foundation [Free Software Foundation, ]) and licensed under the GPL. Thus it can be used under no restriction as long as the resulting application remains Free. Access is therefore granted to the source code and the knowledge accumulated during the framework design process is transmitted and reused without restriction.

2004-10-18