Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::MidiNoteTracker Class Reference

#include <midi_state_tracker.h>

Inheritance diagram for ARDOUR::MidiNoteTracker:
[legend]

Public Member Functions

 MidiNoteTracker ()
 
virtual ~MidiNoteTracker ()
 
virtual void track (const uint8_t *evbuf)
 
virtual void dump (std::ostream &) const
 
virtual void reset ()
 
void track (const MidiBuffer::const_iterator &from, const MidiBuffer::const_iterator &to)
 
void add (uint8_t note, uint8_t chn)
 
void remove (uint8_t note, uint8_t chn)
 
void resolve_notes (MidiBuffer &buffer, samplepos_t time, bool reset=true)
 
void resolve_notes (Evoral::EventSink< samplepos_t > &buffer, samplepos_t time)
 
void resolve_notes (MidiSource &src, const Source::WriterLock &lock, Temporal::Beats time)
 
void flush_notes (MidiBuffer &buffer, samplepos_t time, bool reset=true)
 
bool empty () const
 
uint16_t on () const
 
bool active (uint8_t note, uint8_t channel) const
 
template<typename Time >
void track (const Evoral::Event< Time > &ev)
 

Private Member Functions

void push_notes (MidiBuffer &dst, samplepos_t time, bool reset, int cmd, int velocity)
 

Private Attributes

uint8_t _active_notes [128 *16]
 
uint16_t _on
 

Detailed Description

Tracks played notes, so they can be resolved in potential stuck note situations (e.g. looping, transport stop, etc).

Definition at line 41 of file midi_state_tracker.h.

Constructor & Destructor Documentation

◆ MidiNoteTracker()

ARDOUR::MidiNoteTracker::MidiNoteTracker ( )

◆ ~MidiNoteTracker()

virtual ARDOUR::MidiNoteTracker::~MidiNoteTracker ( )
inlinevirtual

Definition at line 45 of file midi_state_tracker.h.

Member Function Documentation

◆ active()

bool ARDOUR::MidiNoteTracker::active ( uint8_t  note,
uint8_t  channel 
) const
inline

Definition at line 62 of file midi_state_tracker.h.

◆ add()

void ARDOUR::MidiNoteTracker::add ( uint8_t  note,
uint8_t  chn 
)

◆ dump()

virtual void ARDOUR::MidiNoteTracker::dump ( std::ostream &  ) const
virtual

Reimplemented in ARDOUR::MidiStateTracker.

◆ empty()

bool ARDOUR::MidiNoteTracker::empty ( ) const
inline

Definition at line 60 of file midi_state_tracker.h.

◆ flush_notes()

void ARDOUR::MidiNoteTracker::flush_notes ( MidiBuffer buffer,
samplepos_t  time,
bool  reset = true 
)

◆ on()

uint16_t ARDOUR::MidiNoteTracker::on ( ) const
inline

Definition at line 61 of file midi_state_tracker.h.

◆ push_notes()

void ARDOUR::MidiNoteTracker::push_notes ( MidiBuffer dst,
samplepos_t  time,
bool  reset,
int  cmd,
int  velocity 
)
private

◆ remove()

void ARDOUR::MidiNoteTracker::remove ( uint8_t  note,
uint8_t  chn 
)

◆ reset()

virtual void ARDOUR::MidiNoteTracker::reset ( )
virtual

Reimplemented in ARDOUR::MidiStateTracker.

◆ resolve_notes() [1/3]

void ARDOUR::MidiNoteTracker::resolve_notes ( Evoral::EventSink< samplepos_t > &  buffer,
samplepos_t  time 
)

◆ resolve_notes() [2/3]

void ARDOUR::MidiNoteTracker::resolve_notes ( MidiBuffer buffer,
samplepos_t  time,
bool  reset = true 
)

◆ resolve_notes() [3/3]

void ARDOUR::MidiNoteTracker::resolve_notes ( MidiSource src,
const Source::WriterLock lock,
Temporal::Beats  time 
)

◆ track() [1/3]

template<typename Time >
void ARDOUR::MidiNoteTracker::track ( const Evoral::Event< Time > &  ev)
inline

Definition at line 67 of file midi_state_tracker.h.

◆ track() [2/3]

void ARDOUR::MidiNoteTracker::track ( const MidiBuffer::const_iterator from,
const MidiBuffer::const_iterator to 
)

◆ track() [3/3]

virtual void ARDOUR::MidiNoteTracker::track ( const uint8_t *  evbuf)
virtual

Reimplemented in ARDOUR::MidiStateTracker.

Member Data Documentation

◆ _active_notes

uint8_t ARDOUR::MidiNoteTracker::_active_notes[128 *16]
private

Definition at line 72 of file midi_state_tracker.h.

◆ _on

uint16_t ARDOUR::MidiNoteTracker::_on
private

Definition at line 73 of file midi_state_tracker.h.


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