Tools for Sound Processing
post-processing unit
The reader can notice how, within the parentheses that follow the instrument
name (sweep), there are mandatory parameters, such as the file to be read,
and optional parameters, such as duration, ampscl, and freq-env. For the
optional parameters a default value is given. It is interesting how several kinds of
objects can be used as parameters, namely strings (file), numbers (duration,
ampscl), or envelopes with an arbitrary number of segments (freq-env).
The intermediate code section contains various definitions of variables and
objects used by the instrument. In this section envelopes and UGs are prepared
to act as desired. The Run section contains a loop that is iterated for a number
of times equal to the samples to be produced. This loop contains the signal
processing kernel. The read at increasing pace is performed by the UG resample,
whose reading step is governed by the envelope passed as a parameter. The last
code line sends the signal to the post-processing unit reverb, when that is
present. In our example, the post-processing unit is a second instrument, called
(definstrument eco
(startime dur &optional (volume 1.0) (length 0.1))
(let* (
(d1 (make-zdelay (* sampling-rate length)))
(vol volume)
(beg 0)
(end (+ beg (floor (* dur sampling-rate)))))
(loop for i from beg to end do
(outa i
(* vol (zdelay d1 (revin i))))
The eco instrument will have to be compiled and loaded as well. After, the
entire processing will be activated by
(with-sound (:reverb eco :reverb-data(1.0 0.1))
(sweep "march.wav" :duration 25 :freq-env '(0 0.0 100 1.0)))
The macro with-sound operates a clear distinction between sound produc-
tion and modification, as any kind of modification is considered as a reverb.
The three sound-processing examples written in CSound, CLM, and SAOL
produce almost identical results
. The resulting sound waveshape and its sono-
gram are depicted in fig. 3. This figures has been obtained by means of the
analysis program snd, a companion program of CLM (see section B.4). From
the sonogram we can visually verify that the audio file is read at increasing
speed and that such read does not contain discontinuities.
Interactive Graphical Building Environments
In recent times, several software packages have been written to ease the task
of designing sound synthesis and processing algorithms. Such packages make
extensive use of graphical metaphors and object abstraction reducing the pro-
cessing flow to a number of small boxes with zero, one or more audio/control
Subtle differences are possible due to the diversity of implementation of the UGs.
Next Page >>
<< Previous Page
Back to the Table of Contents