define __KERNEL_STRICT_NAMES to avoid inclusion of kernel types on systems that carry...
[cake.git] / compiler / include / midi / mididefs.h
blobb7f957e0d4cbe407a9bc60eebfc8a1490239e115
1 #ifndef MIDI_MIDIDEFS_H
2 #define MIDI_MIDIDEFS_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
7 */
11 This defines are not complete. Please fill in whenever programs
12 require them. Look here for documentation:
13 http://www.harmony-central.com/MIDI/Doc/doc.html
15 -Kjetil M.
19 #define MS_NoteOff 0x80
20 #define MS_NoteOn 0x90
22 #define MS_Prog 0xc0
23 #define MS_Ctrl 0xb0
25 #define MS_StatBits 0xf0
26 #define MS_ChanBits 0xf
28 #define MS_QtrFrame 0xf1
29 #define MS_SongPos 0xf2
31 #define MS_Clock 0xf8
32 #define MS_Start 0xfa
33 #define MS_Continue 0xfb
34 #define MS_Stop 0xfc
36 #define MM_ResetCtrl 0x79
37 #define MM_AllOff 0x7b
39 #define MIDIHiByte(word) ((word)>>7&0x7f)
40 #define MIDILoByte(word) ((word)&0x7f)
41 #define MIDIWord(hi,lo) (((hi)&0x7f)<<7|((lo)&0x7f))
43 #define voicemsg(m,ms) ( (((m)->mm_Status)&0xf0) == (ms) )
45 #define modemsg(m) ( voicemsg(m,0xb0) && (m)->mm_Data1>=0x78)
47 #if 0
48 Taken from the fireworks source. It is not compatible with AmigaOS, and is here only for
49 easier defining of noteon, etc.
50 # define noteoff(m) ( voicemsg(m,MS_NoteOff) || (voicemsg(m,MS_NoteOn) && (!(m)->mm_Data2)) )
51 #endif
53 #define noteon(m) (voicemsg(m,MS_NoteOn) && ((m)->mm_Data2))
55 #endif