|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
#include <polyblep_osc.hpp>
Public Member Functions | |
| void | set_waveform (Waveform w) |
| Set active waveform. | |
| void | set_frequency (float freq_hz, float sr=48000.0f) |
| Set frequency in Hz. | |
| void | set_note (float midi_note, float sample_rate=48000.0f) |
| Set frequency from MIDI note number (requires FPU) | |
| void | set_pulse_width (float pw) |
| Set pulse width (only affects Pulse waveform) | |
| void | set_amplitude (float amp) |
| Set output amplitude (0.0 = silence, 1.0 = full scale) | |
| void | process (float *out, uint16_t frames) |
| Generate audio samples. | |
| void | sync () |
| Hard sync — reset phase to zero. | |
| void | sync (float phase) |
| Reset phase to a specific value (0.0–1.0) | |
| uint32_t | phase () const |
| Current phase as uint32_t (for API compatibility with WavetableOsc) | |
| float | frequency () const |
| Current normalized frequency (freq_hz / sample_rate) | |
Definition at line 37 of file polyblep_osc.hpp.
|
inline |
Current normalized frequency (freq_hz / sample_rate)
Definition at line 112 of file polyblep_osc.hpp.
Referenced by sbl::widgets::source::SuperSawOsc::frequency().
|
inline |
Current phase as uint32_t (for API compatibility with WavetableOsc)
Definition at line 107 of file polyblep_osc.hpp.
Referenced by sync().
|
inline |
Generate audio samples.
| out | Output buffer (float, [-1.0, 1.0]) |
| frames | Number of samples |
Definition at line 78 of file polyblep_osc.hpp.
Referenced by sbl::widgets::source::SuperSawOsc::process(), and sbl::widgets::source::SuperSawOsc::process_stereo().
|
inline |
Set output amplitude (0.0 = silence, 1.0 = full scale)
Definition at line 71 of file polyblep_osc.hpp.
Referenced by sbl::widgets::source::SuperSawOsc::set_amplitude().
|
inline |
Set frequency in Hz.
| freq_hz | Frequency in Hz (e.g., 440.0f) |
| sr | Sample rate (default 48000) |
Definition at line 49 of file polyblep_osc.hpp.
Referenced by sbl::widgets::source::SuperSawOsc::set_frequency().
|
inline |
Set frequency from MIDI note number (requires FPU)
| midi_note | MIDI note (69 = A4 = 440 Hz) |
| sample_rate | Sample rate |
Definition at line 58 of file polyblep_osc.hpp.
References sbl::dsp::note_to_frequency().
|
inline |
Set pulse width (only affects Pulse waveform)
| pw | Pulse width, clamped to [0.05, 0.95]. Default 0.5. |
Definition at line 66 of file polyblep_osc.hpp.
|
inline |
Set active waveform.
Definition at line 42 of file polyblep_osc.hpp.
|
inline |
Hard sync — reset phase to zero.
Definition at line 94 of file polyblep_osc.hpp.
Referenced by sbl::widgets::source::SuperSawOsc::sync().
|
inline |
Reset phase to a specific value (0.0–1.0)
Definition at line 101 of file polyblep_osc.hpp.
References phase().