Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time


Generic Synthesis C++ Library


Gamma is a cross-platform, C++ library for doing generic synthesis and filtering of signals. It contains helpful mathematical functions, types, such as vectors and complex numbers, an assortment of sequence generators, and many other objects for signal processing tasks. It is oriented towards real-time sound and graphics synthesis, but is equally useful for non-real-time tasks.

Compilation Instructions

The source code can either be built into a library or directly compiled from source into an application. In the following, the base directory is where this README file is located.

Building a Library

Make (Linux, OS X, mingw)

In most cases, simply running


will build the library with automatically detected platform settings. See Makefile.config for other build options.

There are several other rules within Makefile. These are:

make			- builds static library
make install		- installs library into DESTDIR
make clean		- removes binaries from build folder
make test		- performs unit tests

The script can be used to compile and run examples and other source files against the Gamma library. For example,

./ examples/oscillator/sine.cpp

To only compile the source file without running, include AUTORUN=0 after the source file. Binaries are located in the automatically generated build/ directory. On OSX, the Gamma library will be linked to the pre-compiled dependent libraries in external/lib_osx. On Linux, use apt-get to install the necessary dependent libraries.

Xcode (OS X)

You may also build the library using the supplied Xcode project.

  1. Open project/xcode/gamma.xcodeproj
  2. Build the target libgamma{.a, .dylib}. The library will be in project build folder.

Compiling Directly From Source

Gamma can easily be compiled directly from source into an existing project.

Make sure to pass in the following flags to the compiler:

-finline-functions (or -O3)


PortAudio is required ONLY if you are using Gamma's AudioIO class (defined in Gamma/AudioIO.h). If you do not wish to use audio i/o, then pass the flag


into make or, if not using make, exclude src/AudioIO.cpp from your project.

libsndfile may be used as the backend for the SoundFile class by passing the flag


into make.


Gamma is distributed under a permissive free software license. Please see the LICENSE file for details.