Giter Club home page Giter Club logo

gamma's Introduction

Gamma

Generic Synthesis C++ Library

  1. About ======================================== 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.

  2. 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.

2.1 Building a Library

Gamma uses Cmake to build. You should be able to build Gamma by running

cmake .
make

will build the library and the examples with automatically detected platform settings. You will need to install dependencies detailed in section 2.3 below.

On OS X an Xcode project can be produced by running Cmake like this:

    cmake  .

(You may need to delete old CMakeCache.txt and the CMakeFiles directory manually or using the distclean script, see below.)

Gamma is built as a static library and the binaries are located in the build/ directory.

Some useful options to pass to cmake include:

  • -DBUILD_EXAMPLES=1 : To generate projects with the examples as targets
  • -DCMAKE_INSTALL_PREFIX:PATH=/usr : To set install prefix

To generate an Xcode project where you can try out the Gamma examples, you should run cmake like this:

    cmake . -DBUILD_EXAMPLES=1 -G Xcode

2.2 Compiling Direct From Source

Individual Gamma files can easily be added and compiled directly from source into an existing project. This way there is no need to build Gamma before using, but it may require adding to your project a set of files as some Gamma files depend on others.

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

-D__STDC_CONSTANT_MACROS
-finline-functions (or -O3)
-fpeel-loops

2.3 Dependencies

Gamma depends on PortAudio v19 and libsndfile for performing audio and sound file i/o, respectively. They are required only if using certain Gamma classes. PortAudio is required ONLY if you are using AudioIO (AudioIO.h). Libsndfile is required ONLY for SoundFile i/o and playback (SoundFile.h, Player.h).

You will also need Cmake to build Gamma.

You can get these through standard package managers on Linux, or through MacPorts or HomeBrew on OS X.

2.4 Build issues

If you are having build issues (e.g. you want to use a Makefile but have used the Xcode generator, and cmake is giving you grief), running the distclean script will remove all Cmake cache and temporary files:

./distclean
  1. Easy building and running ===

The simplest way to run Gamma applications is using the included run script like this:

    ./run.sh path/to/source.cpp

You can also build all the cpp files in a particular directory into a single application passing a directory name:

    ./run.sh path/to/dir

Running this script will build Gamma and the application, and will run it.

  1. Using the template === To build larger Gamma applications:

  2. Copy and rename the template/ directory

  3. Add source files to the CMakeLists.txt file there

  4. Make sure you have Gamma installed in your system or that it is inside the project directory along side it and that it has been built.

  5. Run cmake with the desired options inside the new project directory and build.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.