ardour
Public Member Functions | List of all members
Evoral::MIDIEvent< Time > Class Template Reference

#include <MIDIEvent.hpp>

Inheritance diagram for Evoral::MIDIEvent< Time >:
Evoral::Event< Time >

Public Member Functions

 MIDIEvent (EventType type=0, Time time=0, uint32_t size=0, uint8_t *buf=NULL, bool alloc=false)
 
 MIDIEvent (const Event< Time > &copy, bool alloc)
 
uint8_t type () const
 
void set_type (uint8_t type)
 
uint8_t channel () const
 
void set_channel (uint8_t channel)
 
bool is_note_on () const
 
bool is_note_off () const
 
bool is_cc () const
 
bool is_pitch_bender () const
 
bool is_pgm_change () const
 
bool is_note () const
 
bool is_aftertouch () const
 
bool is_channel_pressure () const
 
uint8_t note () const
 
void set_note (uint8_t n)
 
uint8_t velocity () const
 
void set_velocity (uint8_t value)
 
void scale_velocity (float factor)
 
uint8_t cc_number () const
 
void set_cc_number (uint8_t number)
 
uint8_t cc_value () const
 
void set_cc_value (uint8_t value)
 
uint8_t pitch_bender_lsb () const
 
uint8_t pitch_bender_msb () const
 
uint16_t pitch_bender_value () const
 
uint8_t pgm_number () const
 
void set_pgm_number (uint8_t number)
 
uint8_t aftertouch () const
 
uint8_t channel_pressure () const
 
bool is_channel_event () const
 
bool is_smf_meta_event () const
 
bool is_sysex () const
 
bool is_spp () const
 
bool is_mtc_quarter () const
 
bool is_mtc_full () const
 
uint16_t value () const
 
- Public Member Functions inherited from Evoral::Event< Time >
 Event (EventType type=0, Time time=Time(), uint32_t size=0, uint8_t *buf=NULL, bool alloc=false)
 
 Event (EventType type, Time time, uint32_t size, const uint8_t *buf)
 
 Event (const Event &copy, bool alloc)
 
 ~Event ()
 
const Eventoperator= (const Event &copy)
 
void set (const uint8_t *buf, uint32_t size, Time t)
 
bool operator== (const Event &other) const
 
bool operator!= (const Event &other) const
 
bool owns_buffer () const
 
void set_buffer (uint32_t size, uint8_t *buf, bool own)
 
void realloc (uint32_t size)
 
void clear ()
 
EventType event_type () const
 
Time time () const
 
Time original_time () const
 
uint32_t size () const
 
const uint8_t * buffer () const
 
uint8_t * buffer ()
 
void set_event_type (EventType t)
 
void set_time (Time)
 
void set_original_time (Time)
 
event_id_t id () const
 
void set_id (event_id_t n)
 

Additional Inherited Members

- Protected Attributes inherited from Evoral::Event< Time >
EventType _type
 
Time _original_time
 
Time _nominal_time
 
uint32_t _size
 
uint8_t * _buf
 
event_id_t _id
 
bool _owns_buf
 

Detailed Description

template<typename Time>
class Evoral::MIDIEvent< Time >

MIDI helper functions for an Event.

This class contains no data, an Evoral::Event can be cast to a MIDIEvent but the application must make sure the Event actually contains valid MIDI data for these functions to make sense.

Definition at line 42 of file MIDIEvent.hpp.

Constructor & Destructor Documentation

template<typename Time>
Evoral::MIDIEvent< Time >::MIDIEvent ( EventType  type = 0,
Time  time = 0,
uint32_t  size = 0,
uint8_t *  buf = NULL,
bool  alloc = false 
)
inline

Definition at line 44 of file MIDIEvent.hpp.

template<typename Time>
Evoral::MIDIEvent< Time >::MIDIEvent ( const Event< Time > &  copy,
bool  alloc 
)
inline

Definition at line 48 of file MIDIEvent.hpp.

Member Function Documentation

template<typename Time>
uint8_t Evoral::MIDIEvent< Time >::aftertouch ( ) const
inline

Definition at line 95 of file MIDIEvent.hpp.

template<typename Time>
uint8_t Evoral::MIDIEvent< Time >::cc_number ( ) const
inline

Definition at line 85 of file MIDIEvent.hpp.

template<typename Time>
uint8_t Evoral::MIDIEvent< Time >::cc_value ( ) const
inline

Definition at line 87 of file MIDIEvent.hpp.

template<typename Time>
uint8_t Evoral::MIDIEvent< Time >::channel ( ) const
inline

Definition at line 64 of file MIDIEvent.hpp.

template<typename Time>
uint8_t Evoral::MIDIEvent< Time >::channel_pressure ( ) const
inline

Definition at line 96 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_aftertouch ( ) const
inline

Definition at line 74 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_cc ( ) const
inline

Definition at line 70 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_channel_event ( ) const
inline

Definition at line 97 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_channel_pressure ( ) const
inline

Definition at line 75 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_mtc_full ( ) const
inline

Definition at line 103 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_mtc_quarter ( ) const
inline

Definition at line 102 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_note ( ) const
inline

Definition at line 73 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_note_off ( ) const
inline

Definition at line 69 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_note_on ( ) const
inline

Definition at line 68 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_pgm_change ( ) const
inline

Definition at line 72 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_pitch_bender ( ) const
inline

Definition at line 71 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_smf_meta_event ( ) const
inline

Definition at line 98 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_spp ( ) const
inline

Definition at line 101 of file MIDIEvent.hpp.

template<typename Time>
bool Evoral::MIDIEvent< Time >::is_sysex ( ) const
inline

Definition at line 99 of file MIDIEvent.hpp.

template<typename Time>
uint8_t Evoral::MIDIEvent< Time >::note ( ) const
inline

Definition at line 76 of file MIDIEvent.hpp.

template<typename Time>
uint8_t Evoral::MIDIEvent< Time >::pgm_number ( ) const
inline

Definition at line 93 of file MIDIEvent.hpp.

template<typename Time>
uint8_t Evoral::MIDIEvent< Time >::pitch_bender_lsb ( ) const
inline

Definition at line 89 of file MIDIEvent.hpp.

template<typename Time>
uint8_t Evoral::MIDIEvent< Time >::pitch_bender_msb ( ) const
inline

Definition at line 90 of file MIDIEvent.hpp.

template<typename Time>
uint16_t Evoral::MIDIEvent< Time >::pitch_bender_value ( ) const
inline

Definition at line 91 of file MIDIEvent.hpp.

template<typename Time>
void Evoral::MIDIEvent< Time >::scale_velocity ( float  factor)
inline

Definition at line 80 of file MIDIEvent.hpp.

template<typename Time>
void Evoral::MIDIEvent< Time >::set_cc_number ( uint8_t  number)
inline

Definition at line 86 of file MIDIEvent.hpp.

template<typename Time>
void Evoral::MIDIEvent< Time >::set_cc_value ( uint8_t  value)
inline

Definition at line 88 of file MIDIEvent.hpp.

template<typename Time>
void Evoral::MIDIEvent< Time >::set_channel ( uint8_t  channel)
inline

Definition at line 65 of file MIDIEvent.hpp.

template<typename Time>
void Evoral::MIDIEvent< Time >::set_note ( uint8_t  n)
inline

Definition at line 77 of file MIDIEvent.hpp.

template<typename Time>
void Evoral::MIDIEvent< Time >::set_pgm_number ( uint8_t  number)
inline

Definition at line 94 of file MIDIEvent.hpp.

template<typename Time>
void Evoral::MIDIEvent< Time >::set_type ( uint8_t  type)
inline

Definition at line 61 of file MIDIEvent.hpp.

template<typename Time>
void Evoral::MIDIEvent< Time >::set_velocity ( uint8_t  value)
inline

Definition at line 79 of file MIDIEvent.hpp.

template<typename Time>
uint8_t Evoral::MIDIEvent< Time >::type ( ) const
inline

Definition at line 60 of file MIDIEvent.hpp.

template<typename Time>
uint16_t Evoral::MIDIEvent< Time >::value ( ) const
inline

Definition at line 108 of file MIDIEvent.hpp.

template<typename Time>
uint8_t Evoral::MIDIEvent< Time >::velocity ( ) const
inline

Definition at line 78 of file MIDIEvent.hpp.


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