Midi Parser
A simple library that reads and parses binary MIDI files
MetaEvent Class Reference

Contains data of the meta event. More...

#include <MetaEvent.h>

Inheritance diagram for MetaEvent:
Event

Public Member Functions

 MetaEvent ()=default
 
 MetaEvent (const char *filePath, long addr)
 
 ~MetaEvent () override
 
MetaEventclone () const override
 
MidiType::EventType getType () const override
 
MidiType::MetaMessageStatus getStatus () const
 
uint8_t getLength () const
 
uint8_t * getData () const
 
- Public Member Functions inherited from Event
virtual ~Event ()=default
 
uint8_t getByteLength () const
 

Protected Attributes

uint8_t code {}
 
uint8_t status {}
 
uint8_t length {}
 
uint8_t * data {}
 
- Protected Attributes inherited from Event
uint8_t byteLength {}
 

Detailed Description

Contains data of the meta event.

Contains data of the Midi meta event and provides methods to retrieve it

Constructor & Destructor Documentation

◆ MetaEvent() [1/2]

MetaEvent::MetaEvent ( )
default

Default constructor

◆ MetaEvent() [2/2]

MetaEvent::MetaEvent ( const char *  filePath,
long  addr 
)

Reads the Midi file and constructs the event object

Parameters
filePathPath to the Midi file
addrAddress of the event in bytes

◆ ~MetaEvent()

MetaEvent::~MetaEvent ( )
override

Destroys the MetaEvent object

Member Function Documentation

◆ clone()

MetaEvent * MetaEvent::clone ( ) const
overridevirtual

Clones the event object

Returns
Pointer to the cloned event object

Implements Event.

◆ getData()

uint8_t * MetaEvent::getData ( ) const

Returns the event data

Returns
Pointer to event data. Should not be read past its length

◆ getLength()

uint8_t MetaEvent::getLength ( ) const

Returns the event data length

Returns
The length of the event data

◆ getStatus()

MidiType::MetaMessageStatus MetaEvent::getStatus ( ) const

Returns the event status

Returns
The status of the event

◆ getType()

MidiType::EventType MetaEvent::getType ( ) const
overridevirtual

Returns the event type

Returns
Event type. Always equals to MidiType::EventType::MetaEvent

Implements Event.


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