|
| | VoiceModulationSources ()=default |
| bool | prepare (const VoiceModulationSourcesConfig &config) noexcept |
| | Control/background-thread only.
|
| void | release () noexcept |
| | Control/background-thread only. Invalidates prepared storage.
|
| void | reset () noexcept |
| | RT-safe after prepare. Resets every voice's sources to a fresh start.
|
| bool | prepared () const noexcept |
| const VoiceModulationSourcesConfig & | config () const noexcept |
| bool | set_lfo_rate_hz (double rate_hz) noexcept |
| | RT-safe after prepare.
|
| bool | set_lfo_depth (float depth) noexcept |
| | RT-safe after prepare.
|
| void | set_lfo_wave (pulp::signal::Lfo::Wave wave) noexcept |
| | RT-safe after prepare.
|
| void | note_on (std::size_t voice_index) noexcept |
| | RT-safe after prepare.
|
| void | note_off (std::size_t voice_index) noexcept |
| | RT-safe after prepare. Releases that voice's envelope.
|
| VoiceModulationResult | append_lfo_lane (std::size_t voice_index, VoiceModulationBuffer &destination, VoiceModulationTarget target, VoiceModulationRate rate, std::uint32_t frame_count) noexcept |
| | RT-safe after prepare.
|
| VoiceModulationResult | append_envelope_lane (std::size_t voice_index, VoiceModulationBuffer &destination, VoiceModulationTarget target, VoiceModulationRate rate, std::uint32_t frame_count) noexcept |
| | RT-safe after prepare.
|
| VoiceModulationResult | write_voice (std::size_t voice_index, VoiceModulationBuffer &destination, VoiceModulationTarget lfo_target, VoiceModulationTarget envelope_target, VoiceModulationRate rate, std::uint32_t frame_count) noexcept |
| | RT-safe after prepare.
|
template<std::size_t MaximumVoices>
class pulp::audio::VoiceModulationSources< MaximumVoices >
A fixed-capacity bank of per-voice modulation sources.
MaximumVoices sizes both the source instances and the unison phase spread. The bank stores resolved samples; like VoiceModulationBuffer, it applies no routing, scaling beyond depth, smoothing, or unit conversion.
template<std::size_t MaximumVoices>
RT-safe after prepare.
Rescales every voice's bipolar LFO output.
Negative values invert the wave, which is the documented way to express a source whose convention is the inverse of this one's. Depth is the other half of a live LFO's automation surface, and has the same reason as the rate for not living behind prepare().
Rejects a non-finite depth, leaving the current depth in place, and reports whether the depth was taken.
template<std::size_t MaximumVoices>
RT-safe after prepare.
Retunes every voice's LFO, preserving phase and the lifecycle stage.
Rate is an automation destination in every synth that has an LFO at all — it is what a "LFO Rate" knob writes to — so it cannot be reachable only through prepare(). prepare() allocates, is control-thread only, and restarts phase; sweeping a rate knob through it would stall the LFO at phase 0 for the whole sweep.
Rejects a non-finite or non-positive rate — the rates prepare() refuses — and reports whether the rate was taken. The shipped LFO clamps a non-positive rate up into its own legal range rather than refusing it, so accepting one here would leave config() holding a rate that prepare(config()) then rejects: the bank and the config it reports would disagree.
template<std::size_t MaximumVoices>
RT-safe after prepare.
Reshapes every voice's LFO, preserving phase and the lifecycle stage.
A shape selector is a control a player turns, so it belongs with the rate and depth rather than behind prepare(). Leaving it prepare-only forces a caller whose shape is authored per patch to re-prepare a bank the audio thread may be reading from, which is a data race the caller then has to invent a publication scheme to avoid. Random streams are not reseeded, so switching away from sh_random and back resumes the same stream rather than replaying it.