Architecture

Approach to data

RMR is made to work well with in realtime, so:

  • It doesn’t use OOP features and is written in C

  • It is oriented on data (structs in particular) and operations possible with those

Queue use

Both input and virtual input modes are using thread that communicates with the main code using GLib’s Asynchronous Queue mechanism for both messages and errors.

Messages are contained in a structure, MIDI_message.

MIDI_message.buf contains message bytes and MIDI_message.count contains length of this byte array.

Each MIDI_message also contains a MIDI_message.timestamp member: a double value, based on snd_seq_real_time_t contents and previous time values.

Double pointers

Often enough, you will be seeing pointers to pointers in code. It is done for allocating memory in a function or something close to that, usually.