Developer Guide - Generators, Components and Controls

(Relevant reading: generator.h, component.h, and control.h)

Generators

Generators are the primitive components of the system that actually do all the work. They receive events, send events, and send processed audio forward through the mesh.

Generators do not have a user-interface - they are pure "model", in the MVC sense. Components provide an abstract "view" for Generators and other visible components. The file gencomp.c provides a concrete "view" (and "controller") class for manipulating Generators.

Components

Components are the visible elements that the user places on the worksheet and manipulates with the mouse when building a mesh. Note that Components are not tied to representing Generators - in future, there will be a Component for allowing links to "bend around corners" - but that the only concrete implementation of a Component class at the moment is provided by gencomp.c, the Component class for Generators.

Controls

Controls are the user interface elements that allow the user to change Generator parameters and send AEvents through the system. There are four predefined kinds of Control, and programmers have the option of implementing their own (eg. trigseq.c, patsel.c):

  • CONTROL_KIND_SLIDER - for a vertical slider
  • CONTROL_KIND_KNOB - for a rotary knob/dial
  • CONTROL_KIND_TOGGLE - for a two-state button (on/off)
  • CONTROL_KIND_BUTTON - for a one-shot button
  • CONTROL_KIND_USERDEF - for when a custom control is needed

Next Section