# libguttersynth
This is a C port of Tom Mudd's Gutter Synth originally for Max/MSP.
APIs are available for both C and CPP in the corresponding .h and .hpp header files.
Documentation forthcoming, but the examples should demonstrate usage quite clearly.


## Requirements
* Cmake >= 2.8.12
* Portaudio >= 2.0 for realtime example (example 3)

Tested on Linux with Portaudio 2.0 version 19.

## Installation
Create a build directory at the top of the source tree, execute *cmake ..*, 
*make* and optionally *make install* as root. If the latter is not 
used/possible then the resulting library can be used from the build directory.
eg:

	mkdir build && cd build
	cmake ..
	make && sudo make install

The following options can be provided to cmake.

* USE_FLOAT : use single-precision floats instead of double precision. Default=OFF
* CREATE_STATIC : create a static library in addition to shared. Default=ON
* BUILD_EXAMPLES : build the examples in addition to library. Default=ON

These are set via the -D flag and should be ON or OFF. For example to build
with floats instead of doubles, cmake would be called with

    cmake -DUSE_FLOAT=ON


## Examples

### Example 1
Interpolates randomised parameters over 20 seconds to produce a wave file
which has different content upon each run.

### Example 2
Demonstrates the CPP API to create a 30 second wave file in which the filters
are randomised every second. 

### Example 3
Utilises Portaudio (if available) to demonstrate randomised output in a 
similar fashion to example 1, but with realtime audio output.