Introduction to the Evolutif Audio Library
Overview
Evolutif is a cross-platform open source audio library designed for professional quality audio processing applications.
It allows you to construct a framework for audio input, synthesis, processing and output by creating objects and
connecting the output of those that can supply data (source lines) to those that can receive data (target lines). The
classes that implement this functionality are EvoSourceLine and EvoTargetLine, respectively. Any class that
can supply one or more channels of audio data to other objects must inherit EvoSourceLine and any class that can
recieve one or more channels of audio data from other objects must inherit EvoTargetLine. Classes can also inherit
both EvoSourceLine and EvoTargetLine which means they can recieve data, process it in some way, and output the
resulting data to other objects. You can think of objects of this type as digital signal processors with some number of inputs
and some number of outputs.
Connecting Source Lines and Target Lines
You can connect a source line to a target line by calling the target line's connect() function with a pointer to the desired
source line object. You must also specify which source line and target line channels to connect. The prototype for the
connect() function is:
virtual bool connect(EvoSourceLine *s, int sourceChannel, int targetChannel);
The channel numbers range from 0 to numChannels-1. For example, if you have a source line that supplies 2 channels
(stereo) and a target line that can recieve 2 channels you can connect them by calling connect for each channel:
targetLineObj.connect(&sourceLineObj, 0, 0); // connect the left channels
targetLineObj.connect(&sourceLineObj, 1, 1); // connect the right channels
Alternately, you could reverse the channels:
targetLineObj.connect(&sourceLineObj, 1, 0); // source right -> target left
targetLineObj.connect(&sourceLineObj, 0, 1); // source left -> target right
Classes that inherit EvoSourceLine include EvoInputDevice and EvoAudioBuffer. An EvoInputDevice object can collect
data from an input device on the system such as a microphone or line input. An EvoAudioBuffer can store audio data
in memory (usually loaded from a file on disk) and perform various operations on it such as converting the number
of channels, changing the sampling rate, etc.
Classes that inherit EvoTargetLine include EvoOutputDevice and EvoFileRenderer (a subclass of EvoOutputDevice). An
EvoOutputDevice object sends data to the system sound driver via PortAudio for playback. An EvoFileRenderer object
collects a specified number of frames of audio data and writes them to a file on disk.
Classes that inherit both EvoSourceLine and EvoTargetLine include EvoMixer and EvoEffect. An EvoMixer object is similar
to a physical audio mixing board. It can have an arbitrary number of source lines connected to it, each with their own
volume control. An EvoEffect object is a generalized digital signal processor that can manipulate the audio signal in
some way.
The EvoAudioManager class
Before you can begin any playback you need to select an appropriate output device. This is done through an EvoAudioManager
object. When you create an audio manager object, it automatically creates an output device object using the default
output device ID supplied by PortAudio. You can query the audio manager to find out what other output devices are avaiable
on the system by calling queryDevices(). This function returns a list of pointers to PaDeviceInfo structures. You can then
iterate through this list to select an appropriate output device and obtain it's device ID. After you have the device's ID
you can create an output device object and activate it by calling the audio manager's setActiveOutputDevice() function.
Your program should have only one EvoAudioManager object.
|