Appart from the previous tutorial the CLAM repository also
includes some examples in order to show how can you do the basic
operations with CLAM: loading audio files, playing sounds, using
Processing class... This is the list of related examples, each
one of them fully detailed with comments.
-
Audio file Reading example
- Makefile / Visual C++ project location:
- build/Examples/Simple/AudioFileReading/
- Sources location:
- examples/AudioFileReading_example.cxx
- Complexity:
- Low/Medium
- Keywords:
- Audio file I/O,
Processing usage
- Pre-requisites:
- Knowledge about basic
Processing usage.
- Description:
- Shows how to load an
arbitrarily formatted audio file using CLAM
utilities.
-
Audio file Writing example
- Makefile / Visual C++ project location:
- build/Examples/Simple/AudioFileWriting/
- Sources location:
- examples/AudioFileWriting_example.cxx
- Complexity:
- Low/Medium
- Keywords:
- Audio file I/O,
Processing usage
- Pre-requisites:
- Knowledge about basic
Processing usage.
- Description:
- Shows how to save an
arbitrarily formatted audio file using CLAM
utilities.
-
Frequency domain filter usage example
- Makefile / Visual C++ project location:
- build/Examples/Simple/FDFilter
- Sources location:
- examples/FDFilterExample.cxx
- Complexity:
- Low
- Keywords:
- Processing usage, Digital
Signal Processing, Frequency Domain.
- Pre-requisites:
- Knowledge about basic
Processing usage.
- Description:
- Shows how to configure
and use the FDFilterGen Processing
object.
-
FFT ( fftw implementation ) usage example
- Makefile / Visual C++ project location:
- build/Examples/Simple/FFT
- Sources location:
- examples/FFT_example.cxx
- Complexity:
- Low
- Keywords:
- FFT, Digital Signal
Processing, Spectrum usage, XML, Persistent
objects.
- Pre-requisites:
- Basic knowledge of
Processing interface.
- Description:
- Shows how to obtain the
real Fourier transform of a given audio signal. Also
shows how to store a CLAM object i.e. obtain a
persistent copy.
-
Descriptor Computation Example
- Makefile / Visual C++ project location:
- build/Examples/Simple/DescriptorsComputation
- Sources location:
- examples/DescriptorComputation_example.cxx
- Complexity:
- Medium
- Keywords:
- Descriptors, Feature
Extraction, Statistics
- Pre-requisites:
- Previous knowledge on
CLAM Processing classes and the Processing Data classes
included in the repository.
- Description:
- A Descriptor is a special
data Container that holds the result of applying
statistical computations to an existing Processing
Data. In this example the basic functionality of
descriptors and statistics is shown. Descriptors are
finally dumped into XML.
-
Processing Life Cycle example
- Makefile / Visual C++ project location:
- build/Examples/Simple/ProcessingLifeCycle
- Sources location:
- examples/ProcessingLifeCycle_example.cxx
- Complexity:
- Medium
- Keywords:
- Extending Processing
abstract class, Processing life cycle.
- Pre-requisites:
- Knows about CLAM Dynamic
Types.
- Description:
- Shows how write a new
CLAM::Processing. Tries to give some insight into
Processing life cycle - start, Configure(), Start(),
Stop(), -etc.
-
Object persistence through Dynamic Types
- Makefile / Visual C++ project location:
- build/Examples/Simple/PersistenceThroughDTs
- Sources location:
- examples/PersistenceThroughDTs_example.cxx
- Complexity:
- Medium
- Keywords:
- Object persistence, XML
processing, XML Schema, Dynamic Types.
- Pre-requisites:
- Knowledge of
DynamicType's API, Knowledge of XML and XML Schema
standards.
- Description:
- This example shows how to
obtain a persistent copy of an object, encoded as a
well-formed, valid, XML document.
-
Visualization Module Plots: single function plot
- Makefile / Visual C++ project location:
- build/Examples/Simple/SinglePlot_1
- Sources location:
- examples/SinglePlot_example.cxx
- Complexity:
- Low
- Keywords:
- CLAM GUI services, simple
data visualization.
- Pre-requisites:
- Familiarity with
CLAM::Array and CLAM::BPF.
- Description:
- This example shows how to
plot on the screen some data object part of a simple
DSP application.
-
Visualization Module Plots: multiple function plot
- Makefile / Visual C++ project location:
- build/Examples/Simples/MultiPlot
- Sources location:
- examples/MultiPlot_example.cxx
- Complexity:
- Low
- Keywords:
- CLAM GUI services, simple
data visualization.
- Pre-requisites:
- Familiarity with
CLAM::Array and CLAM::BPF. It is recommended to take a
look first on the single function plotting
example.
- Description:
- This example shows how to
plot on the screen some data object part of a
CLAM-based DSP application, as well as combining
several functions in the same plot
window.
-
LPC usage example
- Makefile / Visual C++ project location:
- build/Examples/LPC
- Sources location:
- examples/LPCAnalysis_example.cxx
- Complexity:
- Medium
- Keywords:
- Linear Prediction Coding,
Fourier Transform, multiple function
plotting.
- Pre-requisites:
- Notions of DSP analysis
techniques.
- Description:
- This example shows how to
analyze a given audio signal using the LPC and
associated ProcessingData's. Also shows to compare the
approximation achieved by the LPC algorithm, and the
one achieved by Fourier Transform.
-
A simple threaded speech analysis application
- Makefile / Visual C++ project location:
- build/Examples/Simple/ThreadedProcessing
- Sources location:
- example/ThreadedProcessing_example.cxx
- Complexity:
- Medium
- Keywords:
- Concurrent programming,
threads, GUI
- Pre-requisites:
- Notions about concurrent
programming issues, some background in signal
processing, some familiarity with most usual CLAM
objects ( Processings, etc.)
- Description:
- Unfinished example -
growing overly complex.
-
Playing a WAVE file
- Makefile / Visual C++ project location:
- build/Examples/Simple/FilePlayback
- Sources location:
- examples/FilePlayback_example.cxx
- Complexity:
- Low
- Keywords:
- Audio device
I/O
- Pre-requisites:
- Minimum familiarity with
CLAM objects such as Processing and
ProcessingData.
- Description:
- This examples shows how
to load a WAVE file and play it with your
soundcard.
-
SDIF I/O, Segments and plots
- Makefile / Visual C++ project location:
- build/Examples/Simple/SDIF_And_Segment
- Sources location:
- examples/SDIF_And_Segment_example.cxx
- Complexity:
- Medium
- Keywords:
- DIF, CLAM Segment, SMS
Synthesis process, Audio Device I/O.
- Pre-requisites:
- Basic knowledge of
Processing objects interface, basic knowledge of SMS
Analysis algorithm byproducts.
- Description:
- Shows how to restore a
CLAM::Segment object stored into a SDIF file, and
inspect visually its contents.
-
Using CLAM Networks
- Makefile / Visual C++ project location:
- build/Examples/Simple/NetworkUsage
- Sources location:
- examples/NetworkUsage_example.cxx
- Complexity:
- Low
- Keywords:
- CLAM Network, Flow
Control, Supervised Mode.
- Pre-requisites:
- Knowledge of Processing
objects interface.
- Description:
- Shows how to use the CLAM
Network Processing interface to create and connect
easily CLAM Processings.
-
Storing and loading CLAM Networks
- Makefile / Visual C++ project location:
- build/Examples/Simple/NetworkPersistence
- Sources location:
- examples/NetworkPersistence_example.cxx
- Complexity:
- Medium
- Keywords:
- CLAM Network, Flow
Control, Supervised Mode, Serialization, Audio File
I/O, Audio Device I/O
- Pre-requisites:
- Basic knowledge of
Processing objects interface, basic knowledge of
serialization module, knowledge about using CLAM
Processing Networks.
- Description:
- Shows how to store a
CLAM::Network to a xml file, restoring its definition
to another network. It show how to load and store audio
files and play them, too.
-
How to create and use a Processing with Controls
- Makefile / Visual C++ project location:
- build/Examples/Simple/Controls
- Sources location:
- examples/ProcessingObject_controls_example.cxx
- Complexity:
- Medium
- Keywords:
- Processing,
Controls
- Pre-requisites:
- Knowledge of Processing
objects interface and some previous reading on what
CLAM controls are and how they are supposed to
behave.
- Description:
- A Processing class with
different kinds of input and output controls is
declared. Then it is used by illustrating how controls
are connected, modified and read.
-
How to create a Processing with Ports and Controls and use
it
- Makefile / Visual C++ project location:
- build/Examples/Simple/PortsAndControlUsage
- Sources location:
- examples/PortsAndControlUsageExample/
- Complexity:
- High
- Keywords:
- Flow Control, Audio
Device I/O, Extending Processing abstract class,
Processing life cycle, Ports, Controls,
Nodes
- Pre-requisites:
- Advanced knowledge of
Processing objects interface, knowledge of flow control
and nodes system.
- Description:
- Shows how to create a
custom processing class with ports and controls
interface, in order to use it with another processings
creating an small processing chain.
-
Creating and using a CLAM Composite Processing
Object
- Makefile / Visual C++ project location:
- build/Examples/Simple/POComposite
- Sources location:
- examples/POCompositeExample.cxx
- Complexity:
- Medium
- Keywords:
- Composite,
Children
- Pre-requisites:
- Good knowledge of
Processing classes and their whole
interface.
- Description:
- This example illustrates
how to create a static composition of Processing
objects using the Processing Composite construction
available in CLAM. A "big" Processing class is declared
by composing with basic Processing classes. Then this
class is used to show how it interfaces and
behaves.
-
Creating a Basic Audio Application using the CLAM
Application classes
- Makefile / Visual C++ project location:
- build/Examples/Simple/AudioApplication
- Sources location:
- examples/AudioApplicationExample.cxx
- Complexity:
- Low
- Keywords:
- Audio I/O, Application,
Oscillators
- Pre-requisites:
- Basic knowledge of
Processing objects interface and audio IO in
CLAM
- Description:
- Shows how to develop a
basic audio application using the CLAM application
classes. For doing so a basic Oscillator is used and
its output is sent to the soundcard.
-
Converting a MIDI file into an XML Melody
- Makefile / Visual C++ project location:
- build/Examples/Simple/MIDI2XML
- Sources location:
- examples/MIDI2XMLExample.cxx
- Complexity:
- High
- Keywords:
- MIDI, XML, Data,
Controls
- Pre-requisites:
- This example may be used
as is without not much previous knowledge. But in order
to understand its internals a good knowledge on CLAM
Processing classes, including controls and ports, is
necessary. Prior basic knowledge on the MIDI protocol
is also necessary.
- Description:
- This examples batch
processes all the .mid files contained in a given
folder (and subfolders recursively) and converts them
into xml files. In order to do the input MIDI controls
are converted to data and then dumped into XML using
CLAM infrastructure. This example was implemented after
a question posted to the MIR (Music Information
Retrieval) mailing list.
-
Creating a MIDI Synthesizer
- Makefile / Visual C++ project location:
- build/Examples/MIDISynthesizer
- Sources location:
- examples/MIDI_Synthesizer_Example.cxx
- Complexity:
- High
- Keywords:
- MIDI, Synthesizer,
Instrument, Controls
- Pre-requisites:
- Previous knowledge on
MIDI and additive synthesis may help. Previous
knowledge on CLAM Processing classes and Controls is
also required.
- Description:
- This example implements a
basic additive synthesizer with ADSR control. The
synthesizer is controlled from incoming MIDI
messages.
-
Inputing and outputing MIDI messages
- Makefile / Visual C++ project location:
- build/Examples/Simple/MIDIIO
- Sources location:
- examples/MIDIIOExample.cxx
- Complexity:
- Medium
- Keywords:
- MIDI,
Controls
- Pre-requisites:
- Previous knowledge on the
MIDI protocol may help but is not strictly necessary.
Some prior knowledge on CLAM Processing classes and
controls is required.
- Description:
- A basic input MIDI stream
is opened and the input events are sent on the
output.
-
Implementing a spectral analysis
- Makefile / Visual C++ project location:
- build/Examples/Simple/SpectralAnalysis
- Sources location:
- examples/SpectralAnalysis_example.cxx
- Complexity:
- High
- Keywords:
- Spectral Analysis, FFT,
spectrum, Composite
- Pre-requisites:
- Previous knowledge on the
basic concepts in the framework (Processing objects,
Processing Data objects...) from a user's perspective.
Some previous knowledge on signal processing might also
help.
- Description:
- A spectral analysis
scheme is implemented. This schem is based on the STFT
and includes windowing, overlapping and zero padding.As
a matter of fact this example includes much of the
functionality in the SMSTools, but it is more isolated
and therefore easy to read/understand
-
Implementing a spectral peak detection algorithm
- Makefile / Visual C++ project location:
- build/Examples/Simple/SpectralPeakDetect
- Sources location:
- examples/SpectralPeakDetect_example.cxx
- Complexity:
- Medium
- Keywords:
- Spectral Analysis,
spectrum, Spectral Peaks, Composite
- Pre-requisites:
- Previous knowledge on the
basic concepts in the framework (Processing objects,
Processing Data objects...) from a user's perspective.
Some previous knowledge on signal processing might also
help. As a matter of fact, before reading this example
it is recommended that you first understand the
previous Spectral Analysis example.
- Description:
- Using the output from a
previously performed spectral analysis, the peak
detection algorithm in the CLAM repository is used in
order to find the most prominent peaks in the
spectrum.
-
Using the Spectrum class
- Makefile / Visual C++ project location:
- build/Examples/Simple/Spectrum
- Sources location:
- examples/Spectrum_example.cxx
- Complexity:
- Medium
- Keywords:
- Spectrum, ProcessingData,
Dynamic Types
- Pre-requisites:
- Previous knowledge and
experience with Dynamic Types and basic Processing Data
classes is recommended.
- Description:
- The Spectrum class is the
most complex Processing class in CLAM and this example
gives a thorough insight on its interface and
usage.