Brickworks > API documentation > bw_osc_sin

bw_osc_sin

Description

Sinusoidal oscillator waveshaper.

It turns a normalized phase signal, such as that geneated by bw_phase_gen, into a sinusoidal wave.

Info

Module type: dsp

Version: 1.1.0

Requires:

API

bw_osc_sin_process1()

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).

bw_osc_sin_process()

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).

bw_osc_sin_process_multi()

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).

C++ wrapper

Brickworks::oscSinProcess
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

ChangeLog