Vital
Loading...
Searching...
No Matches
vital::NoteHandler Class Referenceabstract

An interface for handling MIDI note events within a synthesizer or audio system. More...

#include <note_handler.h>

Inheritance diagram for vital::NoteHandler:
vital::SoundEngine vital::SoundEngine vital::VoiceHandler vital::EffectsModulationHandler vital::SynthVoiceHandler

Public Member Functions

virtual ~NoteHandler ()
 Virtual destructor.
 
virtual void allSoundsOff ()=0
 Immediately turns off all sounding notes and stops all sound production.
 
virtual void allNotesOff (int sample)=0
 Turns off all currently active notes, optionally specifying a sample index for timing.
 
virtual void allNotesOff (int sample, int channel)=0
 Turns off all currently active notes on a specific MIDI channel, optionally specifying a sample index.
 
virtual void noteOn (int note, mono_float velocity, int sample, int channel)=0
 Handles a MIDI note-on event, starting a note with a specified velocity and timing.
 
virtual void noteOff (int note, mono_float lift, int sample, int channel)=0
 Handles a MIDI note-off event, releasing a currently active note.
 

Detailed Description

An interface for handling MIDI note events within a synthesizer or audio system.

The NoteHandler interface provides methods to respond to note-on and note-off events from MIDI, as well as commands to release all active notes and silence all sounds. Classes implementing this interface can manage voice allocation, envelope triggering, and other note-related behaviors in response to incoming MIDI data.

Constructor & Destructor Documentation

◆ ~NoteHandler()

virtual vital::NoteHandler::~NoteHandler ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ allNotesOff() [1/2]

virtual void vital::NoteHandler::allNotesOff ( int sample)
pure virtual

Turns off all currently active notes, optionally specifying a sample index for timing.

Parameters
sampleThe sample index at which to turn off notes.

Implemented in vital::SoundEngine, vital::SoundEngine, and vital::VoiceHandler.

◆ allNotesOff() [2/2]

virtual void vital::NoteHandler::allNotesOff ( int sample,
int channel )
pure virtual

Turns off all currently active notes on a specific MIDI channel, optionally specifying a sample index.

Parameters
sampleThe sample index at which to turn off notes.
channelThe MIDI channel for which to turn off notes.

Implemented in vital::SoundEngine, vital::SoundEngine, and vital::VoiceHandler.

◆ allSoundsOff()

virtual void vital::NoteHandler::allSoundsOff ( )
pure virtual

Immediately turns off all sounding notes and stops all sound production.

Implemented in vital::SoundEngine, vital::SoundEngine, and vital::VoiceHandler.

◆ noteOff()

virtual void vital::NoteHandler::noteOff ( int note,
mono_float lift,
int sample,
int channel )
pure virtual

Handles a MIDI note-off event, releasing a currently active note.

Parameters
noteThe MIDI note number (0-127).
liftThe release velocity (0.0 to 1.0).
sampleThe sample index at which the note-off occurs.
channelThe MIDI channel on which the note-off occurred.

Implemented in vital::EffectsModulationHandler, vital::SoundEngine, vital::SoundEngine, vital::SynthVoiceHandler, and vital::VoiceHandler.

◆ noteOn()

virtual void vital::NoteHandler::noteOn ( int note,
mono_float velocity,
int sample,
int channel )
pure virtual

Handles a MIDI note-on event, starting a note with a specified velocity and timing.

Parameters
noteThe MIDI note number (0-127).
velocityThe velocity of the note-on event (0.0 to 1.0).
sampleThe sample index at which the note-on occurs.
channelThe MIDI channel on which the note-on occurred.

Implemented in vital::EffectsModulationHandler, vital::SoundEngine, vital::SoundEngine, vital::SynthVoiceHandler, and vital::VoiceHandler.


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