Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Functions | Variables
Utilities.cpp File Reference
#include "cinder/audio/Utilities.h"
#include "cinder/CinderMath.h"
Include dependency graph for Utilities.cpp:

Namespaces

 cinder
 
 cinder::audio
 

Functions

float cinder::audio::linearToDecibel (float gainLinear)
 Scale gainLinear from linear (0-1) to decibel (0-100) scale. More...
 
void cinder::audio::linearToDecibel (float *array, size_t length)
 Scale array of length length from linear (0-1) to decibel (0-100) scale. More...
 
float cinder::audio::decibelToLinear (float gainDecibels)
 Scale gainLinear from decibel (0-100) to linear (0-1) scale. More...
 
void cinder::audio::decibelToLinear (float *array, size_t length)
 Scale array of length length from decibel (0-100) to linear (0-1) scale. More...
 
float cinder::audio::freqToMidi (float freq)
 Scale freq from frequency (hertz) to MIDI note values, so as one can refer to pitches using the equal temperament scale. More...
 
float cinder::audio::midiToFreq (float midi)
 Scale midi from MIDI note values to frequency (hertz). Adapted from Pure Data's mtof function. More...
 
bool cinder::audio::thresholdBuffer (const Buffer &buffer, float threshold, size_t *recordFrame=nullptr)
 Checks if the absolute value of any sample in buffer is over threshold. Optionally provide recordFrame to record the frame index. More...
 

Variables

const float cinder::audio::kGainNegative100Decibels = 0.00001f
 
const float cinder::audio::kGainNegative100DecibelsInverse = 1.0f / kGainNegative100Decibels