Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::dsp::widgets::Channel< MaxFrames, MaxSends > Class Template Reference

Detailed Description

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
class sbl::dsp::widgets::Channel< MaxFrames, MaxSends >

Definition at line 68 of file channel.hpp.

#include <channel.hpp>

Inheritance diagram for sbl::dsp::widgets::Channel< MaxFrames, MaxSends >:
[legend]

Public Member Functions

void write_input_mono (const float *src, uint16_t n)
 Write mono input — channel spreads to both L/R on process().
 
void write_input_stereo (const float *src_l, const float *src_r, uint16_t n)
 Write stereo input.
 
void set_gain_su (float su)
 Port: channel gain level [0,1].
 
void set_pan_su (float su)
 Port: pan position [0,1]. 0=L, 0.5=center, 1=R.
 
void set_send_level_su (uint8_t send_index, float su)
 Port: send level [0,1] for send at index.
 
void set_format (Format f)
 
void set_mute (bool m)
 
void set_solo (bool s)
 
void set_fader_taper (comp::Taper t)
 
void add_send (uint8_t target, float initial_level, SendType type=SendType::PostFader)
 Configure a send at init time. Default taper is Audio for send faders.
 
void process (uint16_t n)
 
const float * post_l () const
 
const float * post_r () const
 
float fader_gain () const
 
bool muted () const
 
bool soloed () const
 
Format format () const
 
uint8_t send_count () const
 
const Send & send (uint8_t i) const
 
Send & send (uint8_t i)
 
comp::Fader & fader ()
 
comp::Pan & pan ()
 

Public Attributes

float buf_l [MaxFrames] = {}
 
float buf_r [MaxFrames] = {}
 

Member Function Documentation

◆ write_input_mono()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
void sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::write_input_mono ( const float *  src,
uint16_t  n 
)
inline

Write mono input — channel spreads to both L/R on process().

Definition at line 78 of file channel.hpp.

References sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::buf_l.

◆ write_input_stereo()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
void sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::write_input_stereo ( const float *  src_l,
const float *  src_r,
uint16_t  n 
)
inline

◆ set_gain_su()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
void sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::set_gain_su ( float  su)
inline

Port: channel gain level [0,1].

Definition at line 94 of file channel.hpp.

References sbl::dsp::comp::Fader::set_level_su().

◆ set_pan_su()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
void sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::set_pan_su ( float  su)
inline

Port: pan position [0,1]. 0=L, 0.5=center, 1=R.

Definition at line 97 of file channel.hpp.

References sbl::dsp::comp::Pan::set_position_su().

◆ set_send_level_su()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
void sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::set_send_level_su ( uint8_t  send_index,
float  su 
)
inline

Port: send level [0,1] for send at index.

Definition at line 100 of file channel.hpp.

References sbl::dsp::widgets::Send::level, and sbl::dsp::comp::Fader::set_level_su().

◆ set_format()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
void sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::set_format ( Format  f)
inline

Definition at line 108 of file channel.hpp.

◆ set_mute()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
void sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::set_mute ( bool  m)
inline

Definition at line 109 of file channel.hpp.

◆ set_solo()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
void sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::set_solo ( bool  s)
inline

Definition at line 110 of file channel.hpp.

◆ set_fader_taper()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
void sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::set_fader_taper ( comp::Taper  t)
inline

Definition at line 111 of file channel.hpp.

References sbl::dsp::comp::Fader::set_taper().

◆ add_send()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
void sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::add_send ( uint8_t  target,
float  initial_level,
SendType  type = SendType::PostFader 
)
inline

◆ process()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
void sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::process ( uint16_t  n)
inline

Process the full channel strip: mono spread, fader gain, pan. After this call, post_l()/post_r() contain the master-ready output. buf_l/buf_r remain unmodified (pre-pan, pre-fader) for send routing.

Definition at line 132 of file channel.hpp.

References sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::buf_l, sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::buf_r, sbl::dsp::widgets::Mono, sbl::dsp::comp::Pan::process(), and sbl::dsp::comp::Fader::tick().

◆ post_l()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
const float * sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::post_l ( ) const
inline

Definition at line 153 of file channel.hpp.

◆ post_r()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
const float * sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::post_r ( ) const
inline

Definition at line 154 of file channel.hpp.

◆ fader_gain()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
float sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::fader_gain ( ) const
inline

Definition at line 158 of file channel.hpp.

References sbl::dsp::comp::Fader::gain().

◆ muted()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
bool sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::muted ( ) const
inline

Definition at line 159 of file channel.hpp.

◆ soloed()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
bool sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::soloed ( ) const
inline

Definition at line 160 of file channel.hpp.

◆ format()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
Format sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::format ( ) const
inline

Definition at line 161 of file channel.hpp.

◆ send_count()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
uint8_t sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::send_count ( ) const
inline

Definition at line 162 of file channel.hpp.

◆ send() [1/2]

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
const Send & sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::send ( uint8_t  i) const
inline

Definition at line 163 of file channel.hpp.

◆ send() [2/2]

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
Send & sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::send ( uint8_t  i)
inline

Definition at line 164 of file channel.hpp.

◆ fader()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
comp::Fader & sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::fader ( )
inline

Definition at line 166 of file channel.hpp.

◆ pan()

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
comp::Pan & sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::pan ( )
inline

Definition at line 167 of file channel.hpp.

Member Data Documentation

◆ buf_l

◆ buf_r

template<uint16_t MaxFrames, uint8_t MaxSends = 4>
float sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::buf_r[MaxFrames] = {}

The documentation for this class was generated from the following file: