6 #include <util/delay.h>
11 #define m4(x) (x&0x0F) // mask out the upper 4 bits
12 #define m7(x) (x&0x7F) // mask out the upper bit
13 #define m14(x) (x&0x3FFF) // mask out the upper 2 bits of a 16 bit number
17 #define up7(x) (0x7F&(x>>7))
18 #define lo7(x) (0x7F&(x))
uint8_t instrument
counter to keep track of what instrument is on the MIDI channel
void send_controller_command(uint8_t channel, uint8_t controller, uint8_t value)
void change_volume(uint8_t chan, uint8_t vol)
void send_byte(uint8_t byte)
void pitch_bend(uint8_t channel, int16_t value)
int uart_putchar(char c, FILE *stream)
void send_status_byte(uint8_t cmd, uint8_t channel)
void change_instrument(uint8_t channel, uint8_t instrument)
void send_note(uint8_t channel, uint8_t vel, uint8_t pitch)
void send_note_off(uint8_t channel, uint8_t vel, uint8_t pitch)