about

Gamma is a cross-platform, C++ library for doing generic synthesis and filtering of signals. It is oriented towards real-time sound and graphics applications, but is equally useful for non-real-time tasks. Gamma is designed to be "light-footed" in order to make it is highly suitable to write plug-ins with or embed in other C++ projects.

overview

Processing algorithms are designed as much as possible to be data type and domain independent. This allows a common set of functions and objects to be used for a variety of modalities, such as sound or graphics, and in arbitrary domains, such as time, space, or frequency. Algorithms are type generic which means they can process any type of data that has the appropriate mathematical operators defined (typically +, -, *, and /).

Whenever appropriate, objects use compile-time strategies for handling different behaviors, such as interpolation.

domains

Sampling domains are abstracted through an observer design pattern into a Sync subject and a Synced observer. The Sync holds a sampling rate/interval amount and notifies its attached Synceds whenever it changes value.

functions

Functions come in three flavors- pure, state, and domain. Pure functions are stateless, state functions maintain an internal state, and domain functions are state functions that are also members of a processing domain.

genericity

Gamma objects are templated on their value type allowing them to be used with any arithmetic data types, such as, scalars, vectors, and complex numbers.

RMul<float     > rMul(0.99);			// decaying envelope
RMul<Vec3<>    > rMul(Vec3<>(0.9,0.8,0.7));	// 3 decaying envelopes
RMul<Complex<> > rMul(Polar<>(1.00, M_2PI/8));	// complex sinusoid
RMul<Complex<> > rMul(Polar<>(0.99, M_2PI/8));	// complex exponential

syntax

Processing objects are typically either a generator or a filter and can be either domain observers or not. Objects adopt a standard processing operator interface similar to functional syntax. Generators return their next value with the () operator and filters return their next value with the (T) operator, where T is a value type.

gen::RAdd rAdd(1, 0);		// recursively add 1 starting at 0
for(int i=0; i<4; ++i)		// prints "1 2 3 4"
	cout << rAdd();		

fil::Delay1 delay1(0);		// 1 element delay starting with 0
for(int i=1; i<5; ++i)		// prints "0 1 2 3"
	cout << delay1(i);	

documentation

API documentation (HTML)
Source repository (HTML)
Quick tutorial (PDF)

license

Gamma is distributed under a permissive, non-copyleft BSD-like license under the Regents of the University of California.

Copyright (C) 2006-2008. The Regents of the University of California (REGENTS). 
All Rights Reserved.

Permission to use, copy, modify, distribute, and distribute modified versions
of this software and its documentation without fee and without a signed
licensing agreement, is hereby granted, provided that the above copyright
notice, the list of contributors, this paragraph and the following two paragraphs 
appear in all copies, modifications, and distributions.

IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING
OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED
HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

download

stable releases

Gamma 0.9.5

Older versions: 0.9.4, 0.9.3, 0.9.1, 0.9.0

repository

The latest source code can be checked out anonymously through SVN via

svn co https://svn.mat.ucsb.edu/svn/gamma/trunk gamma

contact

putnam.lance at gmail.com