Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
midi.h File Reference

MIDI utils. More...

#include "zrythm-config.h"
#include <stdint.h>
#include <string.h>
#include "utils/types.h"
#include <gtk/gtk.h>
Include dependency graph for midi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MIDI_CH1_NOTE_ON   0x90
 
#define MIDI_CH1_NOTE_OFF   0x80
 
#define MIDI_CH1_POLY_AFTERTOUCH   0xA0
 Also known as Polyphonic Key Pressure.
 
#define MIDI_CH1_CTRL_CHANGE   0xB0
 
#define MIDI_CH1_PROG_CHANGE   0xC0
 
#define MIDI_CH1_CHAN_AFTERTOUCH   0xD0
 Also known as Channel Pressure.
 
#define MIDI_CH1_PITCH_WHEEL_RANGE   0xE0
 
#define MIDI_ALL_NOTES_OFF   0x7B
 
#define MIDI_ALL_SOUND_OFF   0x78
 
#define MIDI_SYSTEM_MESSAGE   0xF0
 
#define MIDI_SONG_POSITION   0xF2
 
#define MIDI_CLOCK_START   0xFA
 
#define MIDI_CLOCK_CONTINUE   0xFB
 
#define MIDI_CLOCK_BEAT   0xF8
 
#define MIDI_CLOCK_STOP   0xFC
 
#define MIDI_META_EVENT   0xFF
 

Functions

CONST const char * midi_get_controller_name (const midi_byte_t cc)
 Return the name of the given cc (0-127).
 
void midi_get_bytes_from_combined (const uint32_t val, midi_byte_t *lsb, midi_byte_t *msb)
 Used for MIDI controls whose values are split between MSB/LSB.
 
int midi_ctrl_change_get_ch_and_description (midi_byte_t *ctrl_change, char *buf)
 Saves a string representation of the given control change event in the given buffer.
 
int midi_get_msg_length (const uint8_t status_byte)
 Returns the length of the MIDI message based on the status byte.
 
CONST const char * midi_get_note_name (const midi_byte_t note)
 Returns the note name (eg, "C") for a value between 0 and 127.
 
void midi_get_note_name_with_octave (const midi_byte_t short_msg[3], char *buf)
 
void midi_get_hex_str (const midi_byte_t *msg, const size_t msg_sz, char *buf)
 
void midi_print_to_str (const midi_byte_t *msg, const size_t msg_sz, char *buf)
 
void midi_print (const midi_byte_t *msg, const size_t msg_sz)
 
void midi_get_meta_event_type_name (char *buf, const midi_byte_t type)
 

Detailed Description

MIDI utils.

Definition in file midi.h.