Within the application, each data point that is to be rendered is mapped to a parameter within a sound synthesis algorithm. Such an algorithm is encapsulated in a synthesis class residing within AREAL. A sound synthesis parameter is used to control some aspect of the synthesis algorithm. In a relatively simple case, such a parameter could control the frequency of a single sine tone, while another could control its amplitude. In more complicated cases, such a parameter might control some aspect of a more elaborate synthesis algorithm.
In an effort at a clear explication of how this works, a simple example is provided. In this example, we start with a data set that contains two variables, x and y, which describe a Cartesian graph. We select a simple additive synthesis algorithm which is defined by 3 parameters: frequency (F), amplitude (A), and number partials (T). Within the application (with which the AREAL library has been linked), first a range is defined for each synthesis parameter. In our example, F will have the range [100Hz, 1100Hz], A will have the range [10000, 20000], and T will have the range [0 partials, 20 partials].
After ranges have been defined for each synthesis parameter, a single C-language function call is made to set the mapping between these data points and synthesis parameters:
SetMapping(hSynthObj,"F=(x,10,40); A=.3*(x,10,40)+.7*(y,.03,-.03); T=(y,.1, .9)");
SetMapping() has two arguments: a pointer (handle) to the synthesis object (which has been previously defined within the application), and a string which specifies the mapping between application data points and synthesis parameters. This string is parsed within the AREAL library in order to realize the specified mapping. In the above example, the two data points are mapped to the three synthesis parameters as follows. All synthesis parameters in the mapping are normalized to the range [0,1] relative to the range set earlier in the program. F is a direct linear mapping from data point x: as x increases from 10 to 40, F increases from 0 to 1. A is a weighted sum of data points x and y, 30% and 70% respectively, with x traversing the domain (10, 40) and y traversing the domain (0.03, -0.03). So, for instance, if x=25 and y=0.0, then A would have a normalized value of (.399=(.3 * .33)+(.7*.5)). Meanwhile T maps directly to data point y with the domain (.1, .9).
Such a mapping is specified once within the application. After
this, whenever the state of one of the data points is changed a call is
made to the AREAL API to inform it of this change in state:
...
x = getXValue();
SetParmValue(hSynthObj,"x", x);
...
Given a sequence of states for x and y, a correlated sequence of parameter states is generated within the synthesis algorithm. Such a situation is shown in figure 3, in which a sequence of 5 states for x and y is correlated to a similar sequence for synthesis parameters F, A, and T. These synthesis parameters are in turn mapped against the range with respect to which they have been defined for this application. The values for the synthesis parameters thus realized are shown in figure 4. As can be observed, this sequence defines an acoustical behavior in which frequency rises from 100 to 370 Hz, while amplitude drops from 17000 to 15400 and the number of partials goes from 5 to 0 partials. The resultant behavior defines an acoustical "gesture" which, while rising in pitch, descends in loudness and in timbral richness. This "gesture" constitutes a potentially informative and evocative representation of the data it renders in which x rises continuously while y descends somewhat sharply before coming back up again slightly.
