//::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//	Nintendo64  Original Music Macro Language
//
//	 MML Complier STANDARD HEADER
//			      for NEOS-64 
//
//	Version: 1997.04.16 (Wed.) 
//	Creator: Hideaki Shimizu (EAD.Nintendo Co.Ltd)
//
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::


//................................. PORT Macro

#define PORT0	0
#define PORT1	1
#define PORT2	2
#define PORT3	3
#define PORT4	4
#define PORT5	5
#define PORT6	6
#define PORT7	7

//................................. SWEEP(Note) Macro

#define _SWEEP_AB1_  $01
#define _SWEEP_BA1_  $02
#define _SWEEP_ABL_  $03
#define _SWEEP_BAL_  $04
#define _SWEEP_NBL_  $05		// SET BASEKEY BEFORE KEY   ***/
#define _ASWEEP_AB1_ $81	//  SET LENGTH NEXT NOTETIME ***/
#define _ASWEEP_BA1_ $82
#define _ASWEEP_ABL_ $83
#define _ASWEEP_BAL_ $84
#define _ASWEEP_NBL_ $85		// SET BASEKEY BEFORE KEY   ***/


//................................. MONOMODE(Sub) Macro


#define _NOTE_POLY_	0
#define _NOTE_MONO_	1
#define _LIMIT_INSUB_	2
#define _LIMIT_INGROUP_	4
#define _LIMIT_GLOBAL_	8


//................................. VOLUMEMODE(Group) Macro

#define _VOLCHG_MOVE_    0
#define _VOLCHG_FADEIN_  1
#define _VOLCHG_FADEOUT_ 2


//................................. Phase Macro

#define _PHASE_OVR_	0
#define _PHASE_DEF_	4
#define _PHASE_OR_	8
#define _PHASE_XOR_	12

#define _PHASE_L_	1
#define _PHASE_R_	2
#define _PHASE_NON_	0

//................................. Pause Macro


#define _PAUSE_SEQSTOP_		$80	// sequence stop. **/
#define _PAUSE_VOICECUT_	$40	// voice stop immediately,and not entry. **/
#define _PAUSE_VOLDOWN_		$20	// volume down.(x pausevolume) **/
#define _PAUSE_ENTRYOFF_	$10	// now voice will continue,but next isn't on. **/ 
#define _PAUSE_FREEZE_		$08	// restart OK. **/



//................................. Voice BG Loading Macro
#define VL_STATUS_LOADING $ff
#define VL_STATUS_ERROR   $00  		// Error disk or Rom-DCTF or BAD Number
#define VL_STATUS_FINISH  $01
#define VL_STATUS_ALREADY $02
#define VL_STATUS_MISS    $03		// Error but Rom-(ad)PCM 


//................................. WaveMemory Macro

#define PRG_PULSE1	  135
#define PRG_PULSE0	  134
#define PRG_PULSE	  131
#define PRG_SIN		  130
#define PRG_DELTA	  129
#define PRG_SAW	 	  128

//................................. GATE PERCENT 

#define g00	255
#define g01	253
#define g02	251
#define g03	248
#define g04	246
#define g05	243
#define g06	241
#define g07	238
#define g08	236
#define g09	233
#define g10	230
#define g11	228
#define g12	225
#define g13	223
#define g14	220
#define g15	218
#define g16	215
#define g17	212
#define g18	210
#define g19	207
#define g20	205
#define g21	202
#define g22	200
#define g23	197
#define g24	195
#define g25	192
#define g26	189
#define g27	187
#define g28	184
#define g29	182
#define g30	179
#define g31	177
#define g32	174
#define g33	172
#define g34	169
#define g35	166
#define g36	164
#define g37	161
#define g38	159
#define g39	156
#define g40	154
#define g41	151
#define g42	148
#define g43	146
#define g44	143
#define g45	141
#define g46	138
#define g47	136
#define g48	133
#define g49	131
#define g50	128
#define g51	125
#define g52	123
#define g53	120
#define g54	118
#define g55	115
#define g56	113
#define g57	110
#define g58	108
#define g59	105
#define g60	102
#define g61	100
#define g62	97
#define g63	95
#define g64	92
#define g65	90
#define g66	87
#define g67	84
#define g68	82
#define g69	79
#define g70	77
#define g71	74
#define g72	72
#define g73	69
#define g74	67
#define g75	64
#define g76	61
#define g77	59
#define g78	56
#define g79	54
#define g80	51
#define g81	49
#define g82	46
#define g83	44
#define g84	41
#define g85	38
#define g86	36
#define g87	33
#define g88	31
#define g89	28
#define g90	26
#define g91	23
#define g92	20
#define g93	18
#define g94	15
#define g95	13
#define g96	10
#define g97	8
#define g98	5
#define g99	3
#define g100	0


//................................. ENV PERCENT 

#define e00        0
#define e01     3276
#define e02     4633
#define e03     5675
#define e04     6553
#define e05     7326
#define e06     8026
#define e07     8669
#define e08     9267
#define e09     9830
#define e10    10361
#define e11    10867
#define e12    11350
#define e13    11814
#define e14    12260
#define e15    12690
#define e16    13106
#define e17    13510
#define e18    13901
#define e19    14282
#define e20    14653
#define e21    15015
#define e22    15369
#define e23    15714
#define e24    16052
#define e25    16383
#define e26    16707
#define e27    17026
#define e28    17338
#define e29    17645
#define e30    17947
#define e31    18243
#define e32    18535
#define e33    18823
#define e34    19106
#define e35    19385
#define e36    19660
#define e37    19931
#define e38    20198
#define e39    20462
#define e40    20723
#define e41    20981
#define e42    21235
#define e43    21486
#define e44    21735
#define e45    21980
#define e46    22223
#define e47    22463
#define e48    22701
#define e49    22936
#define e50    23169
#define e51    23400
#define e52    23628
#define e53    23854
#define e54    24078
#define e55    24300
#define e56    24520
#define e57    24738
#define e58    24954
#define e59    25168
#define e60    25381
#define e61    25591
#define e62    25800
#define e63    26008
#define e64    26213
#define e65    26417
#define e66    26620
#define e67    26820
#define e68    27020
#define e69    27218
#define e70    27414
#define e71    27609
#define e72    27803
#define e73    27996
#define e74    28187
#define e75    28377
#define e76    28565
#define e77    28752
#define e78    28939
#define e79    29123
#define e80    29307
#define e81    29490
#define e82    29671
#define e83    29852
#define e84    30031
#define e85    30209
#define e86    30386
#define e87    30563
#define e88    30738
#define e89    30912
#define e90    31085
#define e91    31257
#define e92    31429
#define e93    31599
#define e94    31768
#define e95    31937
#define e96    32104
#define e97    32271
#define e98    32437
#define e99    32602
#define e100   32700
