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: 28194 $
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 #ifdef NW_PLATFORM_RVL
87         MML_FXSEND_C        = 0xde,
88 #endif
89         MML_DAMPER          = 0xdf,
90 
91         // s16パラメータコマンド
92         MML_MOD_DELAY       = 0xe0,
93         MML_TEMPO           = 0xe1,
94         MML_SWEEP_PITCH     = 0xe3,
95 
96         // 拡張コマンド
97         MML_EX_COMMAND      = 0xf0,
98 
99         // その他
100         MML_ENV_RESET       = 0xfb,
101         MML_LOOP_END        = 0xfc,
102         MML_RET             = 0xfd,
103         MML_ALLOC_TRACK     = 0xfe,
104         MML_FIN             = 0xff
105     };
106 
107     enum MmlEx
108     {
109         MML_SETVAR          = 0x80,
110         MML_ADDVAR          = 0x81,
111         MML_SUBVAR          = 0x82,
112         MML_MULVAR          = 0x83,
113         MML_DIVVAR          = 0x84,
114         MML_SHIFTVAR        = 0x85,
115         MML_RANDVAR         = 0x86,
116         MML_ANDVAR          = 0x87,
117         MML_ORVAR           = 0x88,
118         MML_XORVAR          = 0x89,
119         MML_NOTVAR          = 0x8a,
120         MML_MODVAR          = 0x8b,
121 
122         MML_CMP_EQ          = 0x90,
123         MML_CMP_GE          = 0x91,
124         MML_CMP_GT          = 0x92,
125         MML_CMP_LE          = 0x93,
126         MML_CMP_LT          = 0x94,
127         MML_CMP_NE          = 0x95,
128 
129         MML_USERPROC        = 0xe0
130     };
131 };
132 
133 
134 } // namespace nw::snd::internal::driver
135 } // namespace nw::snd::internal
136 } // namespace nw::snd
137 } // namespace nw
138 
139 
140 #endif /* NW_SND_MML_COMMAND_H_ */
141 
142