Anklang C++ API 0.0.0
Loading...
Searching...
No Matches
MidiEvent

#include "midievent.hh"

Public Member Functions

MidiMessagemessage () const
MidiEvent (const MidiEvent &other)
MidiEvent (MidiEventType etype=MidiEventType(0))
MidiEvent &operator= (const MidiEvent &other)
std::stringto_string () const
~MidiEvent ()

Public Attributes

union {
   uint8   fragment
   uint8   key
};
union {
   uint   length
   uint   noteid
   uint   param
};
union {
   struct {
      uint   cval
      float   value
   }
   struct {
      float   tuning
      float   velocity
   }
   char *   data
   double   pvalue
};
uintchannel: 4
uintframe: 12
MidiEventTypetype

Detailed Description

MidiEvent data structure.

Constructor & Destructor Documentation

MidiEvent() [1/2]

MidiEvent ( MidiEventType etype = MidiEventType (0))
explicit

MidiEvent() [2/2]

MidiEvent ( const MidiEvent & other)

~MidiEvent()

~MidiEvent ( )

Member Function Documentation

operator=()

MidiEvent & operator= ( const MidiEvent & other)

message()

MidiMessage message ( ) const

Determine extended message type an MidiEvent.

to_string()

std::string to_string ( ) const

Member Data Documentation

frame

uint frame

Offset into current block, delayed if negative.

channel

uint channel

0…15 for standard events

type

MidiEvent type, one of the MidiEventType members.

key

uint8 key

NOTE, KEY_PRESSURE MIDI note, 0…0x7f, 60 = middle C at 261.63 Hz.

fragment

uint8 fragment

Flag for multi-part control change mesages.

[union]

union { ... }

length

uint length

Data event length of byte array.

param

uint param

PROGRAM_CHANGE (program), CONTROL_CHANGE (controller):0…0x7f; PARAM_VALUE:uint32_t.

noteid

uint noteid

NOTE, identifier for note expression handling or 0xffffffff.

[union]

union { ... }

data

char* data

Data event byte array.

pvalue

double pvalue

Numeric parameter value, PARAM_VALUE.

value

float value

CONTROL_CHANGE 0…+1, CHANNEL_PRESSURE, 0…+1, PITCH_BEND -1…+1.

cval

uint cval

CONTROL_CHANGE control value, 0…0x7f.

velocity

float velocity

NOTE, KEY_PRESSURE, CHANNEL_PRESSURE, 0…+1.

tuning

float tuning

NOTE, fine tuning in ±cents.

[union]

union { ... }