DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::plugin::HasVoiceQuery Concept Reference

Optional voice query: bool isVoiceActive(int channel, int key, int32_t noteId) const noexcept - true while the voice that NoteOn started still sounds (its release tail included). With perVoice() parameters a CLAP host keeps a modulator per voice and the wrapper tells it when a voice is over (CLAP NOTE_END): with this query, when the voice actually falls silent; without it, at its NoteOff. Called on the audio thread after each processed block; answer from the voice array, never allocate or lock. noteId is -1 when the host gave the note none. More...

#include <DSParkPlugin.h>

Concept definition

template<typename P>
concept dspark::plugin::HasVoiceQuery = requires(const P p, int channel, int key, int32_t noteId) {
{ p.isVoiceActive(channel, key, noteId) } -> std::convertible_to<bool>;
}
Optional voice query: bool isVoiceActive(int channel, int key, int32_t noteId) const noexcept - true ...

Detailed Description

Optional voice query: bool isVoiceActive(int channel, int key, int32_t noteId) const noexcept - true while the voice that NoteOn started still sounds (its release tail included). With perVoice() parameters a CLAP host keeps a modulator per voice and the wrapper tells it when a voice is over (CLAP NOTE_END): with this query, when the voice actually falls silent; without it, at its NoteOff. Called on the audio thread after each processed block; answer from the voice array, never allocate or lock. noteId is -1 when the host gave the note none.

Definition at line 729 of file DSParkPlugin.h.