Brickworks > API documentation > bw_osc_sin
Sinusoidal oscillator waveshaper.
It turns a normalized phase signal, such as that geneated by bw_phase_gen, into a sinusoidal wave.
Module type: dsp
Version: 1.1.0
Requires:
static inline float bw_osc_sin_process1(
float x);
Processes one input sample x
, representing the normalized phase, and returns the corresponding output sample.
x
must be in [0.f
, 1.f
).
static inline void bw_osc_sin_process(
const float * x,
float * y,
size_t n_samples);
Processes the first n_samples
of the input buffer x
, containing the normalized phase signal, and fills the first n_samples
of the output buffer y
.
All samples in x
must be in [0.f
, 1.f
).
static inline void bw_osc_sin_process_multi(
const float * const * x,
float * const * y,
size_t n_channels,
size_t n_samples);
Processes the first n_samples
of the n_channels
input buffers x
, containing the normalized phase signals, and fills the first n_samples
of the n_channels
output buffers y
.
All samples in x
must be in [0.f
, 1.f
).
template<size_t N_CHANNELS>
void oscSinProcess(
const float * const * x,
float * const * y,
size_t nSamples);
#ifndef BW_CXX_NO_ARRAY
template<size_t N_CHANNELS>
void oscSinProcess(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
#endif
BW_NULL
and BW_CXX_NO_ARRAY
.bw_osc_sin_process()
and bw_osc_sin_process_multi()
now use size_t
to count samples and channels.const
specifiers to input arguments.oscSinProcess()
function taking C-style arrays as arguments.bw_osc_sin_process_multi()
.