ofxPDSP
|
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)
.
[stereo]
[multichannel]
[multichannel]
[multichannel]
[multichannel]
[stereo]
[stereo]
[multichannel]
[multichannel]
[multichannel]
[multichannel]
[multichannel]
[multichannel]
[multichannel]
[multichannel]
[stereo]
[stereo]
engine.sequencer
)[multichannel]
[multichannel]
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