Tabula Sonora 0.1.0
A native C++20 implementation of the Roland Sound Canvas VA synth voice
Loading...
Searching...
No Matches
ts::Voice Struct Reference

A handle to one voice slot: an index into the pool's parallel arrays plus the control-rate operations that act on it. More...

#include <tabulasonora/voice_pool.hpp>

Public Member Functions

VoiceState state () const noexcept
int channel () const noexcept
int note () const noexcept
int velocity () const noexcept
int note_group () const noexcept
 The note group this voice belongs to; partials of one note share it.
bool is_active () const noexcept

Public Attributes

const VoicePoolpool = nullptr
int index = 0

Detailed Description

A handle to one voice slot: an index into the pool's parallel arrays plus the control-rate operations that act on it.

Deliberately a handle rather than an object holding the render state. The per-voice DSP state lives in struct-of-arrays form on the pool, which is the shape the engine itself uses — it renders voices in groups of four. Objects appear at the control-rate seams, where a virtual call costs nothing; the per-sample loop underneath stays flat.

Member Function Documentation

◆ state()

VoiceState ts::Voice::state ( ) const
inlinenodiscardnoexcept

◆ channel()

int ts::Voice::channel ( ) const
inlinenodiscardnoexcept

◆ note()

int ts::Voice::note ( ) const
inlinenodiscardnoexcept

◆ velocity()

int ts::Voice::velocity ( ) const
inlinenodiscardnoexcept

◆ note_group()

int ts::Voice::note_group ( ) const
inlinenodiscardnoexcept

The note group this voice belongs to; partials of one note share it.

◆ is_active()

bool ts::Voice::is_active ( ) const
inlinenodiscardnoexcept

Member Data Documentation

◆ pool

const VoicePool* ts::Voice::pool = nullptr

◆ index

int ts::Voice::index = 0

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