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/manual-panning/render.cpp

Simple Manual Panner

This example generates three different audio sources and provides a GUI slider for each of these to pan over an arbitrary number of channels.

The number of channels is set to be equal to the number of audio output channels.

A simple panning strategy is followed so that the slider value is mapped to the number of channels and for each channel the distance to the slider value is computed as the difference. If such difference is between -1 and 1 then a panning value is applied to the channel. Otherwise the channel is muted completely.