The SndObj Sound Object Library Page
Welcome to the Sound Object Library resource page. Here you
you will find everything about the SndObj Library:
source code, documentation, programs, etc.. As usual, you can
send me an e-mail with any comments you wish to make. My e-mail
address is Victor.Lazzarini@nuim.ie
The Library
The Sound Object Library is an object-oriented audio
processing library. It provides objects for synthesis and
processing of sound that can be used to build applications for
computer-generated music. The core code, including soundfile and
text input/output, is fully portable across several platforms.
Platform-specific code includes realtime audio IO and MIDI input
support for Linux (OSS,ALSA and Jack),
Windows (MME and ASIO), MacOS X (CoreAudio, but no MIDI at
moment), Silicon Graphics (Irix) machines and any Open
Sound System-supported UNIX. The source code for the core
library classes can be compiled under any C++ compiler.
The library & accompanying programs are Free software,
licensed by the Gnu
Public License.
The SndObj library was nominated Linux/Open Sound System
Killer App of the month (June/2000) by the OSS
people at 4Front
Technologies.
The library documentation is distributed separately in portable document format. A discussion list,
is also hosted by sourceforge. If you have a general query, you are welcome to join the
sndobj-devel list or to look at its archives .
Download
Please go to the downloads
page.
Building instructions
Building sources with scons:
You will need scons
(www.scons.org) and python (www.python.org). Most linux systems
will have these already; OSX 10.3 and later will only need
scons, as python is in the system.
Fire up a terminal (or a
command prompt) and run 'scons' from the top-level directory
For standard build options
try 'scons -H'; for SndObj-related options try 'scons -h'
Building with MSVC: a MSVC project file is found under
./msvc6.0
Big thanks to Tim Blechmann for
the original SConstruct code for the SndObj library
Documentation
The complete reference manual is now available as PDF from the project downloads
page. This contains the reference for all library classes in the current version (2.6.2).
The documentation is in process of expansion. New documents will
be available on different aspects of SndObj programming.
C++ Programming
A number of C++ example programs are bundled with the library. You can check their source code in
the examples page.
Python Programming
The SndObj library also exists as python module. The programming principles are similar to the C++ use of the library. It is also possible to use the python interpreter for on-the-fly synthesis programming. The python module is created using swig, and has been added to the sources in version 2.6.3 (currently at beta stage, but can be accessed via cvs on sndobj.cvs.sourceforge.net). As a quick example (more to be added to the documentation), here's a simple python script implementing an amplitude-modulated instrument:
import sndobj
import time
tab = sndobj.HarmTable()
osc = sndobj.Oscili(tab, 10000, 440)
mod = sndobj.Oscili(tab, 44, 2)
outp = sndobj.SndRTIO(1, sndobj.SND_OUPUT)
mod.SetFreq(2)
osc.SetFreq(440, mod)
outp.SetOutput(1, osc)
thread = sndobj.SndThread()
thread.AddObj(mod)
thread.AddObj(osc)
thread.AddObj(outp, sndobj.SNDIO_OUT)
thread.ProcOn()
time.sleep(30)
thread.ProcOff()
Other Languages
The SndObj library has bindings for Java and CFFI (developed by Todd Ingalls), allowing it to be used under those languages,
in a similar manner to PySndObj.
PD development
A new wrapper, developed by Thomas Grill from his flext
is now available. This enables the quick development of PD
classes using SndObj library objects. For more info, see the
obligatory C++ layer for PD and MaxMSP objects on
www.parasitaere-kapazitaeten.net/Pd/ext/flext
and a first version of the sndobj interface (with a trivial
example)
www.parasitaere-kapazitaeten.net/Pd/ext/sndobj
Simple PD classes can also be coded
directly with the SndObj library. A simple
example is provided with the distribution (in /src/examples).
LADSPA development
The SndObj library can be used for LADSPA (Linux Audio
Developer's Simple Plugin API) plugin development. Such plugins
are modelled by the LADSPAplug class,
which supports processing by a single SndObj. This class can be
used directly or extended for more complex SndObj chains.
A fully-commented code example for a plugin
is available. The LADSPAplug class
implementation
is also found in this site.
LADSPA plugins are dynamic library modules, which can be built
with g++ using -shared (and possibly -DPIC
-fPIC , but DO NOT USE -nostartfiles )
option, similarly to a Linux PD class. For more information on
the LADSPA specification and use, see the project
website.
VST development
The SndObj library can be used for fast development of plugins
for VST 2.0. The VST API is C++-based, so the code integration is
very straightforward. Plugins can be developed by using SndObj
objects as AudioEffectX class members and issuing calls to
SndObj::DoProcess() from the class process/perform methods.
A simple code example for a plugin class
and its implementation
is available. For more information on the VST 2.0 API, see the
Steinberg
website
|