Just Intonation  Version 1.3.1 (19)
Explore key-independent dynamically adapting tuning in just intonation
Midi-Player module

Simple MidiPlayer for reading Midi files in real time. More...


class  MidiPlayer
 Midi Player. More...
struct  MidiPlayerEvent
 Structure used internally in the MidiPlayer to hold a Midi event. More...
class  MidiPlayerEventList
 Class managing the EventList in the MidiPlayer. More...
class  MidiPlayerParser
 Midi file parser. More...

Detailed Description

Simple MidiPlayer for reading Midi files in real time.

This module contains a simple Midi player which is able to read and parse a Midi file (*.mid), rendering a sequence of Midi event signals in real time. These Qt signals can be connected to a sampler or synthesizer.

To include this library add the following lines to the project file:

LIBS += -L<library-build-path>/ -lmidiplayer
# force relinking of the libraries
PRE_TARGETDEPS += <library-build-path>/libmidiplayer.a

In the source code one needs to include the file midiplayer.h.

The Midi player interacts with other components exclusively via signals and slots. To load a Midi file from a device call load(filename). Then start playing by calling play(). The Player periodically calls the signal sendMidiEvent (command,byte1,byte2,delta), transmitting the Midi code to the synthesizer.

Note that the timing of this player is very simple. In addition, the use of signals may introduce some latency and inaccuracy. However, these inaccuracies seem to be acceptable in the context of the just intonation project.

This library does depend on any other software components except Qt.