ofxPDSP
Modules

This is an overview of a selection of the available modules. There are many classes in pdsp, but many are just for very advanced users as they are used to build higher level classes. This is a selection of the most higher level pdsp classes, probably you will never need more than this. Module tagged with [multichannel] let to access more than one channel by selecting channels with the ch(size_t index) method. Module tagged with [stereo] let you access just two channels with ch(0) and ch(1).

Oscillators / Noise

Filters

  • pdsp::VAFilter : resonant 4 pole ladder filter with switchable 12db/24db LP, BP and HP outputs and pitched cutoff control. [multichannel]
  • pdsp::SVFilter : resonant 2 pole state variable filter with switchable LP, BP, HP and Notch outputs and pitched cutoff control. [multichannel]
  • pdsp::CombFilter : Comb Filter with frequency control in pitch, feedback and damping control (this is basically a tuned delay). [multichannel]
  • pdsp::PhaserFilter : 4 pole Phaser with frequency control in pitch, feedback and frequency spread control. [multichannel]

Delays

Envelopes / Amp

  • pdsp::ADSR : classic Attack-Decay-Sustain-Release envelope
  • pdsp::AHR : one-shot Attack-Hold-Release envelope, responsive only to positive triggers
  • pdsp::Amp : multiplies an input signal for a mod signal

LFO / Modulators

Samplers

Signal / Effects

Equalizers

Reverbs

  • pdsp::BasiVerb : dubby metallic reverb with mono input and stereo output [stereo]
  • pdsp::IRVerb : a impulse response based reverb, with mono/stereo inputs and outputs [stereo]

Routing

Sequencing ( you access those classes from engine.sequencer )

Thread-Safe Control

ofParameter compatible (also thread-safe when set() from the oF main thread)

Audio Interface

  • pdsp::Engine : manages audio inputs / outputs and runs the DSPs

Midi

OSC

Utility

PDSP Functions

ofxPDSP also has a selection of functions for various tasks. For using random inside ofxPDSP you have use its random functions as ofRandom isn't thread safe:

    int pdsp::dice( int size ); // returns a number from 0 to size-1
    int pdsp::dice( int min, int maxExclusive ); // returns a number from min to max-1
    bool pdsp::chance( float probability ); // probability range is 0.0f-1.0f, returns true or false
    float pdsp::urand(); // returns a number from 0.0f to 1.0f, 1.0f is included
    float pdsp::brand(); // returns a number from -1.0f to 1.0f, -1.0f and 1.0f are included

other useful functions are:

    float dB( float value ); // returns the linear equivalent of the given deciBel value
    float pdsp::panL( float pan ); // multiply for this function to pan the left channel 
    float pdsp::panR( float pan ); // multiply for this function to pan the right channel 
    float spread(int index, int max, float spread, bool fromCenter); // return pans value for a vector of voices
    float pdsp::f2p( float freq ); // frequency to pitch
    float pdsp::p2f( float pitch ); // pitch to frequency
    float pdsp::pratio( float pitch, float ratio ); // pitch/ratio, multiply the frequency of the given pitch for ration, and then converts it back to pitch value again (useful for FM synths)
    float pdsp::highestPartial( float pitch ); // take a pitch value as input an returns the highest partial before 20000hz of a waweform with that base pitch, useful for wavetables