Crudebyte Logo
midiport.h File Reference

MIDI support layer for JACK. More...

#include <jack/weakmacros.h>
#include <jack/types.h>
#include <stdlib.h>

Go to the source code of this file.

Detailed Description

MIDI support layer for JACK.

Refer to Reading and writing MIDI data for more details about the purpose of this API part.

Definition in file midiport.h.


struct  _jack_midi_event
 A Jack MIDI event. More...


typedef unsigned char jack_midi_data_t
typedef struct _jack_midi_event jack_midi_event_t
 A Jack MIDI event.


uint32_t jack_midi_get_event_count (void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT
int jack_midi_event_get (jack_midi_event_t *event, void *port_buffer, uint32_t event_index) JACK_OPTIONAL_WEAK_EXPORT
void jack_midi_clear_buffer (void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT
size_t jack_midi_max_event_size (void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT
jack_midi_data_tjack_midi_event_reserve (void *port_buffer, jack_nframes_t time, size_t data_size) JACK_OPTIONAL_WEAK_EXPORT
int jack_midi_event_write (void *port_buffer, jack_nframes_t time, const jack_midi_data_t *data, size_t data_size) JACK_OPTIONAL_WEAK_EXPORT
uint32_t jack_midi_get_lost_event_count (void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT

Typedef Documentation

typedef unsigned char jack_midi_data_t

Base type for raw MIDI event data contained in jack_midi_event_t.

Definition at line 71 of file midiport.h.

A Jack MIDI event.

MIDI events in JACK are provided as raw standard MIDI data, along with a time stamp which indicates when this MIDI event was received by JACK within the current process slice that your application currently handles.

It is out of the scope of this documentation to describe the format of MIDI data in general. Please refer to the official MIDI protocol specification (i.e. on for more details about MIDI data.

To handle MIDI data in JACK as raw MIDI data packets, was chosen intentionally, to not i.e. force a specific version of the MIDI standard, vendor specific extensions of the protocol and so on, which may have cluttered the JACK API unnecessarily. JACK was chosen to remain neutral on those aspects.

Refer to _jack_midi_event for the members of this structure.

Copyright © MMXIII Crudebyte. All rights reserved.