41#ifndef SBL_DSP_WIDGETS_CHANNEL_HPP_
42#define SBL_DSP_WIDGETS_CHANNEL_HPP_
67template <u
int16_t MaxFrames, u
int8_t MaxSends = 4>
79 for (uint16_t i = 0; i < n; ++i)
85 for (uint16_t i = 0; i < n; ++i) {
101 if (send_index < send_count_) {
118 if (send_count_ < MaxSends) {
119 Send& s = sends_[send_count_++];
135 for (uint16_t i = 0; i < n; ++i)
141 float gain = fader_.
tick(n);
142 for (uint16_t i = 0; i < n; ++i) {
143 post_l_[i] =
buf_l[i] * gain;
144 post_r_[i] =
buf_r[i] * gain;
148 pan_.
process(post_l_, post_r_, n);
153 const float*
post_l()
const {
return post_l_; }
154 const float*
post_r()
const {
return post_r_; }
159 bool muted()
const {
return mute_; }
163 const Send&
send(uint8_t i)
const {
return sends_[i]; }
172 Send sends_[MaxSends] = {};
173 uint8_t send_count_ = 0;
179 float post_l_[MaxFrames] = {};
180 float post_r_[MaxFrames] = {};
float gain() const
Current smoothed gain value (after taper mapping + smoothing).
void set_level_su(float su)
void set_position_su(float su)
Set pan position. Port — accepts normalized [0,1] signal.
void process(const float *in, float *out_l, float *out_r, uint16_t n)
Apply panning to a mono input, writing to stereo output buffers.
Gain control with taper curve (Audio Stack — Compositions)
Stereo pan composition with smoothing.