Static Public Member Functions | List of all members
BalanceCalculator Class Reference

Calculates the balance. More...

Static Public Member Functions

static String getBalanceAsString (int balanceValue)
 Returns a string version of the pan value. More...
 
static float getGainFactorForBalance (float balanceValue, bool calculateLeftChannel)
 Converts a balance value to the gain factor for the supplied channel using an equal power formula. More...
 
static void processBuffer (AudioSampleBuffer &stereoBuffer, float *panValues, int startSample, int numSamples)
 Processes a stereo buffer with an array of balance values (from 0...1) - typically the output of a modulation chain. More...
 

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.