8 #ifndef AMBISONIC_UTILITIES_H
9 #define AMBISONIC_UTILITIES_H
14 #define AMBI_INVSQRT2 (1/1.414213562)
sample * SampleBuffer
1-channel buffer data type, vector of (sample)
SampleBufferVector mOutPtr
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
void rotateThirdOrderHorizontal()
void setNthInput(float amount, Axes axis)
void fumaEncodingWeights(SampleBuffer weights, const AmbisonicOrder &order, sample azimuth, sample elevation)
Utility function that calculates fuma encoding weights for a given order, azimuth and elevation...
AmbisonicMixer(unsigned order=1)
void rotateSecondOrderHorizontal()
void rotateFirstOrderHorizontal()
UGenVector mInputs
vector of pointers to the loudspeakers
void setRotate(float amount)
unsigned mNumChannelsGreaterOrder
unsigned * mInputChannelIndex
float sample
(could be changed to int, or double)
void addInput(AmbisonicUnitGenerator &input)
methods for adding/removing inputs to the mixer.
virtual void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
Number of active inputs.
std::vector< UnitGenerator * > UGenVector
AmbisonicRotator(AmbisonicUnitGenerator &input)
initializes with no rotation
void rotateThirdOrderVertical()
virtual void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times
void initialize()
Initializing method called by constructors.
~AmbisonicMixer()
Destructor.
void setTumble(float amount)
void rotateFirstOrderVertical()
void setTilt(float amount)
Buffer – the multi-channel sample buffer class (passed around between generators and IO guys)...
Ambisonic Abstract Base Class.
SampleBuffer * SampleBufferVector
Multi-channel buffer data type, vector of (SampleBuffer)
Port – used to represent constant, control-rate or signal inputs and outputs in named maps; holds a ...
SampleBufferVector mInPtr
void rotateSecondOrderVertical()
float mInvNumInputs
the inverse of the number of inputs (used for normalization)
Buffer * mInBuffer
buffer for the input framestream
void fumaIndexedEncodingWeights(SampleBuffer weights, const AmbisonicOrder &order, sample &azimuth, sample &elevation)
Utility function that calculates fuma encoding weights for a given order, azimuth and elevation...
void initialize(UnitGenerator &input)
Base class of CSL exceptions (written upper-case). Has a string message.
void singularValueDecomposition(sample **a, int m, int n, sample *w, sample **v)
Utility function used in calculating the inverse of a matrix, used in AmbisonicDecoder for the pseudo...