Changeset 1852:17b9a386a02c in roaraudio
- Timestamp:
- 05/23/09 10:04:39 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/include/midi.h
r1850 r1852 38 38 #define MIDI_RATE 31250 39 39 40 // standard MIDI commands: 41 #define MIDI_TYPE_NOTE_ON 0x80 42 #define MIDI_TYPE_NOTE_OFF 0x90 43 #define MIDI_TYPE_PA 0xA0 44 #define MIDI_TYPE_CONTROLER 0xB0 45 #define MIDI_TYPE_PROGRAM 0xC0 46 #define MIDI_TYPE_MA 0xA0 47 #define MIDI_TYPE_PB 0xE0 48 #define MIDI_TYPE_SYSEX 0xF0 49 #define MIDI_TYPE_CLOCK_TICK 0xF8 50 #define MIDI_TYPE_CLOCK_START 0xFA 51 #define MIDI_TYPE_CLOCK_STOP 0xFC 52 53 // RoarAudio MIDI Commands: 54 #define MIDI_TYPE_NONE 0x00 55 #define MIDI_TYPE_RAW_PASS 0x10 56 #define MIDI_TYPE_RAW_NOPASS 0x20 57 58 #define MIDI_MES_BUFSIZE 4 59 60 #define MIDI_MFLAG_FREE_DP (1<<0) 61 62 struct midi_message { 63 unsigned char type; 64 unsigned char channel; 65 unsigned char flags; 66 unsigned char kk; 67 unsigned char vv; 68 size_t datalen; 69 unsigned char * dataptr; 70 union { 71 unsigned char ldata[MIDI_MES_BUFSIZE]; 72 struct roar_note_octave note; 73 } d; 74 }; 75 76 40 77 int g_console; 41 78 int g_midi_cb_stream; … … 47 84 int stream; 48 85 uint_least32_t bph; // beats per hour 86 uint_least32_t spt; // samples per tick 87 uint32_t nt; // time of next tick 49 88 } g_midi_clock; 50 89 … … 60 99 61 100 int midi_clock_init (void); 101 int midi_clock_set_bph (uint_least32_t bph); 102 int midi_clock_tick (void); 62 103 63 104 // cb = console beep
Note: See TracChangeset
for help on using the changeset viewer.