All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Static Public Member Functions | List of all members
BalanceCalculator Class Reference

Static Public Member Functions

static float getGainFactorForBalance (float balanceValue, bool calculateLeftChannel)
 
static void processBuffer (AudioSampleBuffer &stereoBuffer, float *panValues, int startSample, int numSamples)
 
static String getBalanceAsString (int balanceValue)
 

Detailed Description

Calculates the balance.

Member Function Documentation

String getBalanceAsString ( int  balanceValue)
static

Returns a string version of the pan value.

float getGainFactorForBalance ( float  balanceValue,
bool  calculateLeftChannel 
)
static

Converts a balance value to the gain factor for the supplied channel using an equal power formula. Input is -100.0 ... 100.0

void processBuffer ( AudioSampleBuffer &  stereoBuffer,
float *  panValues,
int  startSample,
int  numSamples 
)
static

Processes a stereo buffer with an array of balance values (from 0...1) - typically the output of a modulation chain.

This is slightly faster than calling getGainFactorForBalance because it uses some vectorization... The float array that is passed in is used as working buffer, so don't rely on it not being changed...

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.