Vital
Loading...
Searching...
No Matches
vital::VoiceState Struct Reference

Holds state data for a single voice, such as MIDI note, velocity, pitch bend, etc. More...

#include <voice_handler.h>

Public Member Functions

 VoiceState ()
 Default constructor initializes state to neutral or inactive values.
 

Public Attributes

VoiceEvent event
 The most recent voice event (on/off/kill).
 
int midi_note
 MIDI note (0-127 usually).
 
mono_float tuned_note
 Possibly adjusted by a Tuning object.
 
poly_float last_note
 Holds the last note played for this voice.
 
mono_float velocity
 Velocity of the note-on event.
 
mono_float lift
 Velocity of the note-off (a.k.a. release velocity).
 
mono_float local_pitch_bend
 Per-voice pitch bend amount for legato-like transitions.
 
int note_pressed
 Pressed note count (e.g., for note priority logic).
 
int note_count
 A global note counter (incremented with each note-on).
 
int channel
 Which MIDI channel this voice is associated with.
 
bool sostenuto_pressed
 True if this voice is currently held by sostenuto pedal.
 

Detailed Description

Holds state data for a single voice, such as MIDI note, velocity, pitch bend, etc.

Constructor & Destructor Documentation

◆ VoiceState()

vital::VoiceState::VoiceState ( )
inline

Default constructor initializes state to neutral or inactive values.

Member Data Documentation

◆ channel

int vital::VoiceState::channel

Which MIDI channel this voice is associated with.

◆ event

VoiceEvent vital::VoiceState::event

The most recent voice event (on/off/kill).

◆ last_note

poly_float vital::VoiceState::last_note

Holds the last note played for this voice.

◆ lift

mono_float vital::VoiceState::lift

Velocity of the note-off (a.k.a. release velocity).

◆ local_pitch_bend

mono_float vital::VoiceState::local_pitch_bend

Per-voice pitch bend amount for legato-like transitions.

◆ midi_note

int vital::VoiceState::midi_note

MIDI note (0-127 usually).

◆ note_count

int vital::VoiceState::note_count

A global note counter (incremented with each note-on).

◆ note_pressed

int vital::VoiceState::note_pressed

Pressed note count (e.g., for note priority logic).

◆ sostenuto_pressed

bool vital::VoiceState::sostenuto_pressed

True if this voice is currently held by sostenuto pedal.

◆ tuned_note

mono_float vital::VoiceState::tuned_note

Possibly adjusted by a Tuning object.

◆ velocity

mono_float vital::VoiceState::velocity

Velocity of the note-on event.


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