home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 127.lha / Midi_1.5 / i / midi.i next >
Encoding:
Text File  |  1986-11-21  |  5.9 KB  |  286 lines

  1. ; midi/midi.i
  2.  
  3.     ifnd    MIDI_MIDI_I
  4. MIDI_MIDI_I set 1
  5.  
  6.     ifnd    EXEC_LISTS_I
  7.     include "exec/lists.i"
  8.     endc
  9.  
  10.  
  11. ; Definitions pertaining to MIDI are derived from MIDI 1.0 Detailed
  12. ; Specification (published by the Internation MIDI Association) and is
  13. ; current as of 12-Feb-87.
  14.  
  15. ; v1.5 - 22-Apr-88
  16.  
  17.  
  18. MIDINAME macro
  19.      dc.b     'midi.library',0
  20.      endm
  21.  
  22. MIDIVERSION equ 3
  23.  
  24.     STRUCTURE    MSource,LN_SIZE
  25.     APTR    ms_Image
  26.     STRUCT    ms_RPList,MLH_SIZE
  27.     APTR    ms_UserData
  28.     LABEL    sizeof_MSource
  29.  
  30. ; Node Types for MSource nodes
  31. NT_MSOURCE    equ  $20
  32. NT_PERMMSOURCE    equ  $21
  33.  
  34.     STRUCTURE    MDest,LN_SIZE
  35.     APTR    md_Image
  36.     STRUCT    md_RPList,MLH_SIZE
  37.     APTR    md_DestPort
  38.     APTR    md_UserData
  39.     LABEL    sizeof_MDest
  40.  
  41. ; Node Types for MDest nodes
  42. NT_MDEST    equ  $22
  43. NT_PERMMDEST    equ  $23
  44.  
  45.  
  46. ; Route Stuff
  47.  
  48. RIM_MAXCOUNT    equ  3
  49.  
  50.     STRUCTURE    RIMatch,0
  51.     UBYTE    rim_flags   ; flag bits defined below
  52.     STRUCT    rim_match,RIM_MAXCOUNT
  53.     LABEL    sizeof_RIMatch
  54.  
  55.  
  56. RIMF_COUNTBITS    equ  $03    ; mask for # of match values (0 for match all)
  57.  
  58.     BITDEF  RIM,EXTID,6     ; indicates all 3 bytes of rim_match = one 3 byte manuf. id
  59.     BITDEF  RIM,EXCLUDE,7   ; reverses logic of RIMatch so that all except those specified pass
  60.  
  61.  
  62.     STRUCTURE    MRouteInfo,0
  63.     UWORD    ri_MsgFlags
  64.     UWORD    ri_ChanFlags
  65.     BYTE    ri_ChanOffset
  66.     BYTE    ri_NoteOffset
  67.     STRUCT    ri_SysExMatch,sizeof_RIMatch
  68.     STRUCT    ri_CtrlMatch,sizeof_RIMatch
  69.     LABEL    sizeof_MRouteInfo
  70.  
  71. ; Midi Msg Type Flags for RouteInfo and returned by MidiMsgType
  72.  
  73. MMF_CHAN       equ  $00ff
  74.  
  75.     BITDEF  MM,NOTEOFF,0
  76.     BITDEF  MM,NOTEON,1
  77.     BITDEF  MM,POLYPRESS,2
  78.     BITDEF  MM,CTRL,3
  79.     BITDEF  MM,PROG,4
  80.     BITDEF  MM,CHANPRESS,5
  81.     BITDEF  MM,PITCHBEND,6
  82.     BITDEF  MM,MODE,7
  83.  
  84.     BITDEF  MM,SYSCOM,8
  85.     BITDEF  MM,SYSRT,9
  86.     BITDEF  MM,SYSEX,10
  87.  
  88.  
  89.     STRUCTURE    MRoutePtr,MLN_SIZE
  90.     APTR    rp_Route
  91.     LABEL    sizeof_MRoutePtr
  92.  
  93.     STRUCTURE    MRoute,0
  94.     APTR    mr_Source
  95.     APTR    mr_Dest
  96.     STRUCT    mr_SRoutePtr,sizeof_MRoutePtr
  97.     STRUCT    mr_DRoutePtr,sizeof_MRoutePtr
  98.     STRUCT    mr_RouteInfo,sizeof_MRouteInfo
  99.     LABEL    sizeof_MRoute
  100.  
  101.  
  102. ; MIDI message definitions
  103.  
  104. ; Status Bytes
  105.  
  106.    ; Channel Voice Messages (1sssnnnn)
  107. MS_NOTEOFF    equ $80
  108. MS_NOTEON     equ $90
  109. MS_POLYPRESS  equ $A0
  110. MS_CTRL       equ $B0
  111. MS_MODE       equ $B0
  112. MS_PROG       equ $C0
  113. MS_CHANPRESS  equ $D0
  114. MS_PITCHBEND  equ $E0
  115.  
  116.    ; System Common Messages
  117. MS_SYSEX      equ $F0
  118. MS_QTRFRAME   equ $F1
  119. MS_SONGPOS    equ $F2
  120. MS_SONGSELECT equ $F3
  121. MS_TUNEREQ    equ $F6
  122. MS_EOX          equ $F7
  123.  
  124.    ; System Real Time Messages
  125. MS_CLOCK      equ $F8
  126. MS_START      equ $FA
  127. MS_CONTINUE   equ $FB
  128. MS_STOP       equ $FC
  129. MS_ACTVSENSE  equ $FE
  130. MS_RESET      equ $FF
  131.  
  132.  
  133. ; Note Numbers
  134.  
  135. MIDDLEC equ 60
  136.  
  137.  
  138. ; Standard Controllers
  139.  
  140.    ; continuous 14 bit - MSB: 0-1f, LSB: 20-3f
  141. MC_MODWHEEL  equ $01
  142. MC_BREATH    equ $02
  143. MC_FOOT      equ $04
  144. MC_PORTATIME equ $05
  145. MC_DATAENTRY equ $06
  146. MC_VOLUME    equ $07
  147. MC_BALANCE   equ $08
  148. MC_PAN         equ $0a
  149. MC_EXPRESSION equ $0b
  150. MC_GENERAL1  equ $10
  151. MC_GENERAL2  equ $11
  152. MC_GENERAL3  equ $12
  153. MC_GENERAL4  equ $13
  154.  
  155.    ; continuous 7 bit (switches: 0-3f=off, 40-7f=on)
  156. MC_SUSTAIN   equ $40
  157. MC_PORTA     equ $41
  158. MC_SUSTENUTO equ $42
  159. MC_SOFTPEDAL equ $43
  160. MC_HOLD2     equ $45
  161. MC_GENERAL5  equ $50
  162. MC_GENERAL6  equ $51
  163. MC_GENERAL7  equ $52
  164. MC_GENERAL8  equ $53
  165. MC_TREMOLODEPTH equ $5c
  166. MC_CHORUSDEPTH    equ $5d
  167. MC_CELESTEDEPTH equ $5e
  168. MC_PHASERDEPTH    equ $5f
  169.  
  170.     ; parameters
  171. MC_DATAINCR  equ $60
  172. MC_DATADECR  equ $61
  173. MC_NRPNL     equ $62
  174. MC_NRPNH     equ $63
  175. MC_RPNL      equ $64
  176. MC_RPNH      equ $65
  177.  
  178.  
  179. ; Channel Modes
  180. ; updated from IMA Bulletin V4 06 (July 87)
  181.  
  182. MM_RESETCTRL equ $79
  183. MM_LOCAL   equ $7a
  184. MM_ALLOFF  equ $7b
  185. MM_OMNIOFF equ $7c
  186. MM_OMNION  equ $7d
  187. MM_MONO    equ $7e
  188. MM_POLY    equ $7f
  189.  
  190.  
  191. ; Registered Parameter Numbers
  192.  
  193. ; These are 16 bit values that need to be separated into two bytes for use
  194. ; with the MC_RPNH & MC_RPNL messages using 8 bit math (as opposed to 7
  195. ; bit math).  This is done so that the defines match the numbers from the
  196. ; MMA.    See MIDI 1.0 Detailed Spec p50 for more info.
  197.  
  198. ; updated from IMA Bulletin V4 06 (July 87)
  199.  
  200. MRP_PBSENS    equ $0000
  201. MRP_FINETUNE    equ $0001
  202. MRP_COURSETUNE    equ $0002
  203.  
  204.  
  205. ; Sys/Ex ID numbers
  206.  
  207. ; Now includes 3 byte extension for North America.  This new format uses a
  208. ; $00 as the sys/ex id followed by two additional bytes that actually
  209. ; identify the manufacturer.  These new extended id constants are 16 bit
  210. ; values (as opposed to 14 bit) that you will have to break apart yourself
  211. ; (like with the RPN's above).  Again, these are defined this way so that
  212. ; they match the MMA's listings.
  213.  
  214. ; The extended id's cannot be used in sys/ex number filtering (since it's
  215. ; only designed to handle single byte id's).  You can however use the
  216. ; MID_EXTENSION to filter only those manufactures that have one of the new
  217. ; id's.
  218.  
  219. ; updated from IMA Bulletin V4 10 (Nov 87)
  220.  
  221.  
  222.     ; North America
  223. MID_EXTENSION equ $00
  224. MID_SEQUENTIAL equ $01
  225. MID_IDP      equ $02
  226. MID_OCTAVEPLATEAU equ $03
  227. MID_MOOG     equ $04
  228. MID_PASSPORT equ $05
  229. MID_LEXICON  equ $06
  230. MID_KURZWEIL equ $07
  231. MID_FENDER   equ $08
  232. MID_AKG      equ $0a
  233. MID_VOYCE    equ $0b
  234. MID_WAVEFRAME equ $0c
  235. MID_ADA      equ $0d
  236. MID_GARFIELD equ $0e
  237. MID_ENSONIQ  equ $0f
  238. MID_OBERHEIM equ $10
  239. MID_APPLE    equ $11
  240. MID_GREYMATTER equ $12
  241. MID_PALMTREE equ $14
  242. MID_JLCOOPER equ $15
  243. MID_LOWREY   equ $16
  244. MID_ADAMSSMITH equ $17
  245. MID_EMU      equ $18
  246. MID_HARMONY  equ $19
  247. MID_ART      equ $1a
  248. MID_BALDWIN  equ $1b
  249. MID_EVENTIDE equ $1c
  250. MID_INVENTRONICS equ $1d
  251. MID_CLARITY  equ $1f
  252.  
  253.     ; Europe
  254. MID_SIEL     equ $21
  255. MID_SYNTHAXE equ $22
  256. MID_STEPP    equ $23
  257. MID_HOHNER   equ $24
  258. MID_TWISTER  equ $25
  259. MID_SOLTON   equ $26
  260. MID_JELLINGHAUS equ $27
  261. MID_SOUTHWORTH equ $28
  262. MID_PPG      equ $29
  263. MID_JEN      equ $2a
  264. MID_SSL      equ $2b
  265. MID_AUDIOVERITRIEB equ $2c
  266. MID_ELKA     equ $2f
  267. MID_DYNACORD equ $30
  268.  
  269.     ; Japan
  270. MID_KAWAI    equ $40
  271. MID_ROLAND   equ $41
  272. MID_KORG     equ $42
  273. MID_YAMAHA   equ $43
  274. MID_CASIO    equ $44
  275. MID_KAMIYA   equ $46
  276. MID_AKAI     equ $47
  277. MID_JAPANVICTOR equ $48
  278. MID_MESOSHA  equ $49
  279.  
  280. ; special Sys/Ex ID numbers: Non-Commercial, Non-Real Time, Real Time
  281. MID_NC    equ $7d
  282. MID_NRT equ $7e
  283. MID_RT    equ $7f
  284.  
  285.     endc
  286.