17#ifndef SBL_DSP_COMP_PAN_HPP_
18#define SBL_DSP_COMP_PAN_HPP_
33 smoother_.
reset(0.5f);
45 if (su < 0.0f) su = 0.0f;
46 if (su > 1.0f) su = 1.0f;
61 void process(
const float* in,
float* out_l,
float* out_r, uint16_t n) {
62 for (uint16_t i = 0; i < n; ++i) {
63 float pos = smoother_.
process(target_);
65 out_l[i] = in[i] * gain.left;
66 out_r[i] = in[i] * gain.right;
81 void process(
float* buf_l,
float* buf_r, uint16_t n) {
82 for (uint16_t i = 0; i < n; ++i) {
83 float pos = smoother_.
process(target_);
85 buf_l[i] *= gain.left;
86 buf_r[i] *= gain.right;
99 smoother_.
reset(0.5f);
111 float target_ = 0.5f;
void process(float *buf_l, float *buf_r, uint16_t n)
Apply panning in-place to a stereo pair (scales existing L/R).
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.
void reset(float position)
Reset smoother to a specific position.
float position() const
Current smoothed position [0,1].
void reset()
Reset smoother to center (0.5)
void reset()
Reset to zero.
void set_time_ms(float ms, float rate_hz)
Compute coefficient from settling time in milliseconds.
float process(float target)
Process one sample toward target.
float value() const
Current smoothed value.
Fixed-point constants and audio sample types.
Compositions: subcircuits of primitives.
PanGain constant_power(float position)
Compute constant-power pan gains (-3 dB at center)
One-pole parameter smoother.
Stereo panning and mixing (Audio Stack — Atoms)