Introduction
This page provides a description of the functions provided by BControllable nodes, in
the BeOSr5 MediaKit. It is written with a view to how this functionality will be provided
(and any changes/extensions that should occur) in the OpenBeOS MediaKit.
Overview
When a MediaKit developer does want to provide an interface to their node, there are several
ways of doing so. One is to provide a traditional UI based on the InterfaceKit - such as you
would when writing a normal application.
The alternative is to derive the node from BControllable, and utilise the MediaKit's existing
functionality to provide extensive control over the nodes parameters.
BControllable nodes never create an interface directly - rather they publish a list of parameters,
their connections, and how they are grouped - this collected description of the objects parameters
is called a 'ParameterWeb'.
Most users will experience a representation of this ParameterWeb, as provided through a
Theme. MediaThemes parse the ParameterWeb, and
return a BView containing the necessary information and controls.
The audio mixer in BeOS r5 is a good example of this - the media preferences panel does not
create the interface itself, but rather obtains it from the default sytem MediaTheme.
It is also possible for developers to access a ParameterWeb directly through the MediaRoster.
Please see the quickmute sourcecode for a simple example of
how to do this.
On closer inspection...
Typically, a ParameterWeb will have one or more BParameterGroups, and at least one
BParameter.
BParameterGroups provide containers for you to arrange your parameters - they are used
by the selected MediaTheme to determine which controls should be displayed together -
parameters affecting a certain aspect of your node (a particular channel or component)
should belong to the same BParameterGroup.
There are currently 3 types of BParameters - BNullParameter, BContinuousParameter, and
BDiscreteParameter.
- BNullParameter
These parameters will never directly affect the functionality of a
node - rather they are used to represent junctions in signal-flow, so that MediaThemes
can accurately represent the path of a signal within the node.
- BContinuousParameter
These parameters have a 'continuous' value - that is, any
value within a certain range is valid. Typically they are used for controls like volume,
balance, and synthesis parameters like filter cutoff, envelope levels etc
- BDiscreteParameter
Discrete parameters have a value representing a particular, discrete selection from a
finite range of options. The most simple example is an on/off switch like a
mute control, but discrete parameters can also represent things like i/o mux
selectors, colourspaces, or any other "item from a list" type controls.
Consult your BeBook for more information.
OpenBeOS Specific
DavidShipman