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

The notes a backend has delivered as sounding, per channel and key, with the host note id each started with. More...

#include <DSParkPlugin.h>

Public Member Functions

void clear () noexcept
 
void noteOn (int channel, int key, int32_t noteId) noexcept
 
void noteOff (int channel, int key) noexcept
 
int32_t noteIdOf (int channel, int key) const noexcept
 
template<typename Off >
void releaseMatching (int channel, int key, int32_t noteId, Off &&off) noexcept
 

Detailed Description

The notes a backend has delivered as sounding, per channel and key, with the host note id each started with.

CLAP addresses notes by (channel, key, note id) where any part may be the wildcard -1: a NOTE_OFF or NOTE_CHOKE with key -1 means "every matching voice". MidiEvent carries one key, so the backend expands such an event into one NoteOff per sounding note it matches - exactly the notes the plugin was told about. Not thread-safe: the audio thread owns it.

Definition at line 1156 of file DSParkPlugin.h.

Member Function Documentation

◆ clear()

void dspark::plugin::ActiveNotes::clear ( )
inlinenoexcept

Definition at line 1159 of file DSParkPlugin.h.

◆ noteIdOf()

int32_t dspark::plugin::ActiveNotes::noteIdOf ( int  channel,
int  key 
) const
inlinenoexcept

The host note id the note at (channel, key) last started with (-1 when none, or for an address out of range).

Definition at line 1181 of file DSParkPlugin.h.

◆ noteOff()

void dspark::plugin::ActiveNotes::noteOff ( int  channel,
int  key 
)
inlinenoexcept

Definition at line 1172 of file DSParkPlugin.h.

◆ noteOn()

void dspark::plugin::ActiveNotes::noteOn ( int  channel,
int  key,
int32_t  noteId 
)
inlinenoexcept

Definition at line 1164 of file DSParkPlugin.h.

◆ releaseMatching()

template<typename Off >
void dspark::plugin::ActiveNotes::releaseMatching ( int  channel,
int  key,
int32_t  noteId,
Off &&  off 
)
inlinenoexcept

Calls off(channel, key) for every sounding note matching the (channel, key, noteId) address, each part -1 for "any", and forgets those notes.

Definition at line 1191 of file DSParkPlugin.h.


The documentation for this class was generated from the following file: