1 /*---------------------------------------------------------------------------*
2   Project:  NintendoWare
3   File:     snd_MmlCommand.h
4 
5   Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Revision: 21455 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NW_SND_MML_COMMAND_H_
17 #define NW_SND_MML_COMMAND_H_
18 
19 namespace nw {
20 namespace snd {
21 namespace internal {
22 namespace driver {
23 
24 class MmlCommand
25 {
26   public:
27 
28     enum Mml
29     {
30         // 可変長パラメータコマンド
31         MML_WAIT            = 0x80,
32         MML_PRG             = 0x81,
33 
34         // 制御コマンド
35         MML_OPEN_TRACK      = 0x88,
36         MML_JUMP            = 0x89,
37         MML_CALL            = 0x8a,
38 
39         // 接頭コマンド
40         MML_RANDOM          = 0xa0,
41         MML_VARIABLE        = 0xa1,
42         MML_IF              = 0xa2,
43         MML_TIME            = 0xa3,
44         MML_TIME_RANDOM     = 0xa4,
45         MML_TIME_VARIABLE   = 0xa5,
46 
47         // u8パラメータコマンド
48         MML_TIMEBASE        = 0xb0,
49         MML_ENV_HOLD        = 0xb1,
50         MML_MONOPHONIC      = 0xb2,
51         MML_VELOCITY_RANGE  = 0xb3,
52         MML_BIQUAD_TYPE     = 0xb4,
53         MML_BIQUAD_VALUE    = 0xb5,
54         MML_BANK_SELECT     = 0xb6,
55         MML_FRONT_BYPASS    = 0xbf,  // おそらく CTR 専用
56         MML_PAN             = 0xc0,
57         MML_VOLUME          = 0xc1,
58         MML_MAIN_VOLUME     = 0xc2,
59         MML_TRANSPOSE       = 0xc3,
60         MML_PITCH_BEND      = 0xc4,
61         MML_BEND_RANGE      = 0xc5,
62         MML_PRIO            = 0xc6,
63         MML_NOTE_WAIT       = 0xc7,
64         MML_TIE             = 0xc8,
65         MML_PORTA           = 0xc9,
66         MML_MOD_DEPTH       = 0xca,
67         MML_MOD_SPEED       = 0xcb,
68         MML_MOD_TYPE        = 0xcc,
69         MML_MOD_RANGE       = 0xcd,
70         MML_PORTA_SW        = 0xce,
71         MML_PORTA_TIME      = 0xcf,
72         MML_ATTACK          = 0xd0,
73         MML_DECAY           = 0xd1,
74         MML_SUSTAIN         = 0xd2,
75         MML_RELEASE         = 0xd3,
76         MML_LOOP_START      = 0xd4,
77         MML_VOLUME2         = 0xd5,
78         MML_PRINTVAR        = 0xd6,
79         MML_SURROUND_PAN    = 0xd7,
80         MML_LPF_CUTOFF      = 0xd8,
81         MML_FXSEND_A        = 0xd9,
82         MML_FXSEND_B        = 0xda,
83         MML_MAINSEND        = 0xdb,
84         MML_INIT_PAN        = 0xdc,
85         MML_MUTE            = 0xdd,
86         MML_FXSEND_C        = 0xde,
87         MML_DAMPER          = 0xdf,
88 
89         // s16パラメータコマンド
90         MML_MOD_DELAY       = 0xe0,
91         MML_TEMPO           = 0xe1,
92         MML_SWEEP_PITCH     = 0xe3,
93 
94         // 拡張コマンド
95         MML_EX_COMMAND      = 0xf0,
96 
97         // その他
98         MML_ENV_RESET       = 0xfb,
99         MML_LOOP_END        = 0xfc,
100         MML_RET             = 0xfd,
101         MML_ALLOC_TRACK     = 0xfe,
102         MML_FIN             = 0xff
103     };
104 
105     enum MmlEx
106     {
107         MML_SETVAR          = 0x80,
108         MML_ADDVAR          = 0x81,
109         MML_SUBVAR          = 0x82,
110         MML_MULVAR          = 0x83,
111         MML_DIVVAR          = 0x84,
112         MML_SHIFTVAR        = 0x85,
113         MML_RANDVAR         = 0x86,
114         MML_ANDVAR          = 0x87,
115         MML_ORVAR           = 0x88,
116         MML_XORVAR          = 0x89,
117         MML_NOTVAR          = 0x8a,
118         MML_MODVAR          = 0x8b,
119 
120         MML_CMP_EQ          = 0x90,
121         MML_CMP_GE          = 0x91,
122         MML_CMP_GT          = 0x92,
123         MML_CMP_LE          = 0x93,
124         MML_CMP_LT          = 0x94,
125         MML_CMP_NE          = 0x95,
126 
127         MML_USERPROC        = 0xe0
128     };
129 };
130 
131 
132 } // namespace nw::snd::internal::driver
133 } // namespace nw::snd::internal
134 } // namespace nw::snd
135 } // namespace nw
136 
137 
138 #endif /* NW_SND_MML_COMMAND_H_ */
139 
140