MidiInput

For reading midi events from hardware, for example, an electronic piano keyboard attached to the computer.

struct MidiInput {
version(ALSA)
snd_rawmidi_t* handle;
version(!ALSA && WinMM)
HMIDIIN handle;
}

Constructors

this
this(int card)

Always pass card == 0.

this
this(string device)

device is a device name. On Linux, it is the ALSA string. On Windows, it is currently ignored, so you should pass "default" or null so when it does get implemented your code won't break.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Postblit

A postblit is present on this object, but not explicitly documented in the source.

Members

Functions

record
void record(void delegate(uint timestamp, ubyte b1, ubyte b2, ubyte b3) dg)

Records raw midi input data from the device.

stop
void stop()

Meta