Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Multichannel/circular-panning/render.cpp

Circular Panner

This example demonstrates the use of a low frequency oscillator to modulate panning within an arbitray number of audio channels.

A pair of detuned oscillators are used as a single audio source that is 'rotated' around the available audio output channels based on the frequency of the LFO.

Only two adjacent channels are active at each time. Resets in the sawtooth LFO are detected to increment channel count and the absolute value of the LFO is employed to compute panning within the active adjacent channels to achieve constant power panning via a sine function.

A GUI slider is provide to adjust the oscillator frequency and another one to change the direction of rotation. The scope displays panning gains for each channel and the LFO.