2 #ifndef OFXPDSP_FUNCTIONS_INCLUDED 3 #define OFXPDSP_FUNCTIONS_INCLUDED 5 #include "../DSP/core/Preparable.h" 6 #include "../DSP/utility/PitchToFreq.h" 7 #include "../DSP/utility/DBtoLin.h" 8 #include "../math/random/random.h" 16 float dB (
float dBvalue );
25 float panL (
float pan );
31 float panR (
float pan );
37 float f2p(
float freq);
45 float pratio (
float pitch,
float ratio );
58 return randomUnipolarInclusive();
66 return randomBipolar();
74 inline_f
int dice(
int min,
int maxExclusive ){
75 return (
dice(maxExclusive-min) + min);
87 float spread(
int index,
int max,
float spread,
bool fromCenter =
false);
94 float p2f(
float pitch);
109 friend float panL (
float pan );
110 friend float panR (
float pan );
111 friend float dB (
float dBvalue );
112 friend bool pdsp::chance(
float chance );
116 friend int pdsp::dice(
int min,
int maxExclusive );
128 [[deprecated(
"pdspSpread deprecated, use pdsp::spread instead")]]
129 inline float pdspSpread(
int index,
int max,
float spread,
bool fromCenter =
false){
133 [[deprecated(
"pdspChance deprecated, use pdsp::chance instead")]]
134 inline_f
bool pdspChance(
float value ){
135 return pdsp::chance(value);
138 [[deprecated(
"pdspDice deprecated, use pdsp::dice instead")]]
139 inline_f
int pdspDice(
int sides ){
143 [[deprecated(
"pdspDice deprecated, use pdsp::dice instead")]]
144 inline_f
int pdspDice(
int min,
int maxExclusive ){
148 [[deprecated(
"pdspURan deprecated, use pdsp::urand instead")]]
149 inline_f
float pdspURan( ){
150 return pdsp::randomUnipolarInclusive();
153 [[deprecated(
"pdspBRan deprecated, use pdsp::brand instead")]]
154 inline_f
float pdspBRan(){
155 return pdsp::randomBipolar();
163 #endif // OFXPDSP_FUNCTIONS_INCLUDED float f2p(float freq)
take a frequency value as input an returns a pitch value. Standard reference tuning is 440hz...
Definition: ofxPDSPFunctions.cpp:4
deactivated documentation of some global functions ( ofxPDSPFunctions is just a dummy class for gener...
Definition: ofxPDSPFunctions.h:103
float pratio(float pitch, float ratio)
take a pitch value and a float ratio. The returns a pitch that is the pitch value of the frequency co...
Definition: ofxPDSPFunctions.cpp:8
inline_f float brand()
returns a random float value ranging from -1.0f to 1.0f. Use this instead of ofRandom() in the code t...
Definition: ofxPDSPFunctions.h:65
int highestPartial(float pitch)
take a pitch value as input an returns the highest partial before 20000hz of a waweform with that bas...
Definition: ofxPDSPFunctions.cpp:14
float spread(int index, int max, float spread, bool fromCenter=false)
returns a value for panning voices in an uniform distribution into the stereo panorama ...
Definition: ofxPDSPFunctions.cpp:64
float panL(float pan)
returns a float value you can use to multiply your signal for panning when patching to a left channel...
Definition: ofxPDSPFunctions.cpp:31
inline_f int dice(int min, int maxExclusive)
returns a random int value that ranges from min to maxExclusive-1
Definition: ofxPDSPFunctions.h:74
float p2f(float pitch)
take a pitch value as input an returns a frequency value. Standard reference tuning is 440hz...
Definition: ofxPDSPFunctions.cpp:60
Thread-safe value control with smoothing.
Definition: SequencerBridge.h:11
float panR(float pan)
returns a float value you can use to multiply your signal for panning when patching to a right channe...
Definition: ofxPDSPFunctions.cpp:44
inline_f float urand()
returns a random float value ranging from 0.0f, to the 1.0f. Use this instead of ofRandom() in the co...
Definition: ofxPDSPFunctions.h:57