Skip to content

File MIDI_UART_Input.cpp

FileList > examples > MIDI_UART_Input > MIDI_UART_Input.cpp

Go to the source code of this file

  • #include "daisy_seed.h"

Classes

Type Name
struct SourcedMidiEvent

Public Types

Type Name
enum Source

Public Attributes

Type Name
FIFO< SourcedMidiEvent, 128 > event_log
DaisySeed hw
constexpr const bool kUseRealtimeCallback = true
MidiUartHandler midi

Public Functions

Type Name
const char * GetStringForRealTimeType (SystemRealTimeType type)
const char * GetStringForSource (Source src)
void MidiRealtimeCallback (MidiEvent & event)
int main (void)

Public Types Documentation

enum Source

enum Source {
    Queue,
    RealtimeCb,
    Unknown
};

Indicates from where the MIDI Message was logged


Public Attributes Documentation

variable event_log

FIFO<SourcedMidiEvent, 128> event_log;

FIFO to hold messages as we're ready to print them


variable hw

DaisySeed hw;

Global Hardware access


variable kUseRealtimeCallback

constexpr const bool kUseRealtimeCallback;

Select whether to use the optional system realtime callback or not.


variable midi

MidiUartHandler midi;

Public Functions Documentation

function GetStringForRealTimeType

const char * GetStringForRealTimeType (
    SystemRealTimeType type
) 

Helper for getting human readable strings from realtime messages


function GetStringForSource

const char * GetStringForSource (
    Source src
) 

Helper for getting a string for the source


function MidiRealtimeCallback

void MidiRealtimeCallback (
    MidiEvent & event
) 

Optional callback for synchronous realtime message handling

Typically, you would handle your timing-sensitive behavior right here to take advantage of the syncronous handling. In this case, we're just going to forward this to the log to make sure no messages are missed.


function main

int main (
    void
) 


The documentation for this class was generated from the following file external-docs/libDaisy/examples/MIDI_UART_Input/MIDI_UART_Input.cpp