チェンジセット 2989

差分発生行の前後
無視リスト:
コミット日時:
2009/08/07 21:39:54 (3 年前)
コミッタ:
keim
ログメッセージ:

サウンドライブラリ SiON ver0.5.6 更新 物理音源追加,サンプル追加,waveColor追加,アルペジェータ追加,その他色々

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/SiOPM/trunk/doc/mml_reference/siopm_mml_ref_05.html

    r2905 r2989  
    22  <head> 
    33    <meta http-equiv='content-type' content='text/html;charset=utf-8'> 
    4     <title>SiOPM MML reference (version 0.5.5)</title> 
     4    <title>SiOPM MML reference (version 0.5.6)</title> 
    55    <script type='text/javascript' src='jquery.js'></script> 
    66    <script type='text/javascript' src='siopm.js'></script> 
     
    139139  </head> 
    140140  <body> 
    141     <h1>SiOPM MML reference (version 0.5.5)</h1> 
     141    <h1>SiOPM MML reference (version 0.5.6)</h1> 
    142142    <div class='copyright'>(c) keim +Si+ 2009</div> 
    143143 
     
    329329            <td class='state'>#WAV<i>n</i>{...}(formula...);</td> 
    330330            <td class='range'>n;0 - 255</td> 
    331             <td class='desc'>SCC音源(%4)で参照する波形を定義する.テーブルのエントリ数32個でSCC音源波形を記述する.波形テーブルは -128~127の範囲で記述する.エントリ数が32以下の場合は 0 が埋められる. 
     331            <td class='desc'>Wave table音源(%4)で参照する波形を定義する.テーブルのエントリ数32個でSCC音源波形を記述する.波形テーブルは -128~127の範囲で記述する.エントリ数が32以下の場合は 0 が埋められる. 
    332332<pre class='example'> 
    333333#WAV0{(0,127)8,(127,-128)16,(-128,0)8}; %4@0 cde; 
     334</pre> 
     335            </td> 
     336          </tr> 
     337          <tr> 
     338            <td class='state'>#WAVCOLOR<i>n</i>{...};</td> 
     339            <td class='range'>n;0 - 255</td> 
     340            <td class='desc'>Wave table音源(%4)で参照する波形をunsigned int 16進数文字列(wave color)で定義する.wave color は,ハモンドオルガンの基音より上の7本のドローバーをLSBから各4bitで表現したunsigned int値で,MSBの4bitで合成する波形の番号を指定できる. 
     341<pre class='example'> 
     342#WAVCOLOR0{08400f0f}; %4@0 cde; 
    334343</pre> 
    335344            </td> 
     
    11471156                    <tr><td class='tone'>@2: <span class='mml'>%2@2c</span></td><td>93bitNoise(15bit LFSR の bit0^bit6 をローテートシフトした際のbit0の値を出力)</td></tr> 
    11481157                    <tr><td class='tone'>@3: <span class='mml'>%2@3c</span></td><td>Hi-pass Noise(WhiteNoiseに対して,低周波カットフィルタをかけたノイズ)</td></tr> 
    1149                     <tr><td class='tone'>@4-7: <span class='mml'></span></td><td>(reserved)</td><tr> 
     1158                    <tr><td class='tone'>@4: <span class='mml'>%2@4c</span></td><td>PinkNoise(1/fノイズ)</td></tr> 
     1159                    <tr><td class='tone'>@5-7: <span class='mml'></span></td><td>(reserved)</td><tr> 
    11501160                    <tr><td class='tone'>@8: <span class='mml'>%2@8cde</span></td><td>PeriodicNoise(16bit LFSR の bit0 をローテートシフトした際のbit0の値を出力.ノートによるピッチ指定)</td></tr> 
    11511161                    <tr><td class='tone'>@9: <span class='mml'>%2@9cde</span></td><td>93bitNoise(ノートによるピッチ指定)</td></tr> 
     
    12431253                </td> 
    12441254              </tr> 
     1255              <tr> 
     1256                <td>'%11' PMS Guitar</td> 
     1257                <td><b>物理音源ギター.</b>Karplus-Strong アルゴリズムによるギター物理音源. 
     1258                  <table class='no_border'><tbody> 
     1259                    <tr><td class='tone'>@0,48,48,0,0,20s8(default)<span class='mml'>%11o3e1^1^2^8;%11o3r8a1^1^2;%11o4r4d1^1^4.;%11r4.o4g1^1^4;%11r2o4b1^1;%11r8^2o5e1^1^8;</span></td><td>ナイロン弦ギター</td></tr> 
     1260                    <tr><td class='tone'>@0,48,48,0,0,16s4<span class='mml'>#T=%11@0,48,48,0,0,16s4q8;t160;To3v12a1^1;To4v8r64e1^1;To4v7r32a1^1;To4v7r32.b1^1;To5v6r16e1^1;</span></td><td>スチール弦ギター</td></tr> 
     1261                    <tr><td class='tone'>@0,48,40,4,0,16s6@f96,0<span class='mml'>#EFFECT0{chorus delay};#T=%11@0,48,40,4,0,16s6@f96,0q8;t160;To3v12$a1^1;To4v8r4$e1^1;To4v7r4.$a4a4a2a4a4a2;To4v7r2.$b2b2b1;To5v6r1$e1^1;</span></td><td>クリーンギター(+Chorus)</td></tr> 
     1262                    <tr><td class='tone'>@0,48,24,8,0,17s2@f80<span class='mml'>#T=%11@0,48,24,8,0,17s2@f80mp0,6,10,10@v64,16;t160;#M=o3q8l8aga&lt;c^2&gt;aga&lt;c*d0rc4.&gt;aga&lt;d*edc&gt;s,-63a1^1;Tv12M;Tv8kt7M;</span></td><td>ディストーションギター</td></tr> 
     1263                    <tr><td class='tone'>@0,48,40,4,80,18s32<span class='mml'>t144;%11@0,48,40,4,80,18s32q8o2q8l8$v16av12a&lt;c16cc+s40c+16s32deg&gt;a16&lt;s48a16&gt;s32a&lt;c&c+16de16&gt;v8s48ev12s32f+g+;</span></td><td>スラップベース</td></tr> 
     1264                  </tbody></table> 
     1265                </td> 
     1266              </tr> 
    12451267            </tbody></table> 
    12461268          </div> 
    12471269        </div> 
    12481270        <div class='appendex'> 
    1249           <div class='title'>'@'の第2-15引数</div> 
     1271          <div class='title'>'@'の第2-15引数(%10,%11以外)</div> 
    12501272          <div> 
    12511273            '@'コマンドは15引数を持ち,オペレータの出力設定を行う. 
  • as3/SiOPM/trunk/doc/mml_reference/siopm_mml_ref_05_e.html

    r2905 r2989  
    22  <head> 
    33    <meta http-equiv='content-type' content='text/html;charset=utf-8'> 
    4     <title>SiOPM MML reference (version 0.5.5)</title> 
     4    <title>SiOPM MML reference (version 0.5.6)</title> 
    55    <script type='text/javascript' src='jquery.js'></script> 
    66    <script type='text/javascript' src='siopm.js'></script> 
     
    139139  </head> 
    140140  <body> 
    141     <h1>SiOPM MML reference (version 0.5.5)</h1> 
     141    <h1>SiOPM MML reference (version 0.5.6)</h1> 
    142142    <div class='copyright'>(c) keim +Si+ 2009</div> 
    143143 
     
    331331<pre class='example'> 
    332332#WAV0{(0,127)8,(127,-128)16,(-128,0)8}; %4@0 cde; 
     333</pre> 
     334            </td> 
     335          </tr> 
     336          <tr> 
     337            <td class='state'>#WAVCOLOR<i>n</i>{...};</td> 
     338            <td class='range'>n;0 - 255</td> 
     339            <td class='desc'>Define the wave shape by wave color refer from SCC sound module (%4). The wave color is an unsigned int hex expressing 7 draw bars(from 8th to 1st) of Hammond organ by each 4bits. The 4 MSBs are the wave shape number. 
     340<pre class='example'> 
     341#WAVCOLOR0{08400f0f}; %4@0 cde; 
    333342</pre> 
    334343            </td> 
     
    11501159                    <tr><td class='tone'>@2: <span class='mml'>%2@2c</span></td><td>93bit Noise (Short noise from 15bit LFSR)</td></tr> 
    11511160                    <tr><td class='tone'>@3: <span class='mml'>%2@3c</span></td><td>Hi-pass Noise (White Noise with high-pass filter)</td></tr> 
    1152                     <tr><td class='tone'>@4-7: <span class='mml'></span></td><td>(reserved)</td><tr> 
     1161                    <tr><td class='tone'>@4: <span class='mml'>%2@4c</span></td><td>PinkNoise(1/f noise)</td></tr> 
     1162                    <tr><td class='tone'>@5-7: <span class='mml'></span></td><td>(reserved)</td><tr> 
    11531163                    <tr><td class='tone'>@8: <span class='mml'>%2@8cde</span></td><td>Periodic Noise (wave from rotate shifted 16bit LFSR)</td></tr> 
    11541164                    <tr><td class='tone'>@9: <span class='mml'>%2@9cde</span></td><td>93bit Noise with pitch</td></tr> 
     
    12431253                  <table class='no_border'><tbody> 
    12441254                    <tr><td class='tone'>@0(sample)<span class='mml'>%10v16l8cre4cce.c16rc16c16ercce.e16;%10o4l16[v16c8cv12c]8v16f1</span></td><td>* The SWF loaded some mp3 data for demonstration.</td></tr> 
     1255                  </tbody></table> 
     1256                </td> 
     1257              </tr> 
     1258              <tr> 
     1259                <td>'%11' PMS Guitar</td> 
     1260                <td><b>Physical Modeling Synthesize Guitar</b>Physical Modeling Synthesizer with Karplus-Strong alogrism. 
     1261                  <table class='no_border'><tbody> 
     1262                    <tr><td class='tone'>@0,48,48,0,0,20s8(default)<span class='mml'>%11o3e1^1^2^8;%11o3r8a1^1^2;%11o4r4d1^1^4.;%11r4.o4g1^1^4;%11r2o4b1^1;%11r8^2o5e1^1^8;</span></td><td>Classic guitar</td></tr> 
     1263                    <tr><td class='tone'>@0,48,48,0,0,16s4<span class='mml'>#T=%11@0,48,48,0,0,16s4q8;t160;To3v12a1^1;To4v8r64e1^1;To4v7r32a1^1;To4v7r32.b1^1;To5v6r16e1^1;</span></td><td>Acoustic guitar</td></tr> 
     1264                    <tr><td class='tone'>@0,48,40,4,0,16s6@f96,0<span class='mml'>#EFFECT0{chorus delay};#T=%11@0,48,40,4,0,16s6@f96,0q8;t160;To3v12$a1^1;To4v8r4$e1^1;To4v7r4.$a4a4a2a4a4a2;To4v7r2.$b2b2b1;To5v6r1$e1^1;</span></td><td>Clean sound (w/ chorus)</td></tr> 
     1265                    <tr><td class='tone'>@0,48,24,8,0,17s2@f80<span class='mml'>#T=%11@0,48,24,8,0,17s2@f80mp0,6,10,10@v64,16;t160;#M=o3q8l8aga&lt;c^2&gt;aga&lt;c*d0rc4.&gt;aga&lt;d*edc&gt;s,-63a1^1;Tv12M;Tv8kt7M;</span></td><td>Distortion</td></tr> 
     1266                    <tr><td class='tone'>@0,48,40,4,80,18s32<span class='mml'>t144;%11@0,48,40,4,80,18s32q8o2q8l8$v16av12a&lt;c16cc+s40c+16s32deg&gt;a16&lt;s48a16&gt;s32a&lt;c&c+16de16&gt;v8s48ev12s32f+g+;</span></td><td>Slap bass</td></tr> 
    12451267                  </tbody></table> 
    12461268                </td> 
  • as3/SiOPM/trunk/samples/Tutorials/CustomFader.as

    r2697 r2989  
    4343             
    4444            // listen click 
     45            driver.addEventListener(SiONEvent.STREAM_START, _onStreamStart); 
    4546            driver.addEventListener(SiONEvent.STREAM, _onStream); 
    4647            stage.addEventListener("click", _onClick); 
     
    5657            // play with an argument of resetEffector = false. 
    5758            driver.play(drumLoop, false); 
    58              
    59             // start custom fade with 5[sec].  
    60             // The "5 * 44100 / 2048" calculates callbacking count of _onStream in 5 seconds. 
    61             lpfFader.setFade(_fadeLPF, 0, 1, 5 * 44100 / 2048); 
    6259        } 
    6360         
     
    6865            // The "10 * 44100 / 2048" calculates callbacking count of _onStream in 10 seconds. 
    6966            if (!lpfFader.isActive) lpfFader.setFade(_fadeLPF, 1, 0, 10 * 44100 / 2048); 
     67        } 
     68         
     69         
     70        private function _onStreamStart(e:SiONEvent) : void 
     71        { 
     72            // start custom fade with 5[sec].  
     73            // The "5 * 44100 / 2048" calculates callbacking count of _onStream in 5 seconds. 
     74            lpfFader.setFade(_fadeLPF, 0, 1, 5 * 44100 / 2048); 
    7075        } 
    7176         
  • as3/SiOPM/trunk/src/org/si/sion/SiONDriver.as

    r2903 r2989  
    1717    import org.si.sion.events.*; 
    1818    import org.si.sion.sequencer.base.MMLSequence; 
     19    import org.si.sion.sequencer.base.MMLEvent; 
    1920    import org.si.sion.sequencer.SiMMLSequencer; 
    2021    import org.si.sion.sequencer.SiMMLTrack; 
     
    5354    //---------------------------------------- 
    5455        /** version number */ 
    55         static public const VERSION:String = "0.5.5"; 
     56        static public const VERSION:String = "0.5.6"; 
    5657         
    5758         
     
    129130         
    130131        private var _trackEventQueue:Vector.<SiONTrackEvent>; 
     132        private var _timerSequence:MMLSequence; 
     133        private var _timerIntervalEvent:MMLEvent; 
     134        private var _timerCallback:Function; 
    131135         
    132136        private var _renderBuffer:Vector.<Number>;  // rendering buffer 
     
    307311            _soundTransform = new SoundTransform(); 
    308312            _fader = new Fader(); 
     313            _timerSequence = new MMLSequence(); 
    309314 
    310315            // initialize 
     
    324329            _debugMode = false; 
    325330            _isFinishSeqDispatched = false; 
     331            _timerCallback = null; 
     332            _timerSequence.alloc(); 
     333            _timerSequence.appendNewEvent(MMLEvent.REPEAT_ALL, 0); 
     334            _timerSequence.appendNewEvent(MMLEvent.TIMER, 0); 
     335            _timerIntervalEvent = _timerSequence.appendNewEvent(MMLEvent.WAIT, 0, 0); 
    326336             
    327337            _backgroundSound = null; 
     
    623633         
    624634         
     635        /** Set timer interruption. 
     636         *  @param length16th Interupting interval in 16th beat. 
     637         *  @param callback Callback function. the Type is function():void. 
     638         */ 
     639        public function setTimerInterruption(length16th:Number=0, callback:Function=null) : void 
     640        { 
     641            _timerIntervalEvent.length = length16th * sequencer.setting.resolution * 0.0625; 
     642            _timerCallback = callback; 
     643        } 
     644         
     645         
     646        /** Set callback interval of SiONTrackEvent.BEAT. 
     647         *  @param length16th Interval in 16th beat. 2^n is only available(1,2,4,8,16....). 
     648         */ 
     649        public function setBeatCallbackInterval(length16th:Number=1) : void 
     650        { 
     651            var filter:int = 1; 
     652            while (length16th > 1.5) { 
     653                filter <<= 1; 
     654                length16th *= 0.5 
     655            } 
     656            sequencer.onBeatCallbackFilter = filter - 1; 
     657        } 
     658         
     659         
    625660         
    626661         
     
    636671            for (len=table.length; len>0; len>>=1) bits++; 
    637672            if (bits<2) return null; 
    638             var waveTable:Vector.<int> = SiONUtil.logTransVector(table); 
     673            var waveTable:Vector.<int> = SiONUtil.logTransVector(table, false); 
    639674            waveTable.length = 1<<bits; 
    640675            return SiOPMTable.registerWaveTable(index, waveTable); 
     
    741776         *  @param trackID new tracks id. 
    742777         *  @param eventTriggerID Event trigger id. 
    743          *  @param noteOnTrigger note on trigger type. 
    744          *  @param noteOffTrigger note off trigger type. 
     778         *  @param noteOnTrigger note on trigger type. 0 sets no trigger at note on. 
     779         *  @param noteOffTrigger note off trigger type. 0 sets no trigger at note off. 
    745780         *  @return SiMMLTrack to play the note. 
    746781         */ 
    747         public function playSound(note:int, length:Number=0, delay:Number=0, quant:Number=0, trackID:int=0,  
    748                                   eventTriggerID:int=0, noteOnTrigger:int=0, noteOffTrigger:int=0) : SiMMLTrack 
     782        public function playSound(note:int,  
     783                                  length:Number      = 0,  
     784                                  delay:Number       = 0,  
     785                                  quant:Number       = 0,  
     786                                  trackID:int        = 0,  
     787                                  eventTriggerID:int = 0,  
     788                                  noteOnTrigger:int  = 0,  
     789                                  noteOffTrigger:int = 0) : SiMMLTrack 
    749790        { 
    750791            trackID = (trackID & SiMMLTrack.TRACK_ID_FILTER) | SiMMLTrack.DRIVER_NOTE_ID_OFFSET; 
     
    778819        /** Note on. This function only is available after play(). The NOTE_ON_STREAM event is dispatched inside. 
    779820         *  @param note note number [0-127]. 
    780          *  @param voice SiONVoice to play note. You can spqcify null, but it sets only a default square wave... 
     821         *  @param voice SiONVoice to play note. You can spqcify null, but it sets only a default square wave. 
    781822         *  @param length note length in 16th beat. 0 sets no note off, this means you should call noteOff(). 
    782823         *  @param delay note on delay units in 16th beat. 
     
    788829         *  @return SiMMLTrack to play the note. 
    789830         */ 
    790         public function noteOn(note:int, voice:SiONVoice,  
    791                                length:Number=0, delay:Number=0, quant:Number=0, trackID:int=0,  
    792                                eventTriggerID:int=0, noteOnTrigger:int=0, noteOffTrigger:int=0) : SiMMLTrack 
     831        public function noteOn(note:int,  
     832                               voice:SiONVoice    = null,  
     833                               length:Number      = 0,  
     834                               delay:Number       = 0,  
     835                               quant:Number       = 0,  
     836                               trackID:int        = 0,  
     837                               eventTriggerID:int = 0,  
     838                               noteOnTrigger:int  = 0,  
     839                               noteOffTrigger:int = 0) : SiMMLTrack 
    793840        { 
    794841            trackID = (trackID & SiMMLTrack.TRACK_ID_FILTER) | SiMMLTrack.DRIVER_NOTE_ID_OFFSET; 
     
    844891         *  @param quant quantize in 16th beat. 0 sets no quantization. 4 sets quantization by 4th beat. 
    845892         *  @param trackID new tracks id. 
    846          *  @return delay time in sample count 
    847          */ 
    848         public function sequenceOn(data:SiONData, voice:SiONVoice=null,  
    849                                    length:Number=0, delay:Number=0, quant:Number=1, trackID:int=0) : int 
     893         *  @return SiMMLTrack of the last sequence channel. 
     894         */ 
     895        public function sequenceOn(data:SiONData,  
     896                                   voice:SiONVoice  = null,  
     897                                   length:Number    = 0,  
     898                                   delay:Number     = 0,  
     899                                   quant:Number     = 1,  
     900                                   trackID:int      = 0) : SiMMLTrack 
    850901        { 
    851902            trackID = (trackID & SiMMLTrack.TRACK_ID_FILTER) | SiMMLTrack.DRIVER_SEQUENCE_ID_OFFSET; 
     
    861912                seq = seq.nextSequence; 
    862913            } 
    863             return delaySamples
     914            return mmlTrack
    864915        } 
    865916         
     
    869920         *  @param delay sequence off delay units in 16th beat. 
    870921         *  @param quant quantize in 16th beat. 0 sets no quantization. 4 sets quantization by 4th beat. 
    871          *  @return delay time in sample count 
    872          */ 
    873         public function sequenceOff(trackID:int, delay:Number=0, quant:Number=1) : int 
     922         *  @return SiMMLTrack of the last stopped channel. 
     923         */ 
     924        public function sequenceOff(trackID:int, delay:Number=0, quant:Number=1) : SiMMLTrack 
    874925        { 
    875926            trackID = (trackID & SiMMLTrack.TRACK_ID_FILTER) | SiMMLTrack.DRIVER_SEQUENCE_ID_OFFSET; 
    876             var delaySamples:int = sequencer.calcSampleDelay(0, delay, quant)
     927            var delaySamples:int = sequencer.calcSampleDelay(0, delay, quant), stoppedTrack:SiMMLTrack = null
    877928            for each (var mmlTrack:SiMMLTrack in sequencer.tracks) { 
    878929                if (mmlTrack.trackID == trackID) { 
    879930                    mmlTrack.sequenceOff(delaySamples); 
     931                    stoppedTrack = mmlTrack; 
    880932                } 
    881933            } 
    882             return delaySamples
     934            return stoppedTrack
    883935        } 
    884936         
     
    926978        } 
    927979         
     980        // call back on beat 
     981        private function _callbackBeat(bufferIndex:int, beatCounter:int) : void 
     982        { 
     983            var event:SiONTrackEvent = new SiONTrackEvent(SiONTrackEvent.BEAT, this, null, bufferIndex, 0, beatCounter); 
     984            _trackEventQueue.push(event); 
     985        } 
     986         
     987         
     988         
    928989         
    929990    // operate event listener 
     
    9431004            if (_listenEvent != NO_LISTEN) throw errorDriverBusy(LISTEN_PROCESS); 
    9441005            addEventListener(Event.ENTER_FRAME, _process_onEnterFrame, false, _eventListenerPrior); 
     1006            if (hasEventListener(SiONTrackEvent.BEAT)) sequencer._callbackBeat = _callbackBeat; 
     1007            else sequencer._callbackBeat = null; 
    9451008            _dispatchStreamEvent = (hasEventListener(SiONEvent.STREAM)); 
    9461009            _prevFrameTime = getTimer(); 
     
    9581021            case LISTEN_PROCESS: 
    9591022                removeEventListener(Event.ENTER_FRAME, _process_onEnterFrame); 
     1023                sequencer._callbackBeat = null; 
    9601024                _dispatchStreamEvent = false; 
    9611025                break; 
     
    9721036        private function _parseSystemCommand(systemCommands:Array) : Boolean 
    9731037        { 
    974             var id:int, effectSet:Boolean = false; 
     1038            var id:int, wcol:uint, effectSet:Boolean = false; 
    9751039            for each (var cmd:* in systemCommands) { 
    9761040                switch(cmd.command){ 
    9771041                case "#EFFECT": 
    9781042                    effectSet = true; 
    979                     effector.parseMML(cmd.number, cmd.content); 
     1043                    effector.parseMML(cmd.number, cmd.content, cmd.postfix); 
     1044                    break; 
     1045                case "#WAVCOLOR": 
     1046                    wcol = parseInt(cmd.content, 16); 
     1047                    setWaveTable(cmd.number, SiONUtil.waveColor(wcol)); 
    9801048                    break; 
    9811049                } 
     
    11591227            if (_data) _parseSystemCommand(_data.systemCommands);           // parse #EFFECT (initialize effector inside) 
    11601228            effector.prepareProcess();                                      // set stream number inside 
    1161         } 
     1229            _trackEventQueue.length = 0;                                    // clear event que 
     1230             
     1231             
     1232            if (_timerCallback != null) { 
     1233                sequencer.setGlobalSequence(_timerSequence); // set timer interruption 
     1234                sequencer._callbackTimer = _timerCallback; 
     1235            } 
     1236       } 
    11621237         
    11631238         
  • as3/SiOPM/trunk/src/org/si/sion/SiONVoice.as

    r2806 r2989  
    6868        /** Set by #MA&#64; parameters Array */ 
    6969        public function set paramMA3(args:Array) : void { channelParam = Translator.setMA3Param(new SiOPMChannelParam(), args); } 
     70         
     71        /** Set phisical modeling synth guitar parameters. 
     72         *  @param ar attack rate of plunk energy 
     73         *  @param dr decay rate of plunk energy 
     74         *  @param tl total level of plunk energy 
     75         *  @param fixedPitch plunk noise pitch 
     76         *  @param ws wave shape of plunk 
     77         *  @param tension sustain rate of the tone 
     78         */ 
     79        public function setPMSGuitar(ar:int=48, dr:int=48, tl:int=0, fixedPitch:int=0, ws:int=20, tension:int=8) : void { 
     80            moduleType = 11; 
     81            channelNum = 1; 
     82            param = [1, 0, 0, ws, ar, dr, 0, 63, 15, tl, 0, 0, 1, 0, 0, 0, 0, fixedPitch]; 
     83            releaseRate = tension; 
     84        } 
     85         
     86         
     87        /** Set low pass filter parameters. 
     88         *  @param ar attack rate of plunk energy 
     89         *  @param dr decay rate of plunk energy 
     90         *  @param tl total level of plunk energy 
     91         *  @param fixedPitch plunk noise pitch 
     92         *  @param ws wave shape of plunk 
     93         *  @param tension sustain rate of the tone 
     94         */ 
     95        public function setLPFilter() : void { 
     96        } 
    7097    } 
    7198} 
  • as3/SiOPM/trunk/src/org/si/sion/effector/SiEffectBase.as

    r2633 r2989  
    1313        /** @private [internal use] used by manager */ 
    1414        internal var _isFree:Boolean = true; 
    15          
    1615         
    1716         
  • as3/SiOPM/trunk/src/org/si/sion/effector/SiEffectConnector.as

    r2697 r2989  
    8686        /** Parse MML for effector  
    8787         *  @param mml MML string. 
     88         *  @param postfix Postfix string. 
    8889         */ 
    89         public function parseMML(mml:String) : void 
     90        public function parseMML(mml:String, postfix:String) : void 
    9091        { 
    9192            var res:*, rex:RegExp = /([a-zA-Z_]+|,)\s*([.\-\d]+)?/g, i:int, 
  • as3/SiOPM/trunk/src/org/si/sion/effector/SiEffectModule.as

    r2806 r2989  
    4747            register("ds",      SiEffectDownSampler); 
    4848            register("speaker", SiEffectSpeakerSimulator); 
    49             //register("comp",    SiEffectCompressor); // bugful!! 
     49            register("comp",    SiEffectCompressor); // bugful!! 
    5050             
    5151            register("lf", SiFilterLowPass); 
     
    180180         *  @param slot Effector slot number. 
    181181         *  @param mml MML string. 
    182          */ 
    183         public function parseMML(slot:int, mml:String) : void 
    184         { 
    185             _effectConnectors[slot].parseMML(mml); 
     182         *  @param postfix Postfix string. 
     183         */ 
     184        public function parseMML(slot:int, mml:String, postfix:String) : void 
     185        { 
     186            _effectConnectors[slot].parseMML(mml, postfix); 
    186187        } 
    187188    } 
  • as3/SiOPM/trunk/src/org/si/sion/effector/SiEffectStereoChorus.as

    r2625 r2989  
    1919        private var _feedback:Number; 
    2020        private var _depth:Number; 
     21        private var _wet:Number; 
    2122         
    2223        private var _lfoPhase:int; 
     
    4849         *  @param frequency frequency of chorus[Hz]. 
    4950         *  @param depth depth of chorus. 
     51         *  @param wet wet mixing level. 
    5052         */ 
    51         public function setParameters(delayTime:Number=20, feedback:Number=0.2, frequency:Number=4, depth:Number=20) : void { 
     53        public function setParameters(delayTime:Number=20, feedback:Number=0.2, frequency:Number=4, depth:Number=20, wet:Number=0.5) : void { 
    5254            var offset:int = int(delayTime * 44.1); 
    5355            if (offset > DELAY_BUFFER_FILTER) offset = DELAY_BUFFER_FILTER; 
     
    5860            if (_lfoStep <= 4) _lfoStep = 4; 
    5961            _lfoResidueStep = _lfoStep<<1; 
     62            _wet = wet; 
    6063        } 
    6164         
     
    8184                          (!isNaN(args[1])) ? (args[1]*0.01) : 0.2, 
    8285                          (!isNaN(args[2])) ? args[2] : 4, 
    83                           (!isNaN(args[3])) ? args[3] : 20); 
     86                          (!isNaN(args[3])) ? args[3] : 20, 
     87                          (!isNaN(args[4])) ? (args[4]*0.01) : 0.5); 
    8488        } 
    8589         
     
    118122        private function _processLFO(buffer:Vector.<Number>, startIndex:int, length:int) : void 
    119123        { 
    120             var i:int, n:Number, m:Number, p:int, imax:int = startIndex + length, dly:int=int(_sin[_lfoPhase] * _depth); 
     124            var i:int, n:Number, m:Number, p:int, imax:int = startIndex + length, dly:int=int(_sin[_lfoPhase] * _depth), 
     125                dry:Number = 1-_wet; 
    121126            for (i=startIndex; i<imax;) { 
    122127                p = (_pointerRead + dly) & DELAY_BUFFER_FILTER; 
     
    124129                m = buffer[i] - n * _feedback; 
    125130                _delayBufferL[_pointerWrite] = m; 
    126                 buffer[i] = n; i++; 
     131                buffer[i] *= dry; 
     132                buffer[i] += n * _wet; i++; 
    127133                n = _delayBufferR[p]; 
    128134                m = buffer[i] - n * _feedback; 
    129135                _delayBufferR[_pointerWrite] = m; 
    130                 buffer[i] = n; i++; 
     136                buffer[i] *= dry; 
     137                buffer[i] += n * _wet; i++; 
    131138                _pointerWrite = (_pointerWrite+1) & DELAY_BUFFER_FILTER; 
    132139                _pointerRead  = (_pointerRead +1) & DELAY_BUFFER_FILTER; 
  • as3/SiOPM/trunk/src/org/si/sion/effector/SiEffectStereoDelay.as

    r2625 r2989  
    2020        private var _readBufferL:Vector.<Number>; 
    2121        private var _readBufferR:Vector.<Number>; 
     22        private var _wet:Number; 
    2223         
    2324         
     
    4344         *  @param feedback feedback decay(-1-1). Negative value to invert phase. 
    4445         *  @param isCross stereo crossing delay. 
     46         *  @param wet mixing level. 
    4547         */ 
    46         public function setParameters(delayTime:Number=250, feedback:Number=0.25, isCross:Boolean=false) : void { 
     48        public function setParameters(delayTime:Number=250, feedback:Number=0.25, isCross:Boolean=false, wet:Number=1) : void { 
    4749            var offset:int = int(delayTime * 44.1), 
    4850                cross:int  = (isCross) ? 1 : 0; 
     
    5254            _readBufferL = _delayBuffer[cross]; 
    5355            _readBufferR = _delayBuffer[1-cross]; 
     56            _wet = wet; 
    5457        } 
    5558         
     
    7174            setParameters((!isNaN(args[0])) ? args[0] : 250, 
    7275                          (!isNaN(args[1])) ? (args[1]*0.01) : 0.25, 
    73                           (args[2] == 1)); 
     76                          (args[2] == 1), 
     77                          (!isNaN(args[3])) ? (args[3]*0.01) : 1); 
    7478        } 
    7579         
     
    9397            var i:int, n:Number, imax:int = startIndex + length, 
    9498                writeBufferL:Vector.<Number> = _delayBuffer[0], 
    95                 writeBufferR:Vector.<Number> = _delayBuffer[1]; 
     99                writeBufferR:Vector.<Number> = _delayBuffer[1], 
     100                dry:Number = 1-_wet; 
    96101            for (i=startIndex; i<imax;) { 
    97102                n = _readBufferL[_pointerRead]; 
    98103                writeBufferL[_pointerWrite] = buffer[i] - n * _feedback; 
    99                 buffer[i] = n; i++; 
     104                buffer[i] *= dry; 
     105                buffer[i] += n * _wet; i++; 
    100106                n = _readBufferR[_pointerRead]; 
    101107                writeBufferR[_pointerWrite] = buffer[i] - n * _feedback; 
    102                 buffer[i] = n; i++; 
     108                buffer[i] *= dry; 
     109                buffer[i] += n * _wet; i++; 
    103110                _pointerWrite = (_pointerWrite+1) & DELAY_BUFFER_FILTER; 
    104111                _pointerRead  = (_pointerRead +1) & DELAY_BUFFER_FILTER; 
  • as3/SiOPM/trunk/src/org/si/sion/effector/SiEffectStereoReverb.as

    r2903 r2989  
    1818        private var _pointerWrite:int; 
    1919        private var _feedback0:Number, _feedback1:Number, _feedback2:Number; 
     20        private var _wet:Number; 
    2021         
    2122         
     
    4041         *  @param delay2 short delay(0-1). 
    4142         *  @param feedback feedback decay(-1-1). Negative value to invert phase. 
     43         *  @param wet mixing level. 
    4244         */ 
    43         public function setParameters(delay1:Number=0.7, delay2:Number=0.4, feedback:Number=0.8) : void { 
     45        public function setParameters(delay1:Number=0.7, delay2:Number=0.4, feedback:Number=0.8, wet:Number=1) : void { 
    4446            if (delay1<0.01) delay1=0.01; 
    4547            else if (delay1>0.99) delay1=0.99; 
     
    5456            _feedback1 = feedback*0.3; 
    5557            _feedback2 = feedback*0.5; 
     58            _wet = wet; 
    5659        } 
    5760         
     
    7174        override public function mmlCallback(args:Vector.<Number>) : void 
    7275        { 
    73             setParameters((!isNaN(args[1])) ? (args[1]*0.01) : 0.7, 
     76            setParameters((!isNaN(args[0])) ? (args[0]*0.01) : 0.7, 
    7477                          (!isNaN(args[1])) ? (args[1]*0.01) : 0.4, 
    75                           (!isNaN(args[2])) ? (args[2]*0.01) : 0.8); 
     78                          (!isNaN(args[2])) ? (args[2]*0.01) : 0.8, 
     79                          (!isNaN(args[3])) ? (args[3]*0.01) : 1); 
    7680        } 
    7781         
     
    9195            startIndex <<= 1; 
    9296            length <<= 1; 
    93             var i:int, n:Number, m:Number, imax:int = startIndex + length; 
     97            var i:int, n:Number, m:Number, imax:int = startIndex + length, 
     98                dry:Number = 1-_wet; 
    9499            for (i=startIndex; i<imax;) { 
    95100                n  = _delayBufferL[_pointerRead0] * _feedback0; 
     
    97102                n += _delayBufferL[_pointerRead2] * _feedback2; 
    98103                _delayBufferL[_pointerWrite] = buffer[i] - n; 
    99                 buffer[i] = n; i++; 
     104                buffer[i] *= dry; 
     105                buffer[i] += n * _wet; i++; 
    100106                n  = _delayBufferR[_pointerRead0] * _feedback0; 
    101107                n += _delayBufferR[_pointerRead1] * _feedback1; 
    102108                n += _delayBufferR[_pointerRead2] * _feedback2; 
    103109                _delayBufferR[_pointerWrite] = buffer[i] - n; 
    104                 buffer[i] = n; i++; 
     110                buffer[i] *= dry; 
     111                buffer[i] += n * _wet; i++; 
    105112                _pointerWrite = (_pointerWrite + 1) & DELAY_BUFFER_FILTER; 
    106113                _pointerRead0 = (_pointerRead0 + 1) & DELAY_BUFFER_FILTER; 
  • as3/SiOPM/trunk/src/org/si/sion/effector/SiEffectWaveShaper.as

    r2903 r2989  
    5353        { 
    5454            setParameters((!isNaN(args[0])) ? args[0]*0.01 : 0.5, 
    55                           (!isNaN(args[0])) ? args[0]*0.01 : 1.0); 
     55                          (!isNaN(args[1])) ? args[1]*0.01 : 1.0); 
    5656        } 
    5757         
  • as3/SiOPM/trunk/src/org/si/sion/events/SiONTrackEvent.as

    r2806 r2989  
    8989         */ 
    9090        public static const NOTE_OFF_FRAME:String = 'noteOffFrame'; 
     91         
     92         
     93        /** Dispatch on beat while streaming. This event is called in each beat timing on frame. When you want to listen this event, you have to set addEventListener() before SiONDriver.play(). 
     94         * <p>The properties of the event object have the following values:</p> 
     95         * <table class=innertable> 
     96         * <tr><th>Property</th><th>Value</th></tr> 
     97         * <tr><td>cancelable</td><td>false</td></tr> 
     98         * <tr><td>driver</td><td>SiONDriver instance playing now.</td></tr> 
     99         * <tr><td>data</td><td>SiONData instance playing now. This property is null if you call SiONDriver.play() with null of the 1st argument.</td></tr> 
     100         * <tr><td>streamBuffer</td><td>null.</td></tr> 
     101         * <tr><td>track</td><td>null</td></tr> 
     102         * <tr><td>eventTriggerID</td><td>Counter in 16th beat.</td></tr> 
     103         * <tr><td>note</td><td>0</td></tr> 
     104         * <tr><td>bufferIndex</td><td>Buffering index</td></tr> 
     105         * </table> 
     106         * @eventType stream 
     107         */ 
     108        public static const BEAT:String = 'beat'; 
    91109 
    92110         
     
    101119         * <tr><td>track</td><td>null</td></tr> 
    102120         * <tr><td>eventTriggerID</td><td>null</td></tr> 
    103          * <tr><td>note</td><td>null</td></tr> 
     121         * <tr><td>note</td><td>0</td></tr> 
    104122         * <tr><td>bufferIndex</td><td>Buffering index</td></tr> 
    105123         * </table> 
     
    160178    //---------------------------------------- 
    161179        /** This event can be created only in the callback function inside. @private */ 
    162         public function SiONTrackEvent(type:String, driver:SiONDriver, track:SiMMLTrack, bufferIndex:int=0
     180        public function SiONTrackEvent(type:String, driver:SiONDriver, track:SiMMLTrack, bufferIndex:int=0, note:int=0, id:int=0
    163181        { 
    164182            super(type, driver, null, true); 
     
    171189                _frameTriggerTimer = _frameTriggerDelay; 
    172190            } else { 
    173                 _note = 0
    174                 _eventTriggerID = 0
     191                _note = note
     192                _eventTriggerID = id
    175193                _bufferIndex = bufferIndex; 
    176194                _frameTriggerDelay = bufferIndex / driver.sequencer.sampleRate + driver.latency; 
  • as3/SiOPM/trunk/src/org/si/sion/module/SiOPMChannelBase.as

    r2697 r2989  
    170170        /** is idling ? */ 
    171171        public function get isIdling() : Boolean { return _isIdling; } 
     172         
     173        /** Is filter active ? */ 
     174        public function get isFilterActive() : Boolean { return _filterOn; } 
     175         
    172176         
    173177         
     
    520524         
    521525         
    522         // ring modulation 
    523         private function _applyRingModulation(pointer:SLLint, len:int) : void 
     526        /** ring modulation */ 
     527        protected function _applyRingModulation(pointer:SLLint, len:int) : void 
    524528        { 
    525529            var i:int, rp:SLLint = _ringPipe; 
     
    533537         
    534538         
    535         // low-pass filter 
    536         private function _applyLPFilter(pointer:SLLint, len:int) : void 
     539        /** low-pass filter */ 
     540        protected function _applyLPFilter(pointer:SLLint, len:int) : void 
    537541        { 
    538542            var i:int, imax:int, step:int, I:int, V:int, out:int, cut:Number, fb:Number; 
  • as3/SiOPM/trunk/src/org/si/sion/module/SiOPMChannelFM.as

    r2903 r2989  
    176176         
    177177         
    178         private function _lfoSwitch(sw:Boolean) : void 
     178        /** @private [internal use] lfo on/off */ 
     179        protected function _lfoSwitch(sw:Boolean) : void 
    179180        { 
    180181            var new_lfo_on:int = int(sw); 
     
    541542    // processing operator x1 
    542543    //-------------------------------------------------- 
    543         // without lfo_update() 650[ms] 
     544        // without lfo_update() 
    544545        private function _proc1op_loff(len:int) : void 
    545546        { 
     
    596597         
    597598         
    598         // with lfo_update() 800[ms] 
     599        // with lfo_update() 
    599600        private function _proc1op_lon(len:int) : void 
    600601        { 
  • as3/SiOPM/trunk/src/org/si/sion/module/SiOPMChannelManager.as

    r2625 r2989  
    1313        static public const CT_CHANNEL_FM:int = 0; 
    1414        static public const CT_CHANNEL_SAMPLER:int = 1; 
    15         static public const CT_MAX:int = 2; 
     15        static public const CT_CHANNEL_KS:int = 2; 
     16        static public const CT_MAX:int = 3; 
    1617         
    1718         
     
    163164            _channelManagers[CT_CHANNEL_FM]      = new SiOPMChannelManager(SiOPMChannelFM,          CT_CHANNEL_FM); 
    164165            _channelManagers[CT_CHANNEL_SAMPLER] = new SiOPMChannelManager(SiOPMChannelSampler,     CT_CHANNEL_SAMPLER); 
     166            _channelManagers[CT_CHANNEL_KS]      = new SiOPMChannelManager(SiOPMChannelKS,          CT_CHANNEL_KS); 
    165167        } 
    166168         
  • as3/SiOPM/trunk/src/org/si/sion/module/SiOPMOperator.as

    r2903 r2989  
    241241        public function set ksl(i:int) : void { 
    242242            _ksl = i; 
    243             // [0,1,2,3]->[8,2,1,0
    244             _eg_key_scale_level_rshift = (i==0) ? 8 : (3-i); 
     243            // [0,1,2,3]->[8,4,3,2
     244            _eg_key_scale_level_rshift = (i==0) ? 8 : (5-i); 
    245245            _updateTotalLevel(); 
    246246        } 
     
    509509            } 
    510510            // key scale level 
    511             _eg_key_scale_level_rshift = (_ksl==0) ? 8 : (3-_ksl); 
     511            _eg_key_scale_level_rshift = (_ksl==0) ? 8 : (5-_ksl); 
    512512            // ar for ssgec 
    513513            _eg_ssgec_ar = (_ssg_type == 8 || _ssg_type == 12) ? ((_ar>=56)?1:0) : ((_ar>=60)?1:0); 
  • as3/SiOPM/trunk/src/org/si/sion/module/SiOPMTable.as

    r2903 r2989  
    1919        static public const HALF_TONE_BITS      :int = 6;    // half tone resolution    = 2 ^ HALF_TONE_BITS      = 64 
    2020        static public const NOTE_BITS           :int = 7;    // max note value          = 2 ^ NOTE_BITS           = 128 
    21         static public const NOISE_TABLE_BITS    :int = 14;   // 16k noise  
     21        static public const NOISE_TABLE_BITS    :int = 15;   // 16k noise  
    2222        static public const LOG_TABLE_RESOLUTION:int = 256;  // log table resolution    = LOG_TABLE_RESOLUTION for every 1/2 scaling. 
    2323        static public const LOG_VOLUME_BITS     :int = 13;   // _logTable[0] = 2^13 at maximum 
     
    7777        static public const PG_NOISE_SHORT:int = 18;    // fc short noise 
    7878        static public const PG_NOISE_HIPAS:int = 19;    // high pass noise 
    79                                                         // ( 20-  23) reserved 
     79        static public const PG_NOISE_PINK :int = 20;    // pink noise 
     80                                                        // ( 21-  23) reserved 
    8081        static public const PG_PC_NZ_16BIT:int = 24;    // pitch controlable periodic noise 
    8182        static public const PG_PC_NZ_SHORT:int = 25;    // pitch controlable 93byte noise 
     
    190191        /** PG:MIDI note number to FM key code. */ 
    191192        public var nnToKC:Vector.<int> = null; 
     193        /** PG:pitch sampling count table. */ 
     194        public var pitchSamplingCount:Vector.<int> = null; 
    192195        /** PG:Wave tables without any waves. */ 
    193196        public var noWaveTable:SiOPMWaveTable; 
     
    209212         
    210213        /** Table for dt1 (from fmgen.cpp). */ 
    211        public var dt1Table:Array = null; 
     214        public var dt1Table:Array = null; 
    212215        /** Table for dt2 (from MAME's opm source). */ 
    213216        public var dt2Table:Vector.<int> = Vector.<int>([0, 384, 500, 608]); 
     
    397400            } 
    398401             
     402             
    399403        // pitch table 
    400404        //---------------------------------------- 
    401             pitchTable = new Vector.<Vector.<int>>(PT_MAX); 
    402             phaseStepShiftFilter = new Vector.<int>(PT_MAX); 
    403              
    404405            imax = HALF_TONE_RESOLUTION * 12;   // 12=1octave 
    405406            jmax = PITCH_TABLE_SIZE; 
    406407            dp   = 1/imax; 
     408             
     409            // sampling count table 
     410            pitchSamplingCount = new Vector.<int>(PITCH_TABLE_SIZE, true); 
     411            n = 5393.968278209282;  // = 44100 / 8.175798915643707. sampling count @ MIDI note number = 0  
     412            for (i=0, p=0; i<imax; i++, p+=dp) {  
     413                v = Math.pow(2, -p) * n; 
     414                for (j=i; j<jmax; j+=imax) { 
     415                    pitchSamplingCount[j]  = int(v+0.5); 
     416                    v *= 0.5; 
     417                } 
     418            } 
     419             
     420             
     421            // phase step tables 
     422            pitchTable = new Vector.<Vector.<int>>(PT_MAX); 
     423            phaseStepShiftFilter = new Vector.<int>(PT_MAX); 
    407424             
    408425            // OPM 
     
    501518        //---------------------------------------- 
    502519            // dt1 table from fmgen 
    503                var fmgen_dt1:Array = [  //[4][32] 
    504                    [  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0], 
    505                    [  0,  0,  0,  0,  2,  2,  2,  2,  2,  2,  2,  2,  4,  4,  4,  4,    4,  6,  6,  6,  8,  8,  8, 10, 10, 12, 12, 14, 16, 16, 16, 16], 
    506                        [  2,  2,  2,  2,  4,  4,  4,  4,  4,  6,  6,  6,  8,  8,  8, 10,   10, 12, 12, 14, 16, 16, 18, 20, 22, 24, 26, 28, 32, 32, 32, 32], 
    507                        [  4,  4,  4,  4,  4,  6,  6,  6,  8,  8,  8, 10, 10, 12, 12, 14,   16, 16, 18, 20, 22, 24, 26, 28, 32, 34, 38, 40, 44, 44, 44, 44] 
    508            ]; 
     520            var fmgen_dt1:Array = [  //[4][32] 
     521                [  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0], 
     522                [  0,  0,  0,  0,  2,  2,  2,  2,  2,  2,  2,  2,  4,  4,  4,  4,    4,  6,  6,  6,  8,  8,  8, 10, 10, 12, 12, 14, 16, 16, 16, 16], 
     523                [  2,  2,  2,  2,  4,  4,  4,  4,  4,  6,  6,  6,  8,  8,  8, 10,   10, 12, 12, 14, 16, 16, 18, 20, 22, 24, 26, 28, 32, 32, 32, 32], 
     524                [  4,  4,  4,  4,  4,  6,  6,  6,  8,  8,  8, 10, 10, 12, 12, 14,   16, 16, 18, 20, 22, 24, 26, 28, 32, 34, 38, 40, 44, 44, 44, 44] 
     525            ]; 
    509526            dt1Table = new Array(8); 
    510527            for (i=0; i<4; i++) { 
     
    697714        //------------------------------ 
    698715            // white noise 
    699             table1 = new Vector.<int>(NOISE_TABLE_SIZE, true); 
    700             imax = NOISE_TABLE_SIZE; 
    701             for (i=0; i<imax; i++) { 
    702                 table1[i] = calcLogTableIndex((Math.random()*2-1)*NOISE_WAVE_OUTPUT); 
    703             } 
    704             waveTables[PG_NOISE_WHITE] = SiOPMWaveTable.alloc(table1, PT_PCM); 
    705             waveTables[PG_NOISE] = waveTables[PG_NOISE_WHITE]; 
    706              
    707716            // pulse noise. NOTE: Dishonest impelementation. Details are shown in MAME or VirtuaNes source. 
    708717            table1 = new Vector.<int>(NOISE_TABLE_SIZE, true); 
     718            table2 = new Vector.<int>(NOISE_TABLE_SIZE, true); 
    709719            imax = NOISE_TABLE_SIZE; 
    710720            iv = calcLogTableIndex(NOISE_WAVE_OUTPUT); 
     721            n = NOISE_WAVE_OUTPUT / 32768; 
     722            j = 1;                          // 15bit LFSR 
    711723            for (i=0; i<imax; i++) { 
    712                 table1[i] = (Math.random()>0.5) ? iv : (iv+1); 
    713             } 
    714             waveTables[PG_NOISE_PULSE] = SiOPMWaveTable.alloc(table1, PT_PCM); 
     724                j = (((j<<13)^(j<<14)) & 0x4000) | (j>>1); 
     725                table1[i] = calcLogTableIndex((j&0x7fff)*n*2-1); 
     726                table2[i] = (j&1) ? iv : (iv+1); 
     727            } 
     728            waveTables[PG_NOISE_WHITE] = SiOPMWaveTable.alloc(table1, PT_PCM); 
     729            waveTables[PG_NOISE_PULSE] = SiOPMWaveTable.alloc(table2, PT_PCM); 
     730            waveTables[PG_NOISE] = waveTables[PG_NOISE_WHITE]; 
    715731             
    716732            // fc short noise. NOTE: Dishonest impelementation. 93*11=1023 aprox.-> 1024. 
     
    729745            table2 = waveTables[PG_NOISE_WHITE].wavelet; 
    730746            imax = NOISE_TABLE_SIZE; 
    731             n = 8/Number(1<<LOG_VOLUME_BITS); 
     747            j = (-ENV_TOP) << 3; 
     748            n = 16/Number(1<<LOG_VOLUME_BITS); 
    732749            p = 0.0625; 
    733             v = (logTable[table2[0]] - logTable[table2[NOISE_TABLE_SIZE - 1]]) * p; 
     750            v = (logTable[table2[0]+j] - logTable[table2[NOISE_TABLE_SIZE - 1]+j]) * p; 
    734751            table1[0] = calcLogTableIndex(v*n); 
    735752            for (i=1; i<imax; i++) { 
    736                 v = (v + logTable[table2[i]] - logTable[table2[i-1]]) * p; 
     753                imax2 = table2[i]   + j; 
     754                imax3 = table2[i-1] + j; 
     755                v = (v + logTable[imax2] - logTable[imax3]) * p; 
    737756                table1[i] = calcLogTableIndex(v*n); 
    738757            } 
    739758            waveTables[PG_NOISE_HIPAS] = SiOPMWaveTable.alloc(table1, PT_PCM); 
     759             
     760            // pink noise 
     761            var b0:Number=0, b1:Number=0, b2:Number=0; 
     762            table1 = new Vector.<int>(NOISE_TABLE_SIZE, true); 
     763            table2 = waveTables[PG_NOISE_WHITE].wavelet; 
     764            imax = NOISE_TABLE_SIZE; 
     765            j = (-ENV_TOP) << 3; 
     766            n = 0.125/Number(1<<LOG_VOLUME_BITS); 
     767            for (i=0; i<imax; i++) { 
     768                imax2 = table2[i] + j; 
     769                v = logTable[imax2]; 
     770                b0 = 0.99765 * b0 + v * 0.0990460; 
     771                b1 = 0.96300 * b1 + v * 0.2965164; 
     772                b2 = 0.57000 * b2 + v * 1.0526913; 
     773                table1[i] = calcLogTableIndex((b0 + b1 + b2 + v * 0.1848) * n); 
     774            } 
     775            waveTables[PG_NOISE_PINK] = SiOPMWaveTable.alloc(table1, PT_PCM); 
     776 
    740777             
    741778            // periodic noise 
  • as3/SiOPM/trunk/src/org/si/sion/module/SiOPMWaveTable.as

    r2903 r2989  
    3636        { 
    3737            var len:int, bits:int=0; 
    38             for (len=wavelet.length>>1; len!=0; len>>=1) { 
    39                 bits++; 
    40             } 
     38            for (len=wavelet.length>>1; len!=0; len>>=1) bits++; 
    4139             
    4240            var newInstance:SiOPMWaveTable = _freeList.pop() || new SiOPMWaveTable(); 
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/SiMMLChannelSetting.as

    r2903 r2989  
    102102                track.channel.setType(_pgTypeList[voiceIndex], _ptTypeList[voiceIndex]); 
    103103                break; 
    104             case SELECT_TONE_FM: 
    105                 voiceIndex += track.channelNumber << 8; 
     104            case SELECT_TONE_FM: // %6 
     105                //voiceIndex += track.channelNumber << 8; 
    106106                if (voiceIndex<0 || voiceIndex>=SiMMLTable.VOICE_MAX) voiceIndex=0; 
    107107                voice = SiMMLTable.instance.getSiMMLVoice(voiceIndex); 
     
    124124                } 
    125125                return (param==null || param.initSequence.isEmpty()) ? null : param.initSequence; 
    126             case SELECT_TONE_PCM: 
     126            case SELECT_TONE_PCM: // %7 
    127127                if (voiceIndex>=0 && voiceIndex<SiOPMTable.PCM_DATA_MAX) { 
    128128                    pcm = SiOPMTable.instance.getPCMData(voiceIndex); 
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/SiMMLData.as

    r2806 r2989  
    2121        /** voice data */ 
    2222        protected var _voices:Vector.<SiMMLVoice>; 
     23         
    2324         
    2425         
     
    5051         
    5152         
    52         /** Register all tables before processing audio. */ 
    53         override public function regiter() : void 
    54         { 
    55             super.regiter(); 
    56             SiMMLTable.instance.stencilEnvelops = _envelops; 
    57             SiMMLTable.instance.stencilVoices   = _voices; 
    58         } 
    59          
    60          
    6153        /** Set envelop table data refered by &#64;&#64;,na,np,nt,nf,_&#64;&#64;,_na,_np,_nt and _nf. 
    6254         *  @param index envelop table number. 
     
    7971                 _voices[index] = voice; 
    8072            } 
     73        } 
     74         
     75         
     76         
     77         
     78    // internal function 
     79    //-------------------------------------------------- 
     80        /** @private [internal use] Register all tables before processing audio. */ 
     81        override public function _regiterTables() : void 
     82        { 
     83            super._regiterTables(); 
     84            SiMMLTable.instance.stencilEnvelops = _envelops; 
     85            SiMMLTable.instance.stencilVoices   = _voices; 
    8186        } 
    8287         
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/SiMMLSequencer.as

    r2903 r2989  
    4545        /** @private [internal use] callback tempo changed */ 
    4646        public var _callbackTempoChanged:Function = null; 
     47        /** @private [internal use] callback timer interruption */ 
     48        public var _callbackTimer:Function = null; 
     49        /** @private [internal use] callback on beat */ 
     50        public var _callbackBeat:Function = null; 
    4751         
    4852        private var _module:SiOPMModule;                // Module instance 
     
    8993        public function get currentTrack() : SiMMLTrack { return _currentTrack; } 
    9094         
     95        /** SiONTrackEvent.BEAT_ON_FRAME is called if (beatCount16th & onBeatCallbackFilter) == 0. */  
     96        public function set onBeatCallbackFilter(filter:int) : void { _onBeatCallbackFilter = filter; } 
     97        public function get onBeatCallbackFilter() : int { return _onBeatCallbackFilter; } 
    9198         
    9299         
     
    609616            if (_callbackTempoChanged != null) _callbackTempoChanged(globalBufferIndex); 
    610617        } 
    611          
     618 
     619         
     620        /** @private [internal uses] Callback when the timer interrupt. */ 
     621        override protected function onTimerInterruption() : void 
     622        { 
     623            if (_callbackTimer != null) _callbackTimer(); 
     624        } 
     625         
     626         
     627        /** @private [internal uses] Callback on every 16th beats. */ 
     628        override protected function onBeat(delaySamples:int, beatCounter:int) : void 
     629        { 
     630            if (_callbackBeat != null) _callbackBeat(delaySamples, beatCounter); 
     631        } 
    612632         
    613633         
     
    741761                    return true; 
    742762                } 
    743                 case '#RENDER': { 
    744                     if (num < 0 || num > 255) throw _errorParameterNotValid("#RENDER", String(num)); 
    745                     _parsePreRenderPCM(dat, pfx); 
    746                     return true; 
    747                 } 
    748763                     
    749764                // system command after parsing 
     
    849864            return _tempWaveTable5; 
    850865        } 
    851          
    852          
    853         // #RENDER 
    854         private function _parsePreRenderPCM(dat:String, pfx:String) : void 
    855         { 
    856             return; 
    857              
    858 /* 
    859             var seq:MMLSequence, count:int, prev:MMLEvent, e:MMLEvent; 
    860              
    861             // parse 
    862             //var seqGroup:MMLSequenceGroup = newSequenceGroup().parse(_expandMacro(dat)); 
    863  
    864             // expand internal tables 
    865             for (seq = seqGroup.headSequence; seq != null; seq = seq.nextSequence) { 
    866                 count = seq.headEvent.data; 
    867                 if (count == 0) continue; 
    868                 for (prev = seq.headEvent; prev.next != null; prev = e) { 
    869                     e = prev.next; 
    870                     if (e.id == MMLEvent.TABLE_EVENT) { 
    871                         _callOnTableParse(prev); 
    872                         e = prev; 
    873                     } 
    874                 } 
    875             } 
    876              
    877             // #FM connections 
    878             onAfterParse(seqGroup); 
    879 */ 
    880         } 
    881          
     866 
    882867         
    883868        // parse initializing sequence, called by __splitDataString() 
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/SiMMLTable.as

    r2806 r2989  
    2929        static public const MT_RAMP  :int = 9;  // ramp wave 
    3030        static public const MT_SAMPLE:int = 10; // sampler 
    31         static public const MT_MAX   :int = 11; 
     31        static public const MT_KS    :int = 11; // karplus strong 
     32        static public const MT_MAX   :int = 12; 
    3233         
    3334        static private const MT_ARRAY_SIZE:int = 11; 
     
    127128            channelModuleSetting[MT_RAMP]   = new SiMMLChannelSetting(MT_RAMP,   SiOPMTable.PG_RAMP,        128, 1, 128); // ramp 
    128129            channelModuleSetting[MT_SAMPLE] = new SiMMLChannelSetting(MT_SAMPLE, 0,                         1,   1, 1);   // sampler. this is based on SiOPMChannelSampler 
     130            channelModuleSetting[MT_KS]     = new SiMMLChannelSetting(MT_KS,     0,                         3,   1, 3);   // karplus strong (0 or 1 to chouse seed generator algrism) 
    129131             
    130132            // PSG setting 
     
    161163            channelModuleSetting[MT_SAMPLE]._selectToneType = SiMMLChannelSetting.SELECT_TONE_NOP; 
    162164            channelModuleSetting[MT_SAMPLE]._channelType    = SiOPMChannelManager.CT_CHANNEL_SAMPLER; 
    163              
     165            // Karplus strong 
     166            channelModuleSetting[MT_KS]._channelType = SiOPMChannelManager.CT_CHANNEL_KS; 
     167 
    164168            // tables 
    165169            _masterEnvelops = new Vector.<SiMMLEnvelopTable>(ENV_TABLE_MAX); 
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/SiMMLTrack.as

    r2903 r2989  
    469469        /** Channel module type (%) and select tone (1st argument of '@'). 
    470470         *  @param type Channel module type 
    471          *  @param channelNum Channel number. For %2-5 and %7-10, this value is same as 1st argument of '@'. 
     471         *  @param channelNum Channel number. For %2-5 and %7-11, this value is same as 1st argument of '@'. 
    472472         *  @param toneNum Tone number. Ussualy, this argument is used only in %0;PSG, %1;APU and %6;FM. 
    473473         */ 
     
    958958                _env_pitch_active = _pns_or[keyOn]; 
    959959                // activate filter 
    960                 channel.activateFilter(Boolean(_env_filter)); 
     960                if (!channel.isFilterActive) channel.activateFilter(Boolean(_env_filter)); 
    961961                // reset index 
    962962                _residue = 0; 
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/SiMMLVoice.as

    r2697 r2989  
    2828        /** tone number, 1st argument of '&#64;'. -1;do nothing. @default -1 */ 
    2929        public var toneNum:int; 
    30         /** wave data for PCM sound channel. null;not a pcm voice. @default null */ 
     30         
     31        /** wave data for PCM sound channel. null;not pcm voice. @default null */ 
    3132        public var pcmData:SiOPMPCMData; 
    32          
    3333        /** parameters for FM sound channel. null;do nothing. @default null */ 
    3434        public var channelParam:SiOPMChannelParam; 
     35         
    3536        /** Attack rate, This parameter is available only when channelParam==null. @default 63 */ 
    3637        public var attackRate:int; 
     
    189190        public function setTrackVoice(track:SiMMLTrack) : SiMMLTrack 
    190191        { 
    191             if (channelParam) { // FM sound module 
    192                 track.setChannelModuleType(6, -1);  // -1 sets no changing. 
    193                 track.channel.setSiOPMChannelParam(channelParam, setVolumes); 
    194             } else { // set module type and channel number 
    195                 track.setChannelModuleType(moduleType, channelNum, toneNum); 
    196                 track.channel.setAllAttackRate(attackRate); 
     192            if (moduleType == 11) { 
     193                // PMS Guitar 
     194                if (channelParam) { // FM sound module 
     195                    track.setChannelModuleType(11, 1); 
     196                    track.channel.setSiOPMChannelParam(channelParam, setVolumes); 
     197                } else { 
     198                    track.setChannelModuleType(11, channelNum, toneNum); 
     199                    track.channel.setAllAttackRate(attackRate); 
     200                    track.pitchShift = detune; 
     201                } 
    197202                track.channel.setAllReleaseRate(releaseRate); 
    198                 track.pitchShift = detune; 
     203            } else { 
     204                // others 
     205                if (channelParam) { // FM sound module 
     206                    track.setChannelModuleType(6, -1);  // -1 sets no changing. 
     207                    track.channel.setSiOPMChannelParam(channelParam, setVolumes); 
     208                } else { // set module type and channel number 
     209                    track.setChannelModuleType(moduleType, channelNum, toneNum); 
     210                    track.channel.setAllAttackRate(attackRate); 
     211                    track.channel.setAllReleaseRate(releaseRate); 
     212                    track.pitchShift = detune; 
     213                } 
    199214            } 
    200215             
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/base/MMLData.as

    r2903 r2989  
    9999         
    100100         
    101         /** Register all tables before processing audio. */ 
    102         public function regiter() : void 
    103         { 
    104             SiOPMTable.instance.stencilCustomWaveTables = waveTables; 
    105             SiOPMTable.instance.stencilPCMData          = pcmData; 
    106             SiOPMTable.instance.stencilSamplerData      = samplerData; 
     101        /** Append new sequence. 
     102         *  @param sequence event list for new sequence. when null, create empty sequence. 
     103         *  @return created sequence 
     104         */ 
     105        public function appendNewSequence(sequence:Vector.<MMLEvent> = null) : MMLSequence 
     106        { 
     107            var seq:MMLSequence = sequenceGroup.appendNewSequence(); 
     108            if (sequence) seq.fromVector(sequence); 
     109            return seq; 
     110        } 
     111         
     112         
     113        /** Get sequence.  
     114         *  @param index The index of seuence 
     115         */ 
     116        public function getSequence(index:int) : MMLSequence 
     117        { 
     118            return sequenceGroup.getSequence(index); 
    107119        } 
    108120         
     
    171183            return samplerData[index]; 
    172184        } 
     185         
     186         
     187         
     188         
     189    // internal function 
     190    //-------------------------------------------------- 
     191        /** @private [internal use] Register all tables before processing audio. */ 
     192        public function _regiterTables() : void 
     193        { 
     194            SiOPMTable.instance.stencilCustomWaveTables = waveTables; 
     195            SiOPMTable.instance.stencilPCMData          = pcmData; 
     196            SiOPMTable.instance.stencilSamplerData      = samplerData; 
     197        } 
    173198    } 
    174199} 
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/base/MMLEvent.as

    r2633 r2989  
    4444        static public const WAIT         :int = 30; 
    4545        static public const TEMPO        :int = 31; 
    46         static public const REGISTER     :int = 32; 
    47         static public const DEBUG_INFO   :int = 33; 
     46        static public const TIMER        :int = 32; 
     47        static public const REGISTER     :int = 33; 
     48        static public const DEBUG_INFO   :int = 34; 
    4849         
    4950         
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/base/MMLExecutorConnector.as

    r2625 r2989  
    141141 
    142142                // assign sequence to executor 
    143                 var preprocess:MMLSequence = seqGroup.newSequence(); 
     143                var preprocess:MMLSequence = seqGroup._newSequence(); 
    144144                preprocess.alloc(); 
    145145//trace("#FM "+elem.number+";"); 
     
    147147                // out pipe 
    148148                if (outPipe != -1) { 
    149                     preprocess.pushEvent(MMLEvent.OUTPUT_PIPE, (firstOsc) ? SiOPMChannelBase.OUTPUT_OVERWRITE : SiOPMChannelBase.OUTPUT_ADD); 
    150                     preprocess.pushEvent(MMLEvent.PARAMETER,   outPipe); 
     149                    preprocess.appendNewEvent(MMLEvent.OUTPUT_PIPE, (firstOsc) ? SiOPMChannelBase.OUTPUT_OVERWRITE : SiOPMChannelBase.OUTPUT_ADD); 
     150                    preprocess.appendNewEvent(MMLEvent.PARAMETER,   outPipe); 
    151151//trace(" @o"+((firstOsc)?'1,':'2,')+outPipe); 
    152152                } else { 
    153                     preprocess.pushEvent(MMLEvent.OUTPUT_PIPE, SiOPMChannelBase.OUTPUT_STANDARD); 
    154                     preprocess.pushEvent(MMLEvent.PARAMETER,   0); 
     153                    preprocess.appendNewEvent(MMLEvent.OUTPUT_PIPE, SiOPMChannelBase.OUTPUT_STANDARD); 
     154                    preprocess.appendNewEvent(MMLEvent.PARAMETER,   0); 
    155155//trace(" @o0,0"); 
    156156                } 
     
    158158                // in pipe 
    159159                if (elem.firstChild != null) { 
    160                     preprocess.pushEvent(MMLEvent.INPUT_PIPE, elem.modulation); 
    161                     preprocess.pushEvent(MMLEvent.PARAMETER,  inPipe); 
     160                    preprocess.appendNewEvent(MMLEvent.INPUT_PIPE, elem.modulation); 
     161                    preprocess.appendNewEvent(MMLEvent.PARAMETER,  inPipe); 
    162162//trace(" @i"+elem.modulation+","+inPipe); 
    163163                } else { 
    164                     preprocess.pushEvent(MMLEvent.INPUT_PIPE, 0); 
    165                     preprocess.pushEvent(MMLEvent.PARAMETER,  0); 
     164                    preprocess.appendNewEvent(MMLEvent.INPUT_PIPE, 0); 
     165                    preprocess.appendNewEvent(MMLEvent.PARAMETER,  0); 
    166166//trace(" @i0,0"); 
    167167                } 
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/base/MMLParser.as

    r2625 r2989  
    240240            _isLastEventLength = false; 
    241241            return _lastEvent; 
     242        } 
     243         
     244         
     245        /** Get MMLEvent id by mml command letter.  
     246         *  @param mmlCommand letter of MML command. 
     247         *  @return Event id. Returns 0 if not found. 
     248         */ 
     249        static public function getEventID(mmlCommand:String) : int 
     250        { 
     251            switch (mmlCommand) { 
     252            case 'c': case 'd': case 'e': case 'f': case 'g': case 'a': case 'b':   return MMLEvent.NOTE; 
     253            case 'r':   return MMLEvent.REST; 
     254            case 'q':   return MMLEvent.QUANT_RATIO; 
     255            case '@q':  return MMLEvent.QUANT_COUNT; 
     256            case 'v':   return MMLEvent.VOLUME; 
     257            case '@v':  return MMLEvent.FINE_VOLUME; 
     258            case '%':   return MMLEvent.MOD_TYPE; 
     259            case '@':   return MMLEvent.MOD_PARAM; 
     260            case '@i':  return MMLEvent.INPUT_PIPE; 
     261            case '@o':  return MMLEvent.OUTPUT_PIPE; 
     262            case '(':   case ')':   return MMLEvent.VOLUME_SHIFT; 
     263            case '&':   return MMLEvent.SLUR; 
     264            case '&&':  return MMLEvent.SLUR_WEAK; 
     265            case '*':   return MMLEvent.PITCHBEND; 
     266            case ',':   return MMLEvent.PARAMETER; 
     267            case '$':   return MMLEvent.REPEAT_ALL; 
     268            case '[':   return MMLEvent.REPEAT_BEGIN; 
     269            case ']':   return MMLEvent.REPEAT_END; 
     270            case '|':   return MMLEvent.REPEAT_BREAK; 
     271            case 't':   return MMLEvent.TEMPO; 
     272            } 
     273            return 0; 
    242274        } 
    243275         
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/base/MMLSequence.as

    r2625 r2989  
    5656         
    5757         
     58        /** toString returns the event ids. */ 
    5859        public function toString() : String 
    5960        { 
     
    7071         
    7172         
     73        /** Returns events as an Vector.<MMLEvent>.  
     74         *  @param lengthLimit maximum length of returning Vector. When this argument set to 0, the Vector includes all events. 
     75         *  @param offset starting index of returning Vector. 
     76         *  @param eventID event id to get. When this argument set to -1, the Vector includes all kind of events. 
     77         */ 
     78        public function toVector(lengthLimit:int=0, offset:int=0, eventID:int=-1) : Vector.<MMLEvent> 
     79        { 
     80            if (headEvent == null) return null; 
     81            var e:MMLEvent, i:int=0, result:Vector.<MMLEvent> = new Vector.<MMLEvent>(); 
     82            for (e=headEvent.next; e!=null && e.id!=MMLEvent.SEQUENCE_TAIL; e=e.next) { 
     83                if (eventID == -1 || eventID == e.id) { 
     84                    if (i >= offset) result.push(e); 
     85                    if (lengthLimit > 0 && i >= lengthLimit) break; 
     86                    i++; 
     87                } 
     88            } 
     89            return result; 
     90        } 
     91         
     92         
     93        /** Create sequence from Vector.<MMLEvent>.  
     94         *  @param events event list of the sequence. 
     95         */ 
     96        public function fromVector(events:Vector.<MMLEvent>) : MMLSequence 
     97        { 
     98            alloc(); 
     99            for each (var e:MMLEvent in events) connectEvent(e); 
     100            return this; 
     101        } 
     102         
     103         
     104         
    72105         
    73106         
     
    77110        public function alloc() : MMLSequence 
    78111        { 
     112            if (!isEmpty()) { 
     113                headEvent.jump.next = tailEvent; 
     114                MMLParser._freeAllEvents(this); 
     115            } 
    79116            headEvent = MMLParser._allocEvent(MMLEvent.SEQUENCE_HEAD, 0); 
    80117            tailEvent = MMLParser._allocEvent(MMLEvent.SEQUENCE_TAIL, 0); 
     
    124161         
    125162         
    126         /** push new MMLEvent */ 
    127         public function pushEvent(id:int, data:int, length:int=0) : MMLSequence 
    128         { 
    129             return connectEvent(MMLParser._allocEvent(id, data, length)); 
     163        /** Append new MMLEvent at tail */ 
     164        public function appendNewEvent(id:int, data:int, length:int=0) : MMLEvent 
     165        { 
     166            var e:MMLEvent = MMLParser._allocEvent(id, data, length); 
     167            connectEvent(e); 
     168            return e; 
     169        } 
     170         
     171         
     172        /** Prepend new MMLEvent at head */ 
     173        public function prependNewEvent(id:int, data:int, length:int=0) : MMLEvent 
     174        { 
     175            var e:MMLEvent = MMLParser._allocEvent(id, data, length); 
     176            e.next = headEvent; 
     177            headEvent.next = e; 
     178            if (headEvent.jump == headEvent) headEvent.jump = e; 
     179            return e; 
    130180        } 
    131181         
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/base/MMLSequenceGroup.as

    r2625 r2989  
    6060                    throw new Error("MMLSequence: Unknown error on dividing sequences. " + headEvent); 
    6161                } 
    62                 seq = addTail(newSequence());       // push new sequence 
     62                seq = appendNewSequence();          // push new sequence 
    6363                headEvent = seq._cutout(headEvent); // cutout sequence 
    6464                seq._updateMMLString();             // update mml string 
     
    7979         
    8080         
     81        /** get sequence 
     82         *  @param index The index of sequence. 
     83         */ 
     84        public function getSequence(index:int) : MMLSequence 
     85        { 
     86            if (index >= _sequences.length) return null; 
     87            return _sequences[index]; 
     88        } 
     89         
    8190         
    8291         
     
    8998         
    9099         
    91         /** Allocate new sequence and push sequence chain. */ 
    92         public function newSequence() : MMLSequence 
     100        /** append new sequence */ 
     101        public function appendNewSequence() : MMLSequence 
     102        { 
     103            var seq:MMLSequence = _newSequence(); 
     104            seq._insertBefore(_term); 
     105            return seq; 
     106        } 
     107         
     108         
     109        /** @private [internal use] Allocate new sequence and push sequence chain. */ 
     110        internal function _newSequence() : MMLSequence 
    93111        { 
    94112            var seq:MMLSequence = _freeList.pop() || new MMLSequence(); 
     
    96114            return seq; 
    97115        } 
    98          
    99          
    100         /** push sequence */ 
    101         public function addTail(seq:MMLSequence) : MMLSequence 
    102         { 
    103             seq._insertBefore(_term); 
    104             return seq; 
    105         } 
    106116    } 
    107117} 
  • as3/SiOPM/trunk/src/org/si/sion/sequencer/base/MMLSequencer.as

    r2806 r2989  
    5252        /** sample par 16th beat */ 
    5353        protected var sampleParBeat16:Number; 
     54        /** filter for onBeat() callback. 0=16th beat, 1=8th beat, 3=4th beat, 7=2dn beat, 15=whole tone ...*/ 
     55        protected var _onBeatCallbackFilter:int; 
     56 
    5457         
    5558        private var _newUserDefinedEventID:int = MMLEvent.USER_DEFINE;  // id value of new user-defined event. 
     
    6568        private var _samplePerTick:int;             // samples per tick << FIXED_BITS 
    6669        private var _bufferLength:int;              // buffering length 
    67          
    6870         
    6971         
     
    104106            setMMLEventListener(MMLEvent.WAIT,         _default_onWait,         true); 
    105107            setMMLEventListener(MMLEvent.TEMPO,        _default_onTempo,        true); 
     108            setMMLEventListener(MMLEvent.TIMER,        _default_onTimer,        true); 
    106109            setMMLEventListener(MMLEvent.TABLE_EVENT,  _nop,                    true); 
    107110            _newUserDefinedEventID = MMLEvent.USER_DEFINE; 
    108111             
    109112            globalExecutor = new MMLExecutor(); 
     113             
     114            // 3 : callback every 4 beat 
     115            _onBeatCallbackFilter = 3; 
    110116        } 
    111117         
     
    138144            _eventGlobalFlags[id] = isGlobal; 
    139145            return id; 
     146        } 
     147         
     148         
     149        /** Get MMLEvent id by mml command letter.  
     150         *  @param mmlCommand letter of MML command. 
     151         *  @return Event id. Returns 0 if not found. 
     152         */ 
     153        public function getEventID(mmlCommand:String) : int 
     154        { 
     155            var id:int = MMLParser.getEventID(mmlCommand); 
     156            if (id != 0) return id; 
     157            if (mmlCommand in _userDefinedEventID) return _userDefinedEventID[mmlCommand]; 
     158            return 0; 
    140159        } 
    141160         
     
    221240                bpm = mmlData.defaultBPM; 
    222241                globalExecutor.initialize(mmlData.globalSequence); 
    223                 mmlData.regiter(); 
     242                mmlData._regiterTables(); 
    224243            } 
    225244            globalBufferIndex = 0; 
     
    237256        } 
    238257         
    239          
    240         /** Execute global sequence. */ 
     258 
     259        /** Set global sequence. This function must be called after prepareProcess() and before process(). */ 
     260        public function setGlobalSequence(seq:MMLSequence) : void 
     261        { 
     262            globalExecutor.initialize(seq); 
     263        } 
     264         
     265        /** start global sequence. */ 
    241266        protected function startGlobalSequence() : void 
    242267        { 
     
    245270            globalBufferIndex = 0; 
    246271        } 
     272        /** execute global sequence. returns executing sample length. */ 
    247273        protected function executeGlobalSequence() : int 
    248274        { 
     
    263289            return _globalExecuteSampleCount; 
    264290        } 
     291        /** check global sequences pointer acheives to the end. */ 
    265292        protected function isEndGlobalSequence() : Boolean 
    266293        { 
     294            var prevBeat:Number = globalBeat16, 
     295                floorPrevBeat:int = int(prevBeat); 
    267296            globalBufferIndex += _globalExecuteSampleCount; 
    268297            globalBeat16 += _globalExecuteSampleCount * beat16ParSample; 
     298            var floorCurrBeat:int = int(globalBeat16);  
     299            while (floorPrevBeat < floorCurrBeat) { 
     300                floorPrevBeat++; 
     301                if ((floorPrevBeat & _onBeatCallbackFilter) == 0) { 
     302                    onBeat((floorPrevBeat - prevBeat) * sampleParBeat16, floorPrevBeat); 
     303                } 
     304            } 
    269305            return (_globalBufferSampleCount == 0); 
    270306        } 
     
    359395         */ 
    360396        protected function onTempoChanged(tempoRatio:Number) : void 
     397        { 
     398        } 
     399         
     400         
     401        /** Callback when streaming interrupted by timer . */ 
     402        protected function onTimerInterruption() : void 
     403        { 
     404        } 
     405         
     406         
     407        /** Callback on every 16th beats. */ 
     408        protected function onBeat(delaySamples:int, beatCounter:int) : void 
    361409        { 
    362410        } 
     
    450498                    pos = e.length; 
    451499                    e.length = 0; 
    452                     if (count > 0) seq.pushEvent(MMLEvent.WAIT, 0, count); 
     500                    if (count > 0) seq.appendNewEvent(MMLEvent.WAIT, 0, count); 
    453501                    seq.connectEvent(e); 
    454502                } 
     
    605653            return e.next; 
    606654        } 
     655         
     656         
     657        /** default operation for MMLEvent.TIMER. */ 
     658        protected function _default_onTimer(e:MMLEvent) : MMLEvent 
     659        { 
     660            onTimerInterruption(); 
     661            return e.next; 
     662        } 
    607663    } 
    608664} 
  • as3/SiOPM/trunk/src/org/si/sion/utils/Fader.as

    r2697 r2989  
    1010    public class Fader 
    1111    { 
     12    // valiables 
     13    //-------------------------------------------------- 
    1214        // end value 
    1315        private var _end:Number = 0; 
     
    2123        private var _callback:Function = null; 
    2224         
     25         
     26         
     27         
     28    // properties 
     29    //-------------------------------------------------- 
    2330        /** is active. */ 
    2431        public function get isActive() : Boolean { return (_counter>0); } 
     
    2835        public function get value() : Number { return _value; } 
    2936         
    30         /** constructor */ 
     37         
     38         
     39         
     40    // constructor 
     41    //-------------------------------------------------- 
     42        /** constructor. 
     43         *  @param valueFrom The starting value. 
     44         *  @param valueTo The value chaging to. 
     45         *  @param term Changing term. 
     46         */ 
    3147        function Fader(callback:Function=null, valueFrom:Number=0, valueTo:Number=1, term:int=60) 
    3248        { 
     
    3551         
    3652         
     53         
     54         
     55    // operations 
     56    //-------------------------------------------------- 
    3757        /** set fading values  
    3858         *  @param valueFrom The starting value. 
  • as3/SiOPM/trunk/src/org/si/sion/utils/SiONPresetVoice.as

    r2633 r2989  
    3030     */ 
    3131    public dynamic class SiONPresetVoice { 
     32    // constants 
     33    //-------------------------------------------------- 
     34        /** Flag to include default voices. */ 
     35        public const INCLUDE_DEFAULT:int = 1; 
     36        /** Flag to include voices of valsound (http://www.valsound.com/). */ 
     37        public const INCLUDE_VALSOUND:int = 2; 
     38        /** Flag to include General MIDI voices. */ 
     39        public const INCLUDE_MIDI:int = 4; 
     40        /** Flag to include General MIDI drum set voices. */ 
     41        public const INCLUDE_MIDIDRUM:int = 8; 
     42        /** Flag to include all voices. */ 
     43        public const INCLUDE_ALL:int = 0xffff; 
     44         
     45         
     46         
     47         
     48    // valiables 
     49    //-------------------------------------------------- 
    3250        /** categoly list. */ 
    3351        public var categolies:Array; 
    3452         
    3553         
    36         /** constructor */ 
    37         function SiONPresetVoice() { 
     54         
     55         
     56    // constructor 
     57    //-------------------------------------------------- 
     58        /** constructor. 
     59         *  @param includeFlag Flag to select which voices are included. 
     60         */ 
     61        function SiONPresetVoice(includeFlag:int=0xffff) { 
    3862            categolies = []; 
    3963             
    40             _categoly("default"); 
    41             _new("sine",      "Sine wave",          new SiONVoice(5,0)); 
    42             _new("saw",       "Saw wave",           new SiONVoice(5,1)); 
    43             _new("triangle8", "8bit triangle wave", new SiONVoice(5,3)); 
    44             _new("triangle",  "Triangle wave",      new SiONVoice(5,4)); 
    45             _new("square",    "Square wave",        new SiONVoice(5,5)); 
    46             _new("noise",     "White noise",        new SiONVoice(5,6)); 
    47             _new("snoise",    "93bit noise",        new SiONVoice(5,25)); 
    48             _new("konami",    "Wave table sample",  new SiONVoice(5,7)); 
    49             _new("ma1",       "MA3 wave sample",    new SiONVoice(5,33)); 
    50             _new("beep",      "Pulse wave sample",  new SiONVoice(5,81)); 
    51             _new("ramp",      "Ramp wave sample",   new SiONVoice(5,160)); 
    52  
    53             _categoly("valsound.base"); 
    54             _OPN("valsound.base1",  "Analog Bass #2+FBsynth", 6,7, 31,00,00,12,01,18,1,01,0,0, 31,00,01,12,01,04,1,02,0,0, 31,00,00,09,00,03,0,01,7,0, 31,00,00,09,00,03,0,01,3,0); 
    55             _OPN("valsound.base2",  "Analog Bass",            5,6, 31,00,00,00,00,41,0,01,0,0, 20,00,00,10,00,00,0,01,1,0, 24,00,00,08,00,00,0,01,2,0, 20,00,00,10,00,00,0,01,3,0); 
    56             _OPN("valsound.base3",  "Analog bass #2 (q2)",    6,4, 21,05,00,00,02,35,0,00,0,0, 26,10,00,11,01,00,0,01,0,0, 27,00,00,11,00,00,0,01,3,0, 27,14,00,11,01,00,0,01,7,0); 
    57             _OPN("valsound.base4",  "Chopper Bass 0",         0,5, 28,14,15,15,04,25,2,10,1,0, 31,14,10,09,03,34,2,00,2,0, 31,14,09,09,02,23,0,00,3,0, 31,06,05,11,02,00,0,00,7,0); 
    58             _OPN("valsound.base5",  "Chopper Bass 1",         0,5, 28,14,15,15,04,30,1,14,1,0, 31,14,10,09,02,35,1,03,2,0, 31,14,09,09,02,25,0,00,3,0, 31,06,05,11,01,00,0,00,7,0); 
    59             _OPN("valsound.base6",  "Chopper bass 2 (CUT)",   0,4, 31,15,28,05,02,28,3,15,6,0, 31,10,15,04,04,41,3,04,6,0, 31,08,03,05,01,21,2,00,6,0, 31,02,02,05,15,00,2,00,6,0); 
    60             _OPN("valsound.base7",  "Chopper bass 3",         0,5, 31,18,02,13,09,28,2,13,1,0, 31,10,15,04,04,41,3,01,2,0, 31,08,03,05,01,21,2,00,3,0, 31,02,02,12,15,00,2,00,7,0); 
    61             _OPN("valsound.base8",  "Elec.Chopper bass+ 4",   0,5, 31,18,02,13,09,28,2,13,1,0, 31,10,15,04,04,41,3,01,2,0, 31,08,03,05,01,21,2,00,3,0, 31,02,02,12,15,00,2,01,7,0); 
    62             _OPN("valsound.base9",  "Effect Bass 1",          4,3, 23,05,04,07,02,00,0,01,3,0, 30,02,02,08,02,00,1,07,3,0, 24,05,04,07,02,00,0,01,7,0, 31,02,02,08,02,00,1,10,7,0); 
    63             _OPN("valsound.base10", "Effect Bass 2 to UP",    4,3, 03,06,05,15,02,00,0,01,3,0, 07,04,03,15,02,00,1,07,3,0, 03,06,05,15,02,00,0,01,7,0, 07,04,03,15,02,00,1,10,7,0); 
    64             _OPN("valsound.base11", "Effect Bass 1",          4,3, 22,05,06,00,00,09,0,01,3,0, 19,03,04,07,01,00,0,07,3,0, 23,00,00,00,00,19,0,01,7,0, 20,02,00,07,01,00,0,01,7,0); 
    65             _OPN("valsound.base12", "Mohaaa",                 0,5, 07,00,00,15,00,21,0,01,0,0, 06,00,00,15,00,18,0,02,0,0, 08,00,00,15,00,23,0,01,0,0, 18,00,00,15,00,00,0,02,0,0); 
    66             _OPN("valsound.base13", "Effect FB Bass #5",      0,7, 31,06,02,15,03,20,0,01,3,0, 31,06,02,15,06,14,2,02,0,0, 06,06,02,15,01,08,0,01,7,0, 31,05,01,15,02,00,0,02,0,0); 
    67             _OPN("valsound.base14", "Magical bass",           0,7, 31,08,00,06,10,38,1,01,3,0, 28,18,05,06,13,47,1,10,7,0, 31,07,07,06,08,23,2,00,2,0, 28,09,06,08,01,00,2,00,0,0); 
    68             _OPN("valsound.base15", "E.Bass #6",              0,7, 31,15,00,10,05,35,1,14,3,0, 31,14,07,07,04,41,1,04,7,0, 31,14,03,00,02,18,1,00,3,0, 31,12,08,08,01,00,0,00,7,0); 
    69             _OPN("valsound.base16", "E.Bass #7",              3,7, 31,15,00,10,05,29,1,10,7,0, 31,13,07,07,04,46,1,04,7,0, 31,14,05,00,02,19,1,00,3,0, 31,12,04,08,01,00,0,00,0,0); 
    70             _OPN("valsound.base17", "E.Bass 70",              2,5, 31,08,00,00,03,34,0,00,3,0, 31,14,06,09,02,42,0,08,0,0, 31,16,03,00,02,20,0,00,7,0, 31,12,05,08,02,00,0,01,0,0); 
    71             _OPN("valsound.base18", "VAL006 Bass like Euro",  0,4, 31,07,07,11,02,25,3,06,0,0, 31,06,06,11,01,55,3,04,7,0, 31,09,06,11,01,18,2,00,3,0, 31,06,08,11,15,00,2,01,0,0); 
    72             _OPN("valsound.base19", "E.Bass x2",              2,7, 31,14,08,03,01,33,0,00,1,0, 31,17,08,09,05,30,0,14,2,0, 31,15,08,05,05,35,0,04,3,0, 31,15,08,06,01,00,0,01,7,0); 
    73             _OPN("valsound.base20", "E.Bass x4",              2,7, 31,14,03,00,02,33,1,03,3,0, 23,16,04,12,03,30,2,10,0,0, 31,13,03,11,03,27,1,00,7,0, 31,07,05,09,01,00,3,01,0,0); 
    74             _OPN("valsound.base21", "Metal pick bass X5",     3,7, 31,14,00,06,13,51,2,13,0,0, 31,13,00,06,13,21,0,01,0,0, 31,09,00,06,13,23,0,00,0,0, 31,09,00,07,13,00,0,00,0,0); 
    75             _OPN("valsound.base22", "Groove Bass 1",          5,3, 31,00,00,00,00,38,0,00,0,0, 21,00,00,13,00,05,0,00,0,0, 21,00,00,13,00,03,0,01,0,0, 21,00,00,13,00,03,0,01,0,0); 
    76             _OPN("valsound.base23", "Analog Bass Groove #2",  6,5, 31,00,00,00,00,41,0,02,0,0, 31,00,00,10,00,02,0,01,0,0, 31,00,00,10,00,01,0,01,7,0, 31,00,00,10,00,01,0,01,3,0); 
    77             _OPN("valsound.base24", "Harmonics #1",           6,6, 31,12,09,00,02,45,1,02,3,0, 31,10,08,06,01,00,1,01,7,0, 31,13,08,05,02,00,1,02,7,0, 31,16,12,05,10,00,1,00,3,0); 
    78             _OPN("valsound.base25", "Low Bass x1",            5,3, 31,00,09,15,00,25,2,00,0,0, 31,15,06,08,01,00,1,00,1,0, 31,15,06,08,01,00,1,01,2,0, 31,15,00,07,02,00,1,01,3,0); 
    79             _OPN("valsound.base26", "Low_bass x2 Little FB",  5,6, 21,00,09,00,00,24,2,00,0,0, 21,15,06,08,01,00,1,00,1,0, 21,15,06,08,01,00,1,01,2,0, 27,15,00,07,02,00,1,01,3,0); 
    80             _OPN("valsound.base27", "Low Bass x1 Rezzo.",     5,3, 31,00,09,15,00,30,2,00,0,0, 31,15,06,12,01,02,1,00,1,0, 31,15,06,12,01,02,1,01,2,0, 31,15,10,12,02,02,1,04,3,0); 
    81             _OPN("valsound.base28", "Low Bass Picked",        5,7, 31,05,00,00,11,33,1,00,0,0, 30,12,04,09,01,00,1,00,0,0, 27,14,08,09,03,00,1,01,0,0, 27,14,07,12,15,06,1,05,0,0); 
    82             _OPN("valsound.base29", "metal base",             0,5, 20,10,09,15,01,22,0,00,7,0, 17,09,00,00,02,22,0,01,7,0, 21,09,00,00,01,18,0,00,3,0, 18,08,00,08,01,00,0,01,3,0); 
    83             _OPN("valsound.base30", "e.n.bass 1",             3,7, 27,14,00,04,04,25,0,07,0,0, 31,12,00,04,03,45,0,02,0,0, 31,19,00,04,05,15,0,00,0,0, 31,12,06,07,01,00,0,00,0,0); 
    84             _OPN("valsound.base31", "psg bass 1",             5,7, 31,14,00,00,00,22,0,00,0,0, 31,14,03,08,05,00,0,01,3,0, 31,14,03,08,03,00,0,00,0,0, 31,16,03,08,03,00,0,01,7,0); 
    85             _OPN("valsound.base32", "psg bass 2",             5,7, 31,14,00,00,00,22,0,01,0,0, 31,14,03,08,05,00,0,02,3,0, 31,14,03,08,03,00,0,00,0,0, 31,16,03,08,03,00,0,01,7,0); 
    86             _OPN("valsound.base33", "rezonance type bass #1", 2,0, 24,19,02,13,10,33,1,03,3,0, 26,16,05,14,06,28,1,00,0,0, 15,14,06,08,05,14,1,00,0,0, 31,07,05,09,02,00,0,02,7,0); 
    87             _OPN("valsound.base34", "slap bass",              2,2, 31,10,07,08,02,33,0,00,7,0, 21,08,08,07,05,23,3,07,7,0, 31,05,06,07,01,37,0,00,3,0, 31,08,06,07,05,00,0,01,7,0); 
    88             _OPN("valsound.base35", "slap bass 1",            2,7, 31,14,07,08,02,33,0,00,7,0, 21,15,06,07,04,18,2,06,7,0, 31,05,06,07,01,40,0,00,3,0, 31,12,07,07,05,00,0,01,3,0); 
    89             _OPN("valsound.base36", "slap bass 2 (1+)",       2,7, 31,14,07,08,02,33,0,00,7,0, 21,15,06,07,04,28,2,07,7,0, 31,05,06,07,01,40,0,00,3,0, 31,12,07,07,05,00,0,01,3,0); 
    90             _OPN("valsound.base37", "slap bass #3",           2,7, 31,14,07,00,05,32,0,03,7,0, 31,16,01,12,04,35,0,10,0,0, 31,11,02,00,03,23,1,00,3,0, 31,12,05,07,01,00,0,00,0,0); 
    91             _OPN("valsound.base38", "slap bass pull",         2,2, 31,10,07,08,02,33,0,00,7,0, 21,08,08,09,05,23,3,10,7,0, 31,05,06,10,01,37,0,00,3,0, 31,16,06,11,01,00,0,01,7,0); 
    92             _OPN("valsound.base39", "slap bass mute",         2,2, 31,18,07,11,12,33,0,00,7,0, 21,11,08,11,15,23,3,07,7,0, 31,15,06,11,11,37,0,00,3,0, 31,15,06,13,11,00,0,01,7,0); 
    93             _OPN("valsound.base40", "slap bass pick",         2,2, 31,10,07,08,02,33,0,00,7,0, 21,09,08,07,05,23,3,07,7,0, 31,05,06,08,01,37,0,00,3,0, 31,11,06,10,05,00,0,01,7,0); 
    94             _OPN("valsound.base41", "super bass #2",          2,2, 24,18,02,13,09,12,2,03,3,0, 26,16,05,14,09,24,1,01,0,0, 31,12,02,08,03,22,1,00,7,0, 31,07,05,09,02,00,0,01,0,0); 
    95             _OPN("valsound.base42", "sp_bass#3 soft",         2,3, 24,18,02,13,09,25,2,03,3,0, 26,16,05,14,09,24,1,01,0,0, 31,12,02,08,03,32,1,00,7,0, 31,07,05,09,02,00,0,01,0,0); 
    96             _OPN("valsound.base43", "sp_bass#4 soft*2",       2,1, 24,18,02,13,10,28,2,03,3,0, 26,16,05,14,06,24,1,00,0,0, 31,12,02,08,03,30,1,00,7,0, 31,07,05,09,02,00,0,01,0,0); 
    97             _OPN("valsound.base44", "sp_bass#5 attack",       0,5, 19,18,02,15,10,30,2,00,3,0, 31,16,05,14,05,24,1,00,0,0, 31,12,02,08,03,30,1,00,7,0, 31,10,07,09,02,00,0,01,0,0); 
    98             _OPN("valsound.base45", "sp.bass#6 rezz+pipebass",2,3, 24,18,02,13,09,35,2,12,3,0, 26,16,05,14,09,25,1,02,0,0, 31,12,02,08,03,32,1,00,7,0, 31,07,05,09,02,00,0,01,0,0); 
    99             _OPN("valsound.base46", "synth bass 1",           4,3, 30,00,00,00,00,23,0,01,3,0, 27,04,00,07,01,00,0,01,3,0, 30,00,00,00,00,18,0,01,7,0, 25,04,00,07,01,00,0,01,7,0); 
    100             _OPN("valsound.base47", "synth bass 2 myon",      5,7, 14,00,09,12,00,26,2,00,0,0, 14,15,06,08,01,00,1,00,1,0, 20,15,06,08,01,00,1,01,2,0, 18,15,00,12,02,00,1,01,3,0); 
    101             _OPN("valsound.base48", "synth bass #3 cho!",     3,7, 31,11,09,00,04,32,1,01,3,0, 31,15,07,08,05,41,1,08,7,0, 26,18,07,10,06,04,1,00,3,0, 31,09,06,07,01,00,0,00,7,0); 
    102             _OPN("valsound.base49", "synth-wind-bass #4",     2,7, 31,13,09,00,04,32,1,00,3,0, 31,15,07,08,04,21,1,01,0,0, 26,18,07,08,03,21,1,01,7,0, 31,09,06,07,01,00,0,00,0,0); 
    103             _OPN("valsound.base50", "synth bass #5 q2",       4,4, 20,00,00,08,07,17,0,00,3,0, 18,07,04,11,00,00,0,01,3,0, 18,00,00,09,00,22,0,01,7,0, 15,00,00,11,01,00,0,01,7,0); 
    104             _OPN("valsound.base51", "old wood bass",          5,7, 31,15,00,13,02,28,1,00,0,0, 31,10,01,12,01,04,0,02,0,0, 25,10,01,12,01,04,0,01,0,0, 31,10,01,12,01,04,0,02,0,0); 
    105             _OPN("valsound.base52", "w.bass bright",          2,7, 31,13,03,10,02,32,1,00,7,0, 31,12,04,10,03,20,1,00,0,0, 31,17,00,10,07,15,1,02,3,0, 31,06,01,10,05,00,1,01,0,0); 
    106             _OPN("valsound.base53", "w.bass x2 bow",          4,5, 31,11,05,00,03,25,1,00,3,0, 31,10,09,08,04,00,1,01,3,0, 23,12,05,00,04,14,1,00,7,0, 31,12,09,07,05,00,1,02,7,0); 
    107             _OPN("valsound.base54", "wood bass 3 (muted1)",   5,5, 31,15,00,15,02,38,1,00,0,0, 31,10,01,12,01,04,0,02,0,0, 25,10,01,12,01,02,0,01,0,0, 31,10,01,12,01,04,0,01,0,0); 
    108  
    109  
    110             _categoly("valsound.bell"); 
    111             _OPN("valsound.bell1",  "Calm Bell",              4,3, 31,12,00,10,05,38,0,06,3,0, 31,08,04,06,11,04,0,02,3,0, 31,12,04,06,02,40,1,06,7,0, 31,06,04,06,11,00,0,02,7,0); 
    112             _OPN("valsound.bell2",  "China Bell Double",      4,7, 21,15,08,00,03,27,1,08,3,0, 31,13,05,06,04,00,1,04,3,0, 21,15,08,00,03,25,1,06,7,0, 31,13,05,06,04,00,1,03,7,0); 
    113             _OPN("valsound.bell3",  "Church Bell 2",          4,0, 26,03,00,02,15,35,2,04,3,0, 31,06,00,03,15,07,1,11,0,0, 31,06,00,01,14,41,2,06,7,0, 31,07,00,03,15,00,0,11,7,0); 
    114             _OPN("valsound.bell4",  "Church Bell",            4,0, 26,03,00,02,15,35,2,04,3,0, 31,06,00,03,15,07,1,11,0,0, 31,06,00,01,14,41,2,04,7,0, 31,07,00,03,15,00,0,15,7,0); 
    115             _OPN("valsound.bell5",  "Glocken 1",              4,3, 31,24,00,12,15,32,0,14,2,0, 31,15,00,08,15,00,0,02,0,0, 31,20,00,04,15,27,0,15,0,0, 31,14,00,05,15,00,0,02,0,0); 
    116             _OPN("valsound.bell6",  "Harp #1",                1,7, 31,10,10,06,05,26,0,03,0,0, 31,10,10,07,05,50,1,02,0,0, 31,13,10,07,13,40,0,02,0,0, 31,14,05,07,10,00,0,01,0,0); 
    117             _OPN("valsound.bell7",  "Harp #2",                1,3, 31,09,00,00,15,40,2,06,3,0, 31,11,00,08,15,30,2,01,7,0, 31,08,00,00,15,40,2,01,0,0, 31,08,00,08,14,00,2,01,0,0); 
    118             _OPN("valsound.bell8",  "kirakira",               1,7, 21,11,06,00,12,31,2,06,2,0, 21,12,08,00,12,26,2,10,6,0, 28,11,07,00,12,32,1,02,0,0, 28,04,02,04,05,00,1,02,0,0); 
    119             _OPN("valsound.bell9",  "Marimba",                4,6, 22,16,07,03,15,36,2,15,3,0, 16,10,13,07,10,00,2,01,3,0, 19,18,07,03,08,26,1,06,7,0, 16,11,12,07,10,03,2,02,7,0); 
    120             _OPN("valsound.bell10", "Old Bell",               4,6, 27,04,00,05,14,34,0,03,3,0, 31,07,00,06,14,00,1,01,0,0, 31,07,00,03,13,41,0,14,7,0, 31,08,00,06,14,16,0,04,7,0); 
    121             _OPN("valsound.bell11", "Percus. Bell",           5,3, 31,12,00,09,05,38,0,12,0,0, 31,15,04,05,11,09,0,03,0,0, 31,12,04,08,12,09,0,02,3,0, 31,06,04,08,11,09,0,01,7,0); 
    122             _OPN("valsound.bell12", "Pretty Bell",            6,6, 31,12,09,00,03,43,1,02,0,0, 31,09,08,06,03,00,1,01,3,0, 31,13,08,05,03,00,1,04,7,0, 31,16,16,05,13,13,1,15,0,0); 
    123             _OPN("valsound.bell13", "Synth Bell #0 (fromOPM)",6,2, 31,05,05,05,02,30,0,07,7,0, 31,08,05,07,15,00,0,03,7,0, 31,06,07,07,05,00,0,00,3,0, 31,08,05,05,02,10,0,01,3,0); 
    124             _OPN("valsound.bell14", "Synth Bell #1 o5",       6,3, 31,05,05,05,02,33,1,08,3,0, 27,11,00,06,15,00,1,02,3,0, 31,06,07,06,05,00,2,00,7,0, 31,11,08,06,03,00,1,01,7,0); 
    125             _OPN("valsound.bell15", "Synth Bell 2",           6,5, 31,08,09,00,05,33,1,07,3,0, 31,09,07,08,02,00,1,03,7,0, 31,12,07,08,01,00,1,02,3,0, 31,09,07,07,01,00,0,01,7,0); 
    126             _OPN("valsound.bell16", "Viberaphon AMS-modu.",   4,5, 24,14,00,07,15,50,1,12,3,0, 24,10,00,07,15,00,1,04,7,0, 26,14,00,06,15,57,1,04,7,0, 26,08,00,06,15,00,2,04,3,0); 
    127             _OPN("valsound.bell17", "twin marinba 2 g&amp, c",4,5, 18,09,05,14,12,33,1,14,3,0, 31,16,06,09,07,00,1,04,3,0, 18,09,05,14,12,33,1,07,7,0, 31,16,06,09,07,00,1,03,7,0); 
    128             _OPN("valsound.bell18", "twin marinba 1 g&amp, c",4,2, 31,10,05,00,12,30,1,08,3,0, 31,16,06,09,09,00,1,04,3,0, 31,10,05,00,12,30,1,06,7,0, 31,16,06,09,09,00,1,03,7,0); 
    129  
    130             _categoly("valsound.brass"); 
    131             _OPN("valsound.brass1",  "Brass strings",         5,7, 20,00,00,00,00,27,0,01,0,0, 15,03,00,06,01,05,0,02,1,0, 14,04,00,06,01,05,0,01,2,0, 15,04,00,06,01,05,0,01,3,0); 
    132             _OPN("valsound.brass2",  "E.mute Trampet",        2,7, 13,06,00,08,01,26,2,02,3,0, 15,08,00,08,01,32,1,02,7,0, 21,15,00,08,11,20,0,02,3,0, 18,04,00,08,02,00,1,08,0,0); 
    133             _OPN("valsound.brass3",  "HORN 2",                4,7, 15,11,02,00,02,23,0,02,3,0, 13,12,02,15,02,00,0,02,3,0, 15,13,05,00,01,27,0,02,7,0, 13,11,02,15,02,00,0,02,7,0); 
    134             _OPN("valsound.brass4",  "Alpine Horn #3",        5,7, 15,10,00,06,05,35,0,01,0,0, 15,05,00,08,02,06,0,02,2,0, 15,05,00,08,02,06,0,01,5,0, 15,05,00,08,02,06,0,01,0,0); 
    135             _OPN("valsound.brass5",  "Lead brass",            2,7, 18,04,02,08,01,27,0,02,3,0, 14,14,00,08,05,33,1,08,0,0, 20,00,02,08,00,36,0,02,7,0, 17,04,01,08,03,00,0,02,0,0); 
    136             _OPN("valsound.brass6",  "Normal HORN",           4,7, 15,13,02,15,01,36,0,02,3,0, 13,12,02,15,03,00,0,02,3,0, 15,13,05,15,02,25,0,02,7,0, 13,11,02,15,03,00,0,02,7,0); 
    137             _OPN("valsound.brass7",  "Synth Oboe",            6,3, 17,15,15,03,15,15,0,01,7,0, 16,00,09,00,00,00,0,06,3,0, 21,15,11,01,04,04,0,04,3,0, 18,15,11,01,04,04,0,06,7,0); 
    138             _OPN("valsound.brass8",  "Oboe 2",                2,5, 19,18,00,09,02,23,1,01,0,0, 31,17,00,06,03,28,0,06,0,0, 31,20,00,05,01,51,0,08,0,0, 16,31,00,11,00,00,1,04,0,0); 
    139             _OPN("valsound.brass9",  "Attack Brass (q2)",     4,4, 15,09,08,08,02,14,1,04,7,0, 18,15,01,08,03,00,0,04,3,0, 16,09,08,08,02,12,1,02,3,0, 31,15,01,08,03,00,0,02,7,0); 
    140             _OPN("valsound.brass10", "SAX",                   2,6, 13,06,00,08,01,14,2,02,3,0, 15,08,00,08,01,30,1,10,7,0, 21,07,00,08,02,35,0,01,3,0, 18,04,00,09,02,00,1,02,0,0); 
    141             _OPN("valsound.brass11", "Soft brass(lead)",      4,7, 16,03,00,02,01,30,0,01,5,0, 18,00,00,07,00,03,1,04,0,0, 16,00,00,02,02,35,0,01,1,0, 18,05,00,07,01,00,0,01,0,0); 
    142             _OPN("valsound.brass12", "Synth Brass 1 OLD",     5,7, 31,07,05,10,02,28,0,01,0,0, 31,02,05,10,02,00,0,00,0,0, 31,02,05,10,02,02,0,01,0,0, 31,10,05,10,10,00,0,02,0,0); 
    143             _OPN("valsound.brass13", "Synth Brass 2 OLD",     5,7, 31,10,01,10,02,28,1,02,0,0, 31,12,01,10,02,02,0,01,0,0, 31,12,01,10,02,04,0,02,0,0, 31,12,01,10,10,03,0,04,0,0); 
    144             _OPN("valsound.brass14", "Synth Brass 3",         4,7, 15,09,00,09,02,22,0,02,7,0, 23,04,02,09,05,00,0,02,7,0, 14,10,00,09,02,20,0,02,3,0, 20,04,00,09,02,00,0,02,3,0); 
    145             _OPN("valsound.brass15", "Synth Brass #4",        5,7, 20,00,00,00,00,22,0,04,0,0, 18,12,00,08,01,00,0,08,0,0, 20,12,00,08,01,00,0,04,6,0, 22,12,00,08,01,00,0,04,2,0); 
    146             _OPN("valsound.brass16", "Syn.Brass 5(long)",     4,7, 29,02,02,00,03,28,0,02,7,0, 29,00,02,08,05,04,0,04,7,0, 21,02,02,00,02,32,0,01,3,0, 29,00,02,08,05,04,0,02,3,0); 
    147             _OPN("valsound.brass17", "Synth Brass 6",         2,7, 30,08,08,05,03,25,0,01,1,0, 25,10,08,06,04,30,0,02,1,0, 20,10,05,06,03,40,0,01,5,0, 20,05,05,07,05,00,0,01,3,0); 
    148             _OPN("valsound.brass18", "Trumpet",               2,7, 13,06,00,08,01,25,2,02,3,0, 15,08,00,08,01,32,1,06,7,0, 21,07,00,08,02,42,0,02,3,0, 18,04,00,08,02,00,1,02,0,0); 
    149             _OPN("valsound.brass19", "Trumpet 2",             2,6, 13,06,00,08,01,14,2,02,3,0, 15,08,00,08,01,30,1,12,7,0, 21,07,00,08,02,38,0,02,3,0, 18,04,00,08,02,00,2,02,0,0); 
    150             _OPN("valsound.brass20", "Twin Horn (or OL=25)",  4,6, 14,06,00,11,03,32,0,04,3,0, 16,08,00,09,02,00,0,04,3,0, 14,06,00,11,03,33,0,03,7,0, 16,08,00,09,02,00,0,03,7,0); 
    151  
    152  
    153             _categoly("valsound.guitar"); 
    154             _OPN("valsound.guitar1",  "Guitar VeloLow",       1,3, 31,11,06,00,02,45,1,07,0,0, 31,07,05,00,05,35,1,02,0,0, 31,07,06,00,05,40,1,01,0,0, 31,13,05,05,01,00,1,01,0,0); 
    155             _OPN("valsound.guitar2",  "Guitar VeloHigh",      1,4, 31,11,06,00,02,43,1,09,0,0, 31,07,05,00,05,35,1,02,0,0, 31,07,06,00,05,35,1,01,0,0, 31,13,06,05,01,00,1,01,0,0); 
    156             _OPN("valsound.guitar3",  "A.Guitar #3",          1,7, 31,10,08,04,02,34,2,13,0,0, 31,09,07,04,02,36,0,02,0,0, 31,09,08,04,02,38,0,01,0,0, 31,04,02,08,02,00,1,01,0,0); 
    157             _OPN("valsound.guitar4",  "Cutting E.Guitar",     3,5, 21,07,01,00,01,18,0,04,0,0, 24,00,04,09,01,15,0,06,0,0, 22,20,02,07,13,05,0,02,3,0, 31,12,00,06,01,00,0,02,7,0); 
    158             _OPN("valsound.guitar5",  "Dis. Synth (old)",     5,7, 31,00,00,12,01,18,1,01,0,0, 31,00,01,12,01,04,1,02,0,0, 31,00,01,12,01,04,1,00,0,0, 31,00,01,12,01,04,1,02,0,0); 
    159             _OPN("valsound.guitar6",  "Dra-spi-Dis.G.",       0,7, 16,15,01,03,03,26,0,03,3,0, 19,31,01,03,00,27,0,01,0,0, 26,31,01,03,00,26,0,01,5,0, 27,31,01,08,00,00,0,01,0,0); 
    160             _OPN("valsound.guitar7",  "Dis.Guitar 3-",        1,7, 31,15,01,03,03,30,1,03,3,0, 31,00,01,10,01,25,1,01,0,0, 31,00,01,10,01,22,1,01,5,0, 31,13,01,07,01,00,1,01,0,0); 
    161             _OPN("valsound.guitar8",  "Dis.Guitar 3+",        0,5, 31,04,00,00,01,08,0,03,0,0, 18,01,00,08,00,25,0,15,0,0, 31,04,00,00,01,23,0,07,7,0, 31,12,00,09,00,00,0,01,1,0); 
    162             _OPN("valsound.guitar9",  "Feed-back Guitar 1",   3,7, 31,13,00,02,02,26,0,06,3,0, 18,07,04,10,05,24,0,03,3,0, 31,00,00,08,00,22,0,04,0,0, 31,00,00,07,01,00,0,02,7,0); 
    163             _OPN("valsound.guitar10", "Hard Dis. Guitar 1",   0,5, 31,04,04,06,01,08,0,03,0,0, 18,01,04,00,01,27,0,12,0,0, 31,04,04,00,01,22,0,02,3,0, 31,12,00,08,01,00,0,02,7,0); 
    164             _OPN("valsound.guitar11", "Hard Dis.Guitar 3",    0,5, 31,04,01,00,00,11,0,03,0,0, 18,01,04,07,00,23,0,15,0,0, 31,04,02,00,00,24,0,05,1,0, 31,12,00,07,01,00,0,01,7,0); 
    165             _OPN("valsound.guitar12", "Dis.Guitar '94 Hard",  0,7, 31,00,00,11,00,21,0,09,7,0, 31,15,00,10,01,26,0,02,3,0, 31,05,00,08,01,25,0,01,3,0, 31,00,00,07,00,04,0,02,7,0); 
    166             _OPN("valsound.guitar13", "New Dis.Guitar 1",     0,5, 31,05,00,00,00,20,0,02,3,0, 18,05,04,07,01,20,1,05,3,0, 31,06,05,00,00,22,0,01,7,0, 31,12,00,08,01,00,0,01,7,0); 
    167             _OPN("valsound.guitar14", "New Dis.Guitar 2",     0,5, 31,05,00,00,00,20,0,03,3,0, 18,05,04,07,01,20,1,07,3,0, 31,06,05,00,00,22,0,01,7,0, 31,12,00,08,01,00,0,01,7,0); 
    168             _OPN("valsound.guitar15", "New Dis.Guitar 3",     3,5, 31,05,00,00,10,08,0,03,0,0, 31,01,00,08,00,20,0,15,0,0, 31,04,00,15,00,22,0,01,3,0, 31,12,00,08,01,00,0,01,7,0); 
    169             _OPN("valsound.guitar16", "Overdrive.G. (AL=013)",1,7, 31,05,00,00,01,30,0,03,0,0, 18,05,00,08,01,21,0,02,2,0, 31,05,04,00,01,29,0,01,6,0, 31,11,00,08,01,00,0,01,2,0); 
    170             _OPN("valsound.guitar17", "METAL",                3,7, 26,16,07,04,08,24,2,08,7,0, 22,15,06,04,09,22,2,12,2,0, 26,09,02,07,08,43,1,03,0,0, 30,08,02,08,08,00,2,04,0,0); 
    171             _OPN("valsound.guitar18", "Soft Dis.Guitar",      0,7, 16,15,01,09,03,26,0,06,3,0, 19,15,01,00,00,27,0,03,0,0, 26,15,02,00,02,26,0,01,5,0, 21,31,00,07,00,00,0,01,0,0); 
    172  
    173  
    174             _categoly("valsound.lead"); 
    175             _OPN("valsound.lead1",  "Aco code",               4,4, 15,00,00,12,00,28,0,08,3,0, 17,06,01,12,01,00,1,08,3,0, 15,00,00,12,00,21,0,04,7,0, 17,06,01,12,01,00,1,04,7,0); 
    176             _OPN("valsound.lead2",  "Analog synthe 1",        1,6, 31,10,00,08,05,18,0,10,0,0, 31,05,01,08,02,30,0,02,0,0, 31,05,01,08,02,50,0,08,0,0, 31,05,01,08,02,00,0,02,0,0); 
    177             _OPN("valsound.lead3",  "Bosco-lead",             6,5, 28,02,02,06,00,20,0,05,7,0, 10,04,04,06,00,10,0,02,3,0, 15,02,02,06,00,00,0,03,7,0, 15,04,04,06,00,00,0,01,3,0); 
    178             _OPN("valsound.lead4",  "Cosmo Lead",             3,7, 31,00,00,00,00,25,0,00,3,0, 15,00,00,01,00,25,0,01,7,0, 22,00,00,01,00,23,0,01,7,0, 18,00,00,06,00,00,0,01,0,0); 
    179             _OPN("valsound.lead5",  "Cosmo Lead 2",           3,7, 31,00,00,00,00,33,0,00,3,0, 15,00,00,01,00,30,0,01,7,0, 22,00,00,01,00,28,0,00,7,0, 18,00,00,06,00,00,0,01,0,0); 
    180             _OPN("valsound.lead6",  "Digital lead #1",        2,7, 31,00,00,00,00,26,0,01,0,0, 31,00,00,00,00,37,0,02,3,0, 31,00,00,00,00,27,0,02,7,0, 31,12,00,15,01,00,0,01,0,0); 
    181             _OPN("valsound.lead7",  "Double sin wave",        7,4, 18,04,00,10,01,00,0,01,3,0, 18,04,00,07,01,00,0,04,3,0, 17,04,00,10,01,00,0,01,7,0, 14,04,00,07,01,00,0,04,7,0); 
    182             _OPN("valsound.lead8",  "E.Organ 2 bright",       6,7, 31,00,00,09,00,33,0,05,7,0, 31,13,00,09,01,00,0,03,3,0, 31,00,00,09,00,03,0,02,3,0, 31,00,00,09,00,00,0,01,7,0); 
    183             _OPN("valsound.lead9",  "E.Organ 2 (voice)",      6,3, 31,15,00,15,03,35,0,07,7,0, 31,00,00,09,00,00,0,03,3,0, 31,15,03,11,01,04,0,01,3,0, 31,15,00,11,01,04,0,02,7,0); 
    184             _OPN("valsound.lead10", "E.Organ 4 Click",        6,3, 31,00,00,04,01,33,0,02,0,0, 31,00,00,10,01,00,0,01,3,0, 31,12,00,10,01,00,0,04,7,0, 31,16,00,12,06,00,1,08,3,0); 
    185             _OPN("valsound.lead11", "E.Organ 5 Click",        6,2, 31,00,00,04,01,35,0,02,0,0, 31,00,00,10,01,00,0,02,3,0, 31,12,00,10,01,00,0,04,7,0, 28,16,00,14,08,00,1,08,3,0); 
    186             _OPN("valsound.lead12", "E.Organ 6",              6,7, 31,15,00,00,01,33,0,07,7,0, 31,10,00,09,01,00,0,04,3,0, 31,00,00,09,00,03,0,01,3,0, 31,00,00,09,00,00,0,02,7,0); 
    187             _OPN("valsound.lead13", "E.Organ 7 Church",       6,7, 31,00,00,09,00,33,0,04,7,0, 31,00,00,09,00,00,0,04,3,0, 31,00,00,09,00,00,0,02,3,0, 31,00,00,09,00,00,0,01,7,0); 
    188             _OPN("valsound.lead14", "Metal Lead",             0,7, 25,05,00,15,04,22,0,02,3,0, 21,02,00,12,03,26,0,07,0,0, 18,07,05,08,04,27,0,06,7,0, 21,05,03,08,02,00,0,04,0,0); 
    189             _OPN("valsound.lead15", "Metal Lead 3",           2,7, 31,10,00,00,01,25,0,04,3,0, 31,05,00,04,15,25,0,00,3,0, 31,09,00,06,10,37,0,04,7,0, 31,00,00,09,00,00,0,02,7,0); 
    190             _OPN("valsound.lead16", "MONO Lead",              3,7, 24,11,01,00,08,42,2,04,2,0, 24,09,01,00,05,19,2,04,6,0, 23,09,02,00,10,25,2,08,1,0, 23,05,03,11,08,00,1,01,0,0); 
    191             _OPN("valsound.lead17", "PSG like PC88 (long)",   1,7, 31,00,00,15,00,27,0,02,0,0, 31,00,00,15,00,50,0,01,0,0, 31,00,00,15,00,40,0,02,0,0, 31,00,00,15,00,00,0,01,0,0); 
    192             _OPN("valsound.lead18", "PSG Cut 1",              5,7, 31,00,00,00,00,30,0,02,0,0, 31,15,00,15,03,00,0,01,0,0, 31,15,00,15,03,00,0,01,0,0, 31,15,00,15,03,00,0,01,0,0); 
    193             _OPN("valsound.lead19", "Attack Synth",           0,7, 31,15,01,00,01,40,0,08,0,0, 31,15,01,00,01,20,1,04,0,0, 31,15,01,00,01,37,0,01,0,0, 31,15,01,08,03,00,0,01,0,0); 
    194             _OPN("valsound.lead20", "Sin wave",               6,2, 31,00,00,15,00,43,0,00,0,0, 31,00,00,15,00,00,0,00,0,0, 31,00,00,15,00,00,0,00,0,0, 31,00,00,15,00,00,0,00,0,0); 
    195             _OPN("valsound.lead21", "Synth &amp,  Bell 2",    4,7, 21,00,01,11,00,29,1,02,3,0, 14,08,00,13,01,08,0,04,3,0, 31,11,00,00,02,35,0,14,3,0, 31,08,05,10,15,00,0,04,7,0); 
    196             _OPN("valsound.lead22", "Chorus #2(Voice)+bell",  4,7, 21,00,01,11,00,35,1,02,3,0, 14,08,00,13,01,00,0,02,3,0, 31,12,00,00,02,44,0,14,3,0, 31,09,05,10,15,00,0,08,7,0); 
    197             _OPN("valsound.lead23", "Synth Cut 8-4",          4,7, 31,00,00,00,00,30,1,08,3,0, 18,13,09,07,01,00,1,08,3,0, 31,00,00,00,00,22,1,04,7,0, 21,13,09,07,01,00,1,04,7,0); 
    198             _OPN("valsound.lead24", "Synth long 8-4",         4,7, 31,00,00,00,00,30,1,08,3,0, 18,13,01,07,01,00,1,08,3,0, 31,00,00,00,00,22,1,04,7,0, 21,13,01,07,01,00,1,04,7,0); 
    199             _OPN("valsound.lead25", "ACO_Code #2",            4,7, 31,00,00,00,00,28,0,04,3,0, 31,10,00,07,01,00,0,04,3,0, 31,00,00,00,00,21,0,04,7,0, 31,10,00,07,01,00,0,04,7,0); 
    200             _OPN("valsound.lead26", "ACO_Code #3",            4,7, 31,00,00,00,00,28,0,04,3,0, 31,10,00,07,01,00,0,08,3,0, 31,00,00,00,00,21,0,04,7,0, 31,10,00,07,01,00,0,04,7,0); 
    201             _OPN("valsound.lead27", "Synth FB long 4",        3,7, 25,07,00,00,05,23,0,02,7,0, 17,00,00,09,00,32,0,04,3,0, 25,07,00,00,06,27,0,02,3,0, 16,08,00,09,01,00,0,02,0,0); 
    202             _OPN("valsound.lead28", "Synth FB long 5",        4,7, 22,04,00,00,03,22,0,02,3,0, 16,08,00,09,02,00,0,08,3,0, 22,00,00,00,00,15,0,02,7,0, 16,08,00,09,02,00,0,08,7,0); 
    203             _OPN("valsound.lead29", "Synth Lead 0",           4,6, 24,07,01,00,00,23,0,01,3,0, 23,08,00,06,01,00,0,01,3,0, 24,07,01,00,00,12,0,01,7,0, 15,08,00,08,01,08,0,03,7,0); 
    204             _OPN("valsound.lead30", "Synth Lead 1",           3,7, 14,10,00,15,01,25,0,02,0,0, 31,00,07,15,00,15,0,01,3,0, 31,00,00,15,00,30,0,02,7,0, 31,00,00,15,00,00,0,01,0,0); 
    205             _OPN("valsound.lead31", "Synth Lead 2",           2,7, 31,04,02,08,01,25,0,04,3,0, 14,14,00,08,05,32,1,04,0,0, 21,00,02,08,00,35,0,02,7,0, 21,04,01,08,03,00,0,02,0,0); 
    206             _OPN("valsound.lead32", "Synth Lead 3",           3,7, 20,00,00,00,00,29,0,02,3,0, 18,12,00,08,01,25,0,02,7,0, 20,12,00,08,01,30,0,01,3,0, 22,12,00,08,01,00,0,02,0,0); 
    207             _OPN("valsound.lead33", "Synth Lead 4",           4,5, 25,31,01,03,01,10,0,02,3,0, 31,10,01,10,02,00,0,04,7,0, 25,31,01,03,01,05,1,02,7,0, 31,10,01,10,02,00,0,04,3,0); 
    208             _OPN("valsound.lead34", "Synth Lead 5",           4,6, 31,10,00,08,02,16,0,11,7,0, 31,03,00,08,02,18,0,01,7,0, 31,03,00,08,02,50,0,08,3,0, 31,03,00,08,02,00,0,02,3,0); 
    209             _OPN("valsound.lead35", "Synth Lead 6",           4,5, 31,00,00,00,00,22,0,02,7,0, 18,10,00,06,01,00,0,08,7,0, 31,00,00,00,00,23,0,04,3,0, 18,10,00,06,01,00,0,04,3,0); 
    210             _OPN("valsound.lead36", "Synth Lead 7 (Soft FB)", 1,7, 31,00,00,00,00,23,0,02,1,0, 31,10,08,00,05,20,0,02,7,0, 15,12,00,12,02,36,0,06,5,0, 18,00,00,06,00,00,0,02,0,0); 
    211             _OPN("valsound.lead37", "Synth PSG",              0,7, 31,01,03,00,15,21,0,02,3,0, 31,01,06,00,15,41,0,04,3,0, 31,01,03,00,15,22,0,01,3,0, 31,13,00,06,02,00,0,01,3,0); 
    212             _OPN("valsound.lead38", "Synth PSG 2",            0,7, 17,01,03,08,15,32,0,08,3,0, 19,01,06,08,15,35,0,04,3,0, 22,01,03,08,15,20,0,02,3,0, 31,11,00,08,02,00,0,01,3,0); 
    213             _OPN("valsound.lead39", "Synth PSG 3",            5,7, 31,00,00,00,00,24,0,02,0,0, 31,15,00,09,03,06,0,01,0,0, 31,15,00,09,03,06,0,01,0,0, 31,15,00,09,03,06,0,02,0,0); 
    214             _OPN("valsound.lead40", "Synth PSG 4",            5,7, 31,00,00,00,00,22,0,01,0,0, 31,15,01,09,03,00,0,01,0,0, 31,15,01,09,03,00,0,00,0,0, 31,15,02,09,04,10,0,02,0,0); 
    215             _OPN("valsound.lead41", "Synth PSG 5",            1,7, 31,00,00,15,00,28,0,05,0,0, 31,00,00,15,00,45,0,03,0,0, 31,00,00,15,00,45,0,02,0,0, 31,00,00,15,00,00,0,01,0,0); 
    216             _OPN("valsound.lead42", "Sin water synth",        6,0, 31,00,00,15,00,44,0,01,0,0, 24,00,00,15,00,02,0,01,0,0, 25,21,00,15,15,14,0,06,0,0, 24,00,00,15,00,04,0,02,0,0); 
    217  
    218  
    219             _categoly("valsound.percus"); 
    220             _OPN("valsound.percus1",  "Bass Drum 2",          0,0, 30,26,00,13,15,26,0,01,0,0, 30,28,00,14,15,37,0,15,3,0, 30,16,00,08,15,05,0,00,0,0, 29,16,00,08,15,00,0,00,0,0); 
    221             _OPN("valsound.percus2",  "Bass Drum 3 o1f",      2,5, 24,19,00,00,15,30,2,01,3,0, 31,18,13,14,15,30,1,00,0,0, 31,19,13,08,15,05,1,01,7,0, 31,16,15,12,15,00,1,01,0,0); 
    222             _OPN("valsound.percus3",  "RUFINA BD o2c",        5,5, 29,20,18,15,05,11,1,00,2,0, 31,16,18,15,05,02,1,00,0,0, 31,16,17,15,03,00,1,00,0,0, 31,15,18,15,04,00,1,00,0,0); 
    223             _OPN("valsound.percus4",  "B.D.(-vBend)",         3,7, 31,08,00,01,05,08,2,15,1,0, 31,21,04,01,12,18,2,01,0,0, 31,26,00,15,15,14,2,00,0,0, 31,13,10,15,15,00,2,00,0,0); 
    224             _OPN("valsound.percus5",  "BD808_2(-vBend)",      6,3, 31,16,10,15,15,15,0,00,0,0, 31,15,10,15,15,00,0,00,0,0, 28,15,20,15,15,00,0,02,3,0, 26,15,20,15,15,00,0,02,7,0); 
    225             _OPN("valsound.percus6",  "Cho cho 3 (o2e)",      4,2, 18,18,00,14,15,00,3,04,7,0, 17,17,00,14,15,00,2,02,3,0, 18,18,00,14,15,00,3,04,3,0, 17,17,00,14,15,00,2,02,7,0); 
    226             _OPN("valsound.percus7",  "Cow-Bell 1",           3,7, 31,18,19,06,02,08,1,12,1,0, 31,18,12,06,02,35,1,07,2,0, 31,17,13,06,03,32,1,07,3,0, 31,19,15,09,01,00,0,02,7,0); 
    227             _OPN("valsound.percus8",  "Crash Cymbal (noise)", 4,7, 31,00,00,00,00,00,0,15,7,0, 21,10,11,13,05,00,1,00,7,0, 31,00,00,14,00,00,0,08,3,0, 31,09,09,09,15,05,2,15,3,0); 
    228             _OPN("valsound.percus9",  "Crash Noise",          0,7, 23,02,08,02,15,00,0,15,3,0, 25,02,08,02,15,14,1,12,7,0, 22,02,08,05,15,04,0,03,3,0, 23,07,08,05,15,00,0,06,7,0); 
    229             _OPN("valsound.percus10", "Crash Noise Short",    0,7, 23,02,08,02,15,00,2,15,3,0, 25,02,08,02,15,14,3,12,7,0, 22,02,08,05,15,04,2,03,3,0, 23,07,08,05,15,00,2,06,7,0); 
    230             _OPN("valsound.percus11", "ETHNIC Percus.0",      3,7, 31,19,06,03,13,40,1,10,3,0, 31,12,04,00,05,34,1,04,3,0, 31,16,06,10,14,36,1,02,7,0, 31,14,06,06,15,00,1,00,0,0); 
    231             _OPN("valsound.percus12", "ETHNIC Percus.1",      4,6, 31,16,00,05,15,35,0,00,3,0, 31,05,15,15,15,00,0,00,3,0, 31,21,00,15,11,15,0,04,1,0, 31,20,21,09,02,00,0,00,7,0); 
    232             _OPN("valsound.percus13", "Heavy BD.",            5,0, 31,15,00,08,15,10,0,00,0,0, 31,13,00,08,15,00,0,00,0,0, 31,13,00,08,15,00,0,00,0,0, 31,24,00,09,15,20,0,01,0,0); 
    233             _OPN("valsound.percus14", "Heavy BD2",            5,3, 31,16,10,08,15,10,0,00,0,0, 31,15,10,08,15,00,0,00,0,0, 31,10,10,08,14,00,0,00,0,0, 31,20,10,08,15,10,0,01,0,0); 
    234             _OPN("valsound.percus15", "Heavy SD1",            4,7, 31,00,00,00,00,00,0,15,0,0, 28,00,15,13,00,00,0,04,0,0, 31,18,15,07,04,00,1,00,0,0, 31,05,12,07,00,00,0,00,0,0); 
    235             _OPN("valsound.percus16", "Hi-Hat close 5_",      4,7, 31,00,00,00,00,00,0,15,7,0, 18,17,18,13,05,00,0,00,7,0, 31,00,00,14,00,00,0,08,3,0, 18,16,13,09,15,05,1,15,3,0); 
    236             _OPN("valsound.percus17", "Hi-Hat close 4",       4,7, 31,11,00,00,05,00,1,15,0,0, 31,17,12,09,09,00,1,00,0,0, 31,00,00,15,00,00,1,00,0,0, 25,19,20,15,15,07,0,15,0,0); 
    237             _OPN("valsound.percus18", "Hi-Hat close 5",       4,7, 31,00,00,00,00,00,0,15,7,0, 21,18,18,13,05,00,0,00,7,0, 31,00,00,14,00,00,0,08,3,0, 31,17,13,09,15,05,1,15,3,0); 
    238             _OPN("valsound.percus19", "Hi-Hat Close 6 -808-", 0,7, 27,00,10,00,15,39,0,15,0,0, 31,04,10,14,15,30,0,11,0,0, 31,10,10,14,15,05,1,09,7,0, 31,19,10,15,15,00,1,09,3,0); 
    239             _OPN("valsound.percus20", "Hi-hat #7 Metal o3-6", 4,7, 31,16,10,08,10,00,0,15,3,0, 31,18,07,12,15,00,1,01,3,0, 31,10,10,06,10,02,0,15,7,0, 21,18,07,12,15,00,1,00,7,0); 
    240             _OPN("valsound.percus21", "Hi-Hat Close #8 o4",   4,7, 25,19,00,09,03,00,1,15,0,0, 22,19,16,14,05,00,1,01,0,0, 31,10,15,15,05,00,0,15,0,0, 31,19,19,15,02,00,1,15,0,0); 
    241             _OPN("valsound.percus22", "Hi-hat Open o4e-g+",   4,5, 31,05,06,00,05,00,2,15,7,0, 31,10,04,07,08,19,2,03,1,0, 31,20,06,03,03,00,2,01,7,0, 31,25,06,07,10,06,3,07,0,0); 
    242             _OPN("valsound.percus23", "Open-hat2 Metal o4c-", 4,7, 31,14,00,08,03,00,1,15,3,0, 31,15,08,12,13,00,1,07,3,0, 31,13,00,06,03,01,0,10,7,0, 31,15,11,12,12,00,1,07,7,0); 
    243             _OPN("valsound.percus24", "Open-hat3 Metal",      4,7, 31,14,00,08,03,00,1,15,3,0, 31,15,08,12,13,00,0,07,3,0, 31,13,00,06,01,01,0,10,7,0, 31,15,11,12,07,00,0,07,7,0); 
    244             _OPN("valsound.percus25", "Hi-Hat Open #4 o4f",   4,6, 31,15,00,09,01,00,0,15,0,0, 31,20,05,14,05,03,0,04,0,0, 31,10,09,09,01,00,0,10,0,0, 31,22,05,14,05,00,1,07,0,0); 
    245             _OPN("valsound.percus26", "Metal ride o4c or o5c",4,5, 20,05,00,00,05,11,2,15,3,0, 18,11,09,07,11,00,2,08,3,0, 31,19,00,03,03,00,1,15,7,0, 16,12,09,07,11,00,2,07,7,0); 
    246             _OPN("valsound.percus27", "Rim Shot #1 o3c",      0,7, 31,11,00,15,15,37,1,15,1,0, 31,12,00,15,15,40,1,10,2,0, 31,17,00,15,15,13,2,00,3,0, 31,16,00,15,15,00,2,00,7,0); 
    247             _OPN("valsound.percus28", "Snare Drum Light",     4,7, 31,00,00,07,00,00,0,15,0,0, 31,15,15,09,02,00,0,15,0,0, 31,21,00,15,11,10,0,04,1,0, 31,19,17,09,02,00,0,00,7,0); 
    248             _OPN("valsound.percus29", "Snare Drum Lighter",   4,6, 31,00,00,14,00,00,0,10,3,0, 31,15,15,14,01,00,0,12,7,0, 31,15,00,14,15,00,3,02,3,0, 31,15,00,14,15,00,2,00,7,0); 
    249             _OPN("valsound.percus30", "Snare Drum 808 o2-o3", 4,7, 31,00,00,00,00,05,0,15,7,0, 31,18,17,15,01,00,0,09,3,0, 31,19,00,15,15,00,0,00,7,0, 26,21,16,15,15,00,0,00,3,0); 
    250             _OPN("valsound.percus31", "Snare4 -808type- o2",  4,7, 31,12,00,12,04,00,1,07,3,0, 27,15,18,15,01,00,1,15,3,0, 31,20,15,12,15,11,0,01,7,0, 31,19,15,15,15,00,1,01,7,0); 
    251             _OPN("valsound.percus32", "Snare5 o1-2(Franger)", 4,7, 31,16,00,00,02,06,0,15,7,0, 31,18,15,15,00,00,0,09,3,0, 28,20,00,15,15,00,0,00,7,0, 25,16,15,15,15,00,0,00,3,0); 
    252             _OPN("valsound.percus33", "Tom (old)",            4,7, 31,11,00,01,15,00,0,15,3,0, 31,20,14,15,05,00,0,01,3,0, 31,16,15,05,15,48,0,00,7,0, 31,11,15,15,15,00,0,00,7,0); 
    253             _OPN("valsound.percus34", "Synth tom 2 algo 3",   3,7, 31,04,00,01,00,00,1,15,1,0, 31,21,04,01,10,15,1,01,0,0, 31,26,00,15,15,00,1,00,0,0, 31,11,00,07,15,00,1,00,0,0); 
    254             _OPN("valsound.percus35", "Synth (Noisy) Tom #3", 3,7, 31,20,00,00,02,00,0,15,3,0, 31,18,13,06,08,28,0,00,3,0, 31,16,09,12,05,44,0,01,7,0, 31,14,04,12,01,00,0,00,7,0); 
    255             _OPN("valsound.percus36", "Synth Tom #3",         1,7, 31,18,10,00,01,00,0,15,3,0, 31,15,10,06,05,00,0,05,3,0, 31,17,12,12,06,37,0,01,7,0, 31,14,04,12,01,00,0,00,7,0); 
    256             _OPN("valsound.percus37", "Synth -DX7- Tom #4",   3,7, 31,04,00,01,00,00,1,11,0,0, 31,21,04,01,06,25,1,01,3,0, 31,26,00,15,15,00,1,00,0,0, 31,11,00,07,15,00,1,00,0,0); 
    257             _OPN("valsound.percus38", "Triangle 1 o5c",       4,5, 31,18,00,11,02,09,0,14,3,0, 31,21,07,12,04,00,0,08,3,0, 31,22,00,12,15,00,0,15,7,0, 31,20,06,15,15,00,0,07,7,0); 
    258  
    259  
    260             _categoly("valsound.piano"); 
    261             _OPN("valsound.piano1",  "Aco Piano2 (Attack)",   4,5, 31,05,00,00,00,23,1,01,3,0, 20,10,03,07,08,00,1,01,3,0, 31,03,00,00,00,25,1,01,7,0, 31,12,03,07,10,02,1,01,7,0); 
    262             _OPN("valsound.piano2",  "Backing 1 (Clav.)",     2,7, 31,08,03,06,02,40,2,01,3,0, 31,07,04,06,02,37,1,05,2,0, 31,07,02,06,01,30,1,03,7,0, 28,30,09,07,00,00,2,01,4,0); 
    263             _OPN("valsound.piano3",  "Clav. coad",            2,6, 31,15,08,06,02,35,0,12,3,0, 31,06,02,06,02,32,0,03,0,0, 31,06,02,06,01,32,0,01,7,0, 31,08,06,07,04,00,0,02,0,0); 
    264             _OPN("valsound.piano4",  "Deep Piano 1",          2,5, 31,09,04,00,02,38,0,00,3,0, 22,07,03,09,03,31,1,03,0,0, 31,07,03,02,03,27,1,00,7,0, 28,07,01,07,01,00,1,00,0,0); 
    265             _OPN("valsound.piano5",  "Deep Piano 3",          2,0, 31,20,09,00,02,08,1,00,7,0, 31,11,03,01,01,23,1,04,3,0, 31,13,05,02,02,30,0,00,3,0, 31,00,04,06,00,00,1,01,7,0); 
    266             _OPN("valsound.piano6",  "E.piano #2",            4,6, 22,05,00,03,05,30,0,02,3,0, 16,08,08,07,02,00,1,02,3,0, 20,05,00,03,05,34,0,04,7,0, 17,08,07,07,02,00,1,02,7,0); 
    267             _OPN("valsound.piano7",  "E.piano #3",            4,7, 22,05,00,03,05,41,0,01,3,0, 16,08,08,07,02,00,1,02,3,0, 31,18,00,03,10,44,0,08,7,0, 31,09,07,07,02,03,1,01,7,0); 
    268             _OPN("valsound.piano8",  "E.piano #4(2+)",        4,6, 31,05,00,15,05,46,2,02,3,0, 31,09,08,15,03,00,2,02,3,0, 31,05,00,15,05,44,2,04,7,0, 31,09,07,15,03,00,2,02,7,0); 
    269             _OPN("valsound.piano9",  "E.(Bell)Piano #5",      4,7, 31,07,00,09,05,35,0,06,3,0, 31,11,07,14,04,05,1,02,3,0, 31,10,09,09,05,35,0,12,7,0, 31,11,07,14,04,05,0,02,7,0); 
    270             _OPN("valsound.piano10", "E.Piano #6",            4,7, 29,20,00,00,03,34,0,08,3,0, 17,08,00,07,06,02,0,04,3,0, 30,00,00,00,00,25,0,04,7,0, 18,08,00,07,06,02,0,04,7,0); 
    271             _OPN("valsound.piano11", "E.Piano #7",            4,7, 31,15,00,10,15,40,0,15,0,0, 31,10,00,07,15,15,0,01,0,0, 31,10,00,05,15,20,0,01,0,0, 31,10,00,07,15,00,0,01,0,0); 
    272             _OPN("valsound.piano12", "Harpci chord 1",        2,5, 31,13,00,15,10,30,1,00,3,0, 31,11,02,00,03,32,1,07,3,0, 31,02,00,00,01,30,0,00,7,0, 31,06,06,07,01,00,1,04,7,0); 
    273             _OPN("valsound.piano13", "Harpci 2",              2,7, 31,04,00,05,01,30,2,00,3,0, 31,09,01,02,01,40,2,12,0,0, 31,04,03,06,01,30,1,03,7,0, 31,11,05,08,04,00,2,01,0,0); 
    274             _OPN("valsound.piano14", "Piano1 (ML1,10,05,01)", 2,7, 28,04,00,05,01,37,2,01,3,0, 22,09,01,02,01,47,2,12,0,0, 29,04,03,06,01,37,1,03,7,0, 18,08,00,06,06,00,2,01,0,0); 
    275             _OPN("valsound.piano15", "Piano3",                2,7, 31,04,02,00,01,35,2,01,3,0, 24,00,01,05,00,38,3,01,0,0, 28,00,00,05,00,42,2,04,5,0, 28,07,04,06,04,00,2,01,0,0); 
    276             _OPN("valsound.piano16", "Piano4",                2,7, 31,04,00,05,01,37,2,01,3,0, 31,09,01,02,01,47,2,10,0,0, 31,04,03,06,01,37,1,02,7,0, 31,08,00,06,06,00,1,01,0,0); 
    277             _OPN("valsound.piano17", "Digital Piano #5",      3,7, 28,04,00,07,01,27,1,01,4,0, 28,14,07,04,03,42,2,14,3,0, 26,04,03,08,02,38,0,03,7,0, 25,07,08,07,00,00,2,01,6,0); 
    278             _OPN("valsound.piano18", "Piano 6 High-tone",     2,7, 28,04,00,05,01,39,2,01,3,0, 31,13,01,02,02,50,2,14,0,0, 29,04,03,06,01,41,1,03,7,0, 21,08,06,06,06,00,2,01,0,0); 
    279             _OPN("valsound.piano19", "Panning Harpci",        2,7, 31,02,10,06,14,40,3,12,3,0, 25,02,15,06,14,32,0,09,0,0, 30,02,04,06,14,34,3,05,7,0, 20,02,08,06,14,00,3,01,0,0); 
    280             _OPN("valsound.piano20", "Yam Harpci chord",      1,4, 31,06,05,06,07,40,0,10,0,0, 31,06,04,05,05,35,0,02,0,0, 31,06,05,05,05,24,0,01,0,0, 31,07,06,07,05,00,0,01,0,0); 
    281  
    282             _categoly("valsound.se"); 
    283             _OPN("valsound.se1", "S.E.(Detune is needed o2c)",0,4, 31,07,03,00,01,12,0,00,1,0, 31,10,00,08,03,25,0,00,2,0, 31,06,04,08,08,00,0,04,3,0, 31,12,00,08,00,00,0,12,7,0); 
    284             _OPN("valsound.se2", "S.E. 2 o0-1-2",             1,2, 31,06,07,15,03,08,0,00,3,0, 31,06,09,15,06,08,0,00,7,0, 06,06,06,15,01,10,0,12,3,0, 31,05,04,15,02,00,0,00,0,0); 
    285             _OPN("valsound.se3", "S.E. 3(Feedin /noise add.)",4,6, 04,03,00,15,04,00,0,00,7,0, 08,07,07,15,01,00,0,07,7,0, 05,00,00,15,00,00,0,00,3,0, 08,06,03,15,01,00,0,04,3,0); 
    286  
    287             _categoly("valsound.special"); 
    288             _OPN("valsound.special1", "Digital 1",            3,6, 31,12,03,05,05,26,0,14,7,0, 31,16,06,00,03,28,0,08,3,0, 31,00,12,00,00,30,0,00,0,0, 31,15,12,12,02,00,0,01,7,0); 
    289             _OPN("valsound.special2", "Digital 2",            0,7, 31,15,00,12,03,27,0,10,7,0, 31,16,00,00,04,30,0,15,3,0, 31,15,00,00,02,30,0,02,0,0, 31,15,00,12,02,00,0,01,7,0); 
    290             _OPN("valsound.special3", "Digital[BAS] 3 o2-o3", 0,7, 31,00,00,09,00,27,0,12,1,0, 31,10,00,09,01,25,0,00,2,0, 31,10,00,09,01,25,0,12,3,0, 31,12,00,14,02,03,0,01,7,0); 
    291             _OPN("valsound.special4", "Digital[GTR] 3 o2-o3", 0,7, 31,00,00,09,00,27,0,12,1,0, 31,10,00,09,01,25,0,00,2,0, 31,10,00,09,01,25,0,03,3,0, 31,12,00,14,02,03,0,01,7,0); 
    292             _OPN("valsound.special5", "Digital 4 o4a",        5,0, 31,31,00,00,00,61,0,09,0,0, 31,31,00,13,00,03,0,03,0,0, 31,31,00,13,00,15,0,09,0,0, 31,31,00,13,00,06,0,06,0,0); 
    293  
    294  
    295             _categoly("valsound.strpad"); 
    296             _OPN("valsound.strpad1",  "Accordion1",           4,6, 17,00,00,00,00,20,0,04,3,0, 16,09,00,12,02,00,0,08,3,0, 15,00,00,07,00,36,0,04,7,0, 15,09,00,12,02,00,0,08,7,0); 
    297             _OPN("valsound.strpad2",  "Accordion2",           4,6, 21,00,01,11,00,22,1,04,3,0, 14,08,00,13,01,00,0,04,3,0, 21,00,01,10,00,30,1,04,7,0, 14,08,01,13,01,00,0,04,7,0); 
    298             _OPN("valsound.strpad3",  "Accordion3",           4,7, 31,05,00,00,00,25,0,04,7,0, 14,08,00,13,01,00,0,04,7,0, 31,08,00,00,10,25,0,02,3,0, 14,06,00,13,01,00,0,04,3,0); 
    299             _OPN("valsound.strpad4",  "Chorus #2(Voice)",     4,6, 21,00,01,11,00,40,1,04,3,0, 14,08,00,13,01,00,0,04,3,0, 21,00,01,10,00,37,1,04,7,0, 14,08,01,13,01,00,0,04,7,0); 
    300             _OPN("valsound.strpad5",  "Chorus #3",            4,4, 21,00,00,02,00,42,0,04,3,0, 18,04,00,09,01,00,0,08,3,0, 21,00,00,02,00,45,0,04,7,0, 18,04,00,09,01,00,0,04,7,0); 
    301             _OPN("valsound.strpad6",  "Chorus #4",            6,3, 21,00,00,02,00,39,0,04,0,0, 18,04,00,09,01,00,0,04,1,0, 18,10,00,09,01,00,0,04,3,0, 18,08,00,09,02,00,0,02,7,0); 
    302             _OPN("valsound.strpad7",  "F.Strings 1",          2,7, 25,10,00,05,01,29,1,01,1,0, 25,11,00,08,05,15,1,05,1,0, 28,13,00,06,02,45,1,01,0,0, 14,04,00,06,00,00,1,01,0,0); 
    303             _OPN("valsound.strpad8",  "F.Strings 2",          2,0, 21,07,00,07,03,37,1,01,3,0, 20,11,00,12,03,15,1,05,7,0, 16,08,00,12,03,45,1,01,0,0, 14,05,00,12,01,00,1,01,0,0); 
    304             _OPN("valsound.strpad9",  "F.Strings 3",          2,7, 25,10,00,05,01,35,1,01,3,0, 25,11,00,08,05,13,1,05,0,0, 28,13,00,06,02,45,1,01,7,0, 14,04,00,06,01,00,1,01,0,0); 
    305             _OPN("valsound.strpad10", "F.Strings 4 (low)",    2,7, 25,10,00,05,01,29,1,00,3,0, 25,11,00,08,05,20,1,04,0,0, 28,13,00,06,02,38,1,01,7,0, 14,04,00,06,01,00,1,01,0,0); 
    306             _OPN("valsound.strpad11", "Pizzicate#1(KOTO2)",   0,6, 31,07,08,01,02,30,3,03,7,0, 31,05,09,01,01,30,3,02,0,0, 31,05,08,03,02,35,3,01,0,0, 31,11,07,05,05,00,2,01,3,0); 
    307             _OPN("valsound.strpad12", "sound truck modoki",   4,7, 31,00,00,00,00,30,1,02,3,0, 18,13,04,07,01,00,1,02,3,0, 31,00,00,00,00,22,1,03,7,0, 21,13,04,07,01,00,1,03,7,0); 
    308             _OPN("valsound.strpad13", "Strings",              2,7, 15,09,00,05,01,27,2,02,3,0, 15,00,00,05,15,31,2,02,0,0, 15,00,00,05,00,27,1,02,0,0, 13,03,00,08,00,00,1,02,7,0); 
    309             _OPN("valsound.strpad14", "Synth Accordion",      4,7, 18,00,00,11,00,21,1,02,3,0, 15,09,00,13,02,00,1,08,3,0, 18,00,00,11,00,20,1,02,7,0, 14,09,00,13,02,00,1,04,7,0); 
    310             _OPN("valsound.strpad15", "Phaser synthe.",       0,7, 27,31,05,05,05,08,0,01,4,0, 26,31,04,05,04,18,0,01,5,0, 19,31,00,05,02,18,0,01,6,0, 16,15,00,06,02,00,0,03,4,0); 
    311             _OPN("valsound.strpad16", "FB Synth.",            3,7, 31,06,00,00,04,22,0,02,0,0, 18,00,00,08,00,28,0,04,6,0, 20,05,00,08,02,28,0,02,1,0, 20,04,00,08,01,00,0,02,2,0); 
    312             _OPN("valsound.strpad17", "Synth Strings MB",     3,7, 21,00,00,00,00,30,0,01,1,0, 14,07,07,06,03,25,0,02,6,0, 15,00,00,05,00,38,0,05,6,0, 18,00,00,06,00,00,0,02,0,0); 
    313             _OPN("valsound.strpad18", "Synth Strings #2",     2,7, 20,01,00,08,01,32,0,02,7,0, 15,04,00,08,01,28,0,02,0,0, 22,01,00,08,01,34,0,02,3,0, 14,02,00,09,01,00,0,02,0,0); 
    314             _OPN("valsound.strpad19", "Synth.Sweep Pad #1",   5,6, 31,07,00,09,05,18,0,04,0,0, 31,15,00,14,01,05,0,08,0,0, 31,16,00,15,02,05,0,04,0,0, 31,26,00,14,02,05,0,08,1,0); 
    315             _OPN("valsound.strpad20", "Twin synth. #1 Calm",  4,2, 16,03,00,00,02,25,0,04,3,0, 19,12,00,06,01,00,0,04,3,0, 16,03,00,00,02,20,0,03,7,0, 19,12,00,06,01,00,0,03,7,0); 
    316             _OPN("valsound.strpad21", "Twin synth. #2 FB",    4,6, 16,03,00,00,02,20,0,04,7,0, 19,12,00,06,01,00,0,08,3,0, 16,03,00,00,02,06,0,03,3,0, 19,12,00,06,01,08,0,06,7,0); 
    317             _OPN("valsound.strpad22", "Twin synth. #3 FB",    4,6, 16,06,05,00,02,20,0,04,3,0, 19,12,00,06,01,00,0,08,3,0, 16,06,05,00,02,06,0,03,7,0, 19,12,00,06,01,08,0,06,7,0); 
    318             _OPN("valsound.strpad23", "Vocoder voice1",       4,7, 31,08,05,12,15,20,0,04,7,0, 31,00,00,15,00,00,0,08,7,0, 31,08,05,12,15,24,0,03,3,0, 31,00,00,15,00,00,0,06,3,0); 
    319             _OPN("valsound.strpad24", "Voice o3-o5",          6,0, 10,00,01,03,00,70,0,01,0,0, 12,00,00,05,00,07,2,03,3,0, 12,00,01,06,02,00,1,02,7,0, 18,00,00,06,00,17,1,00,3,0); 
    320             _OPN("valsound.strpad25", "Voice' o3-o5",         6,0, 10,00,01,03,00,70,0,00,0,0, 12,00,00,05,00,06,2,03,3,0, 12,00,01,06,02,00,1,02,7,0, 18,00,00,06,00,10,1,01,3,0); 
    321  
    322  
    323             _categoly("valsound.wind"); 
    324             _OPN("valsound.wind1", "Clarinet #1",             3,7, 31,00,00,07,00,35,0,04,0,0, 25,14,00,04,02,42,0,04,0,0, 31,00,00,08,00,38,0,02,0,0, 18,07,00,08,01,00,0,01,0,0); 
    325             _OPN("valsound.wind2", "Clarinet #2 Brighter",    3,7, 31,00,00,07,00,40,0,08,0,0, 27,17,00,04,04,45,0,08,0,0, 31,00,00,08,00,37,0,04,0,0, 18,07,00,08,01,00,0,01,0,0); 
    326             _OPN("valsound.wind3", "E.Flute",                 3,0, 20,00,00,10,00,38,0,06,0,0, 14,16,00,10,05,36,0,02,3,0, 18,18,00,10,03,40,0,04,0,0, 14,12,00,10,01,00,1,02,0,0); 
    327             _OPN("valsound.wind4", "E.Flute 2",               3,5, 20,00,00,10,00,28,0,02,3,0, 14,16,00,10,05,40,0,02,3,0, 18,18,00,10,03,34,0,04,0,0, 14,12,00,10,01,00,1,02,7,0); 
    328             _OPN("valsound.wind5", "Flute + Bell",            4,5, 16,00,00,08,01,47,0,08,3,0, 14,00,00,08,00,00,0,04,3,0, 31,12,00,08,02,45,0,14,7,0, 31,08,00,08,15,00,0,08,7,0); 
    329             _OPN("valsound.wind6", "Old flute",               2,7, 20,05,00,14,01,50,0,04,0,0, 15,15,00,14,02,45,0,08,0,0, 18,15,00,14,02,50,0,08,0,0, 14,02,00,14,00,00,0,04,0,0); 
    330             _OPN("valsound.wind7", "Whitsle 1",               2,7, 20,05,00,14,01,60,0,04,0,0, 15,15,00,14,02,55,0,12,0,0, 18,15,00,14,02,60,0,08,0,0, 14,02,00,14,00,00,0,04,0,0); 
    331             _OPN("valsound.wind8", "Whitsle 2",               2,7, 20,05,00,14,01,55,0,02,0,0, 15,15,00,14,02,55,0,08,0,0, 18,15,00,14,02,60,0,08,0,0, 14,02,00,14,00,00,0,04,0,0); 
    332  
    333  
    334             _categoly("valsound.world"); 
    335             _OPN("valsound.world1", "Banjo (Harpci)",         1,7, 31,07,00,10,15,38,0,12,7,0, 31,08,06,07,03,52,2,10,1,0, 31,12,06,07,03,25,0,01,0,0, 31,11,07,07,03,00,2,03,5,0); 
    336             _OPN("valsound.world2", "KOTO",                   3,0, 31,00,00,10,00,38,0,06,0,0, 24,13,00,10,05,40,0,02,3,0, 28,15,00,10,03,40,0,04,0,0, 24,12,08,10,02,00,1,02,0,0); 
    337             _OPN("valsound.world3", "Koto 2",                 0,7, 31,07,03,03,02,30,3,03,7,0, 31,05,03,03,01,30,3,02,0,0, 31,05,03,05,02,30,3,01,0,0, 31,10,03,07,02,00,3,01,3,0); 
    338             _OPN("valsound.world4", "Sitar 1",                0,6, 18,05,03,01,02,30,1,03,7,0, 31,05,04,01,01,28,1,02,0,0, 31,05,03,03,02,35,1,01,0,0, 31,10,02,05,04,00,0,01,3,0); 
    339             _OPN("valsound.world5", "Shamisen 2",             3,7, 31,16,06,07,02,33,0,01,3,0, 31,16,06,07,04,18,2,06,0,0, 31,06,06,07,01,40,0,01,7,0, 31,15,06,07,05,00,0,02,0,0); 
    340             _OPN("valsound.world6", "Shamisen 1",             2,7, 31,16,06,07,02,33,0,01,3,0, 31,16,06,07,04,18,2,08,0,0, 31,06,06,07,01,40,0,01,7,0, 31,15,06,07,05,00,0,02,0,0); 
    341             _OPN("valsound.world7", "Synth Shamisen",         2,7, 31,16,06,07,01,33,0,01,3,0, 31,16,06,07,04,18,2,07,0,0, 31,06,06,07,00,40,0,01,7,0, 31,15,06,07,02,00,0,02,0,0); 
    342  
     64            if (includeFlag & INCLUDE_DEFAULT) { 
     65                _categoly("default"); 
     66                _new("sine",      "Sine wave",          new SiONVoice(5,0)); 
     67                _new("saw",       "Saw wave",           new SiONVoice(5,1)); 
     68                _new("triangle8", "8bit triangle wave", new SiONVoice(5,3)); 
     69                _new("triangle",  "Triangle wave",      new SiONVoice(5,4)); 
     70                _new("square",    "Square wave",        new SiONVoice(5,5)); 
     71                _new("noise",     "White noise",        new SiONVoice(5,6)); 
     72                _new("snoise",    "93bit noise",        new SiONVoice(5,25)); 
     73                _new("konami",    "Wave table sample",  new SiONVoice(5,7)); 
     74                _new("ma1",       "MA3 wave sample",    new SiONVoice(5,33)); 
     75                _new("beep",      "Pulse wave sample",  new SiONVoice(5,81)); 
     76                _new("ramp",      "Ramp wave sample",   new SiONVoice(5,160)); 
     77            } 
     78 
     79            if (includeFlag & INCLUDE_VALSOUND) { 
     80                _categoly("valsound.base"); 
     81                _OPN("valsound.base1",  "Analog Bass #2+FBsynth", 6,7, 31,00,00,12,01,18,1,01,0,0, 31,00,01,12,01,04,1,02,0,0, 31,00,00,09,00,03,0,01,7,0, 31,00,00,09,00,03,0,01,3,0); 
     82                _OPN("valsound.base2",  "Analog Bass",            5,6, 31,00,00,00,00,41,0,01,0,0, 20,00,00,10,00,00,0,01,1,0, 24,00,00,08,00,00,0,01,2,0, 20,00,00,10,00,00,0,01,3,0); 
     83                _OPN("valsound.base3",  "Analog bass #2 (q2)",    6,4, 21,05,00,00,02,35,0,00,0,0, 26,10,00,11,01,00,0,01,0,0, 27,00,00,11,00,00,0,01,3,0, 27,14,00,11,01,00,0,01,7,0); 
     84                _OPN("valsound.base4",  "Chopper Bass 0",         0,5, 28,14,15,15,04,25,2,10,1,0, 31,14,10,09,03,34,2,00,2,0, 31,14,09,09,02,23,0,00,3,0, 31,06,05,11,02,00,0,00,7,0); 
     85                _OPN("valsound.base5",  "Chopper Bass 1",         0,5, 28,14,15,15,04,30,1,14,1,0, 31,14,10,09,02,35,1,03,2,0, 31,14,09,09,02,25,0,00,3,0, 31,06,05,11,01,00,0,00,7,0); 
     86                _OPN("valsound.base6",  "Chopper bass 2 (CUT)",   0,4, 31,15,28,05,02,28,3,15,6,0, 31,10,15,04,04,41,3,04,6,0, 31,08,03,05,01,21,2,00,6,0, 31,02,02,05,15,00,2,00,6,0); 
     87                _OPN("valsound.base7",  "Chopper bass 3",         0,5, 31,18,02,13,09,28,2,13,1,0, 31,10,15,04,04,41,3,01,2,0, 31,08,03,05,01,21,2,00,3,0, 31,02,02,12,15,00,2,00,7,0); 
     88                _OPN("valsound.base8",  "Elec.Chopper bass+ 4",   0,5, 31,18,02,13,09,28,2,13,1,0, 31,10,15,04,04,41,3,01,2,0, 31,08,03,05,01,21,2,00,3,0, 31,02,02,12,15,00,2,01,7,0); 
     89                _OPN("valsound.base9",  "Effect Bass 1",          4,3, 23,05,04,07,02,00,0,01,3,0, 30,02,02,08,02,00,1,07,3,0, 24,05,04,07,02,00,0,01,7,0, 31,02,02,08,02,00,1,10,7,0); 
     90                _OPN("valsound.base10", "Effect Bass 2 to UP",    4,3, 03,06,05,15,02,00,0,01,3,0, 07,04,03,15,02,00,1,07,3,0, 03,06,05,15,02,00,0,01,7,0, 07,04,03,15,02,00,1,10,7,0); 
     91                _OPN("valsound.base11", "Effect Bass 1",          4,3, 22,05,06,00,00,09,0,01,3,0, 19,03,04,07,01,00,0,07,3,0, 23,00,00,00,00,19,0,01,7,0, 20,02,00,07,01,00,0,01,7,0); 
     92                _OPN("valsound.base12", "Mohaaa",                 0,5, 07,00,00,15,00,21,0,01,0,0, 06,00,00,15,00,18,0,02,0,0, 08,00,00,15,00,23,0,01,0,0, 18,00,00,15,00,00,0,02,0,0); 
     93                _OPN("valsound.base13", "Effect FB Bass #5",      0,7, 31,06,02,15,03,20,0,01,3,0, 31,06,02,15,06,14,2,02,0,0, 06,06,02,15,01,08,0,01,7,0, 31,05,01,15,02,00,0,02,0,0); 
     94                _OPN("valsound.base14", "Magical bass",           0,7, 31,08,00,06,10,38,1,01,3,0, 28,18,05,06,13,47,1,10,7,0, 31,07,07,06,08,23,2,00,2,0, 28,09,06,08,01,00,2,00,0,0); 
     95                _OPN("valsound.base15", "E.Bass #6",              0,7, 31,15,00,10,05,35,1,14,3,0, 31,14,07,07,04,41,1,04,7,0, 31,14,03,00,02,18,1,00,3,0, 31,12,08,08,01,00,0,00,7,0); 
     96                _OPN("valsound.base16", "E.Bass #7",              3,7, 31,15,00,10,05,29,1,10,7,0, 31,13,07,07,04,46,1,04,7,0, 31,14,05,00,02,19,1,00,3,0, 31,12,04,08,01,00,0,00,0,0); 
     97                _OPN("valsound.base17", "E.Bass 70",              2,5, 31,08,00,00,03,34,0,00,3,0, 31,14,06,09,02,42,0,08,0,0, 31,16,03,00,02,20,0,00,7,0, 31,12,05,08,02,00,0,01,0,0); 
     98                _OPN("valsound.base18", "VAL006 Bass like Euro",  0,4, 31,07,07,11,02,25,3,06,0,0, 31,06,06,11,01,55,3,04,7,0, 31,09,06,11,01,18,2,00,3,0, 31,06,08,11,15,00,2,01,0,0); 
     99                _OPN("valsound.base19", "E.Bass x2",              2,7, 31,14,08,03,01,33,0,00,1,0, 31,17,08,09,05,30,0,14,2,0, 31,15,08,05,05,35,0,04,3,0, 31,15,08,06,01,00,0,01,7,0); 
     100                _OPN("valsound.base20", "E.Bass x4",              2,7, 31,14,03,00,02,33,1,03,3,0, 23,16,04,12,03,30,2,10,0,0, 31,13,03,11,03,27,1,00,7,0, 31,07,05,09,01,00,3,01,0,0); 
     101                _OPN("valsound.base21", "Metal pick bass X5",     3,7, 31,14,00,06,13,51,2,13,0,0, 31,13,00,06,13,21,0,01,0,0, 31,09,00,06,13,23,0,00,0,0, 31,09,00,07,13,00,0,00,0,0); 
     102                _OPN("valsound.base22", "Groove Bass 1",          5,3, 31,00,00,00,00,38,0,00,0,0, 21,00,00,13,00,05,0,00,0,0, 21,00,00,13,00,03,0,01,0,0, 21,00,00,13,00,03,0,01,0,0); 
     103                _OPN("valsound.base23", "Analog Bass Groove #2",  6,5, 31,00,00,00,00,41,0,02,0,0, 31,00,00,10,00,02,0,01,0,0, 31,00,00,10,00,01,0,01,7,0, 31,00,00,10,00,01,0,01,3,0); 
     104                _OPN("valsound.base24", "Harmonics #1",           6,6, 31,12,09,00,02,45,1,02,3,0, 31,10,08,06,01,00,1,01,7,0, 31,13,08,05,02,00,1,02,7,0, 31,16,12,05,10,00,1,00,3,0); 
     105                _OPN("valsound.base25", "Low Bass x1",            5,3, 31,00,09,15,00,25,2,00,0,0, 31,15,06,08,01,00,1,00,1,0, 31,15,06,08,01,00,1,01,2,0, 31,15,00,07,02,00,1,01,3,0); 
     106                _OPN("valsound.base26", "Low_bass x2 Little FB",  5,6, 21,00,09,00,00,24,2,00,0,0, 21,15,06,08,01,00,1,00,1,0, 21,15,06,08,01,00,1,01,2,0, 27,15,00,07,02,00,1,01,3,0); 
     107                _OPN("valsound.base27", "Low Bass x1 Rezzo.",     5,3, 31,00,09,15,00,30,2,00,0,0, 31,15,06,12,01,02,1,00,1,0, 31,15,06,12,01,02,1,01,2,0, 31,15,10,12,02,02,1,04,3,0); 
     108                _OPN("valsound.base28", "Low Bass Picked",        5,7, 31,05,00,00,11,33,1,00,0,0, 30,12,04,09,01,00,1,00,0,0, 27,14,08,09,03,00,1,01,0,0, 27,14,07,12,15,06,1,05,0,0); 
     109                _OPN("valsound.base29", "metal base",             0,5, 20,10,09,15,01,22,0,00,7,0, 17,09,00,00,02,22,0,01,7,0, 21,09,00,00,01,18,0,00,3,0, 18,08,00,08,01,00,0,01,3,0); 
     110                _OPN("valsound.base30", "e.n.bass 1",             3,7, 27,14,00,04,04,25,0,07,0,0, 31,12,00,04,03,45,0,02,0,0, 31,19,00,04,05,15,0,00,0,0, 31,12,06,07,01,00,0,00,0,0); 
     111                _OPN("valsound.base31", "psg bass 1",             5,7, 31,14,00,00,00,22,0,00,0,0, 31,14,03,08,05,00,0,01,3,0, 31,14,03,08,03,00,0,00,0,0, 31,16,03,08,03,00,0,01,7,0); 
     112                _OPN("valsound.base32", "psg bass 2",             5,7, 31,14,00,00,00,22,0,01,0,0, 31,14,03,08,05,00,0,02,3,0, 31,14,03,08,03,00,0,00,0,0, 31,16,03,08,03,00,0,01,7,0); 
     113                _OPN("valsound.base33", "rezonance type bass #1", 2,0, 24,19,02,13,10,33,1,03,3,0, 26,16,05,14,06,28,1,00,0,0, 15,14,06,08,05,14,1,00,0,0, 31,07,05,09,02,00,0,02,7,0); 
     114                _OPN("valsound.base34", "slap bass",              2,2, 31,10,07,08,02,33,0,00,7,0, 21,08,08,07,05,23,3,07,7,0, 31,05,06,07,01,37,0,00,3,0, 31,08,06,07,05,00,0,01,7,0); 
     115                _OPN("valsound.base35", "slap bass 1",            2,7, 31,14,07,08,02,33,0,00,7,0, 21,15,06,07,04,18,2,06,7,0, 31,05,06,07,01,40,0,00,3,0, 31,12,07,07,05,00,0,01,3,0); 
     116                _OPN("valsound.base36", "slap bass 2 (1+)",       2,7, 31,14,07,08,02,33,0,00,7,0, 21,15,06,07,04,28,2,07,7,0, 31,05,06,07,01,40,0,00,3,0, 31,12,07,07,05,00,0,01,3,0); 
     117                _OPN("valsound.base37", "slap bass #3",           2,7, 31,14,07,00,05,32,0,03,7,0, 31,16,01,12,04,35,0,10,0,0, 31,11,02,00,03,23,1,00,3,0, 31,12,05,07,01,00,0,00,0,0); 
     118                _OPN("valsound.base38", "slap bass pull",         2,2, 31,10,07,08,02,33,0,00,7,0, 21,08,08,09,05,23,3,10,7,0, 31,05,06,10,01,37,0,00,3,0, 31,16,06,11,01,00,0,01,7,0); 
     119                _OPN("valsound.base39", "slap bass mute",         2,2, 31,18,07,11,12,33,0,00,7,0, 21,11,08,11,15,23,3,07,7,0, 31,15,06,11,11,37,0,00,3,0, 31,15,06,13,11,00,0,01,7,0); 
     120                _OPN("valsound.base40", "slap bass pick",         2,2, 31,10,07,08,02,33,0,00,7,0, 21,09,08,07,05,23,3,07,7,0, 31,05,06,08,01,37,0,00,3,0, 31,11,06,10,05,00,0,01,7,0); 
     121                _OPN("valsound.base41", "super bass #2",          2,2, 24,18,02,13,09,12,2,03,3,0, 26,16,05,14,09,24,1,01,0,0, 31,12,02,08,03,22,1,00,7,0, 31,07,05,09,02,00,0,01,0,0); 
     122                _OPN("valsound.base42", "sp_bass#3 soft",         2,3, 24,18,02,13,09,25,2,03,3,0, 26,16,05,14,09,24,1,01,0,0, 31,12,02,08,03,32,1,00,7,0, 31,07,05,09,02,00,0,01,0,0); 
     123                _OPN("valsound.base43", "sp_bass#4 soft*2",       2,1, 24,18,02,13,10,28,2,03,3,0, 26,16,05,14,06,24,1,00,0,0, 31,12,02,08,03,30,1,00,7,0, 31,07,05,09,02,00,0,01,0,0); 
     124                _OPN("valsound.base44", "sp_bass#5 attack",       0,5, 19,18,02,15,10,30,2,00,3,0, 31,16,05,14,05,24,1,00,0,0, 31,12,02,08,03,30,1,00,7,0, 31,10,07,09,02,00,0,01,0,0); 
     125                _OPN("valsound.base45", "sp.bass#6 rezz+pipebass",2,3, 24,18,02,13,09,35,2,12,3,0, 26,16,05,14,09,25,1,02,0,0, 31,12,02,08,03,32,1,00,7,0, 31,07,05,09,02,00,0,01,0,0); 
     126                _OPN("valsound.base46", "synth bass 1",           4,3, 30,00,00,00,00,23,0,01,3,0, 27,04,00,07,01,00,0,01,3,0, 30,00,00,00,00,18,0,01,7,0, 25,04,00,07,01,00,0,01,7,0); 
     127                _OPN("valsound.base47", "synth bass 2 myon",      5,7, 14,00,09,12,00,26,2,00,0,0, 14,15,06,08,01,00,1,00,1,0, 20,15,06,08,01,00,1,01,2,0, 18,15,00,12,02,00,1,01,3,0); 
     128                _OPN("valsound.base48", "synth bass #3 cho!",     3,7, 31,11,09,00,04,32,1,01,3,0, 31,15,07,08,05,41,1,08,7,0, 26,18,07,10,06,04,1,00,3,0, 31,09,06,07,01,00,0,00,7,0); 
     129                _OPN("valsound.base49", "synth-wind-bass #4",     2,7, 31,13,09,00,04,32,1,00,3,0, 31,15,07,08,04,21,1,01,0,0, 26,18,07,08,03,21,1,01,7,0, 31,09,06,07,01,00,0,00,0,0); 
     130                _OPN("valsound.base50", "synth bass #5 q2",       4,4, 20,00,00,08,07,17,0,00,3,0, 18,07,04,11,00,00,0,01,3,0, 18,00,00,09,00,22,0,01,7,0, 15,00,00,11,01,00,0,01,7,0); 
     131                _OPN("valsound.base51", "old wood bass",          5,7, 31,15,00,13,02,28,1,00,0,0, 31,10,01,12,01,04,0,02,0,0, 25,10,01,12,01,04,0,01,0,0, 31,10,01,12,01,04,0,02,0,0); 
     132                _OPN("valsound.base52", "w.bass bright",          2,7, 31,13,03,10,02,32,1,00,7,0, 31,12,04,10,03,20,1,00,0,0, 31,17,00,10,07,15,1,02,3,0, 31,06,01,10,05,00,1,01,0,0); 
     133                _OPN("valsound.base53", "w.bass x2 bow",          4,5, 31,11,05,00,03,25,1,00,3,0, 31,10,09,08,04,00,1,01,3,0, 23,12,05,00,04,14,1,00,7,0, 31,12,09,07,05,00,1,02,7,0); 
     134                _OPN("valsound.base54", "wood bass 3 (muted1)",   5,5, 31,15,00,15,02,38,1,00,0,0, 31,10,01,12,01,04,0,02,0,0, 25,10,01,12,01,02,0,01,0,0, 31,10,01,12,01,04,0,01,0,0); 
     135 
     136 
     137                _categoly("valsound.bell"); 
     138                _OPN("valsound.bell1",  "Calm Bell",              4,3, 31,12,00,10,05,38,0,06,3,0, 31,08,04,06,11,04,0,02,3,0, 31,12,04,06,02,40,1,06,7,0, 31,06,04,06,11,00,0,02,7,0); 
     139                _OPN("valsound.bell2",  "China Bell Double",      4,7, 21,15,08,00,03,27,1,08,3,0, 31,13,05,06,04,00,1,04,3,0, 21,15,08,00,03,25,1,06,7,0, 31,13,05,06,04,00,1,03,7,0); 
     140                _OPN("valsound.bell3",  "Church Bell 2",          4,0, 26,03,00,02,15,35,2,04,3,0, 31,06,00,03,15,07,1,11,0,0, 31,06,00,01,14,41,2,06,7,0, 31,07,00,03,15,00,0,11,7,0); 
     141                _OPN("valsound.bell4",  "Church Bell",            4,0, 26,03,00,02,15,35,2,04,3,0, 31,06,00,03,15,07,1,11,0,0, 31,06,00,01,14,41,2,04,7,0, 31,07,00,03,15,00,0,15,7,0); 
     142                _OPN("valsound.bell5",  "Glocken 1",              4,3, 31,24,00,12,15,32,0,14,2,0, 31,15,00,08,15,00,0,02,0,0, 31,20,00,04,15,27,0,15,0,0, 31,14,00,05,15,00,0,02,0,0); 
     143                _OPN("valsound.bell6",  "Harp #1",                1,7, 31,10,10,06,05,26,0,03,0,0, 31,10,10,07,05,50,1,02,0,0, 31,13,10,07,13,40,0,02,0,0, 31,14,05,07,10,00,0,01,0,0); 
     144                _OPN("valsound.bell7",  "Harp #2",                1,3, 31,09,00,00,15,40,2,06,3,0, 31,11,00,08,15,30,2,01,7,0, 31,08,00,00,15,40,2,01,0,0, 31,08,00,08,14,00,2,01,0,0); 
     145                _OPN("valsound.bell8",  "kirakira",               1,7, 21,11,06,00,12,31,2,06,2,0, 21,12,08,00,12,26,2,10,6,0, 28,11,07,00,12,32,1,02,0,0, 28,04,02,04,05,00,1,02,0,0); 
     146                _OPN("valsound.bell9",  "Marimba",                4,6, 22,16,07,03,15,36,2,15,3,0, 16,10,13,07,10,00,2,01,3,0, 19,18,07,03,08,26,1,06,7,0, 16,11,12,07,10,03,2,02,7,0); 
     147                _OPN("valsound.bell10", "Old Bell",               4,6, 27,04,00,05,14,34,0,03,3,0, 31,07,00,06,14,00,1,01,0,0, 31,07,00,03,13,41,0,14,7,0, 31,08,00,06,14,16,0,04,7,0); 
     148                _OPN("valsound.bell11", "Percus. Bell",           5,3, 31,12,00,09,05,38,0,12,0,0, 31,15,04,05,11,09,0,03,0,0, 31,12,04,08,12,09,0,02,3,0, 31,06,04,08,11,09,0,01,7,0); 
     149                _OPN("valsound.bell12", "Pretty Bell",            6,6, 31,12,09,00,03,43,1,02,0,0, 31,09,08,06,03,00,1,01,3,0, 31,13,08,05,03,00,1,04,7,0, 31,16,16,05,13,13,1,15,0,0); 
     150                _OPN("valsound.bell13", "Synth Bell #0 (fromOPM)",6,2, 31,05,05,05,02,30,0,07,7,0, 31,08,05,07,15,00,0,03,7,0, 31,06,07,07,05,00,0,00,3,0, 31,08,05,05,02,10,0,01,3,0); 
     151                _OPN("valsound.bell14", "Synth Bell #1 o5",       6,3, 31,05,05,05,02,33,1,08,3,0, 27,11,00,06,15,00,1,02,3,0, 31,06,07,06,05,00,2,00,7,0, 31,11,08,06,03,00,1,01,7,0); 
     152                _OPN("valsound.bell15", "Synth Bell 2",           6,5, 31,08,09,00,05,33,1,07,3,0, 31,09,07,08,02,00,1,03,7,0, 31,12,07,08,01,00,1,02,3,0, 31,09,07,07,01,00,0,01,7,0); 
     153                _OPN("valsound.bell16", "Viberaphon AMS-modu.",   4,5, 24,14,00,07,15,50,1,12,3,0, 24,10,00,07,15,00,1,04,7,0, 26,14,00,06,15,57,1,04,7,0, 26,08,00,06,15,00,2,04,3,0); 
     154                _OPN("valsound.bell17", "twin marinba 2 g&amp, c",4,5, 18,09,05,14,12,33,1,14,3,0, 31,16,06,09,07,00,1,04,3,0, 18,09,05,14,12,33,1,07,7,0, 31,16,06,09,07,00,1,03,7,0); 
     155                _OPN("valsound.bell18", "twin marinba 1 g&amp, c",4,2, 31,10,05,00,12,30,1,08,3,0, 31,16,06,09,09,00,1,04,3,0, 31,10,05,00,12,30,1,06,7,0, 31,16,06,09,09,00,1,03,7,0); 
     156 
     157                _categoly("valsound.brass"); 
     158                _OPN("valsound.brass1",  "Brass strings",         5,7, 20,00,00,00,00,27,0,01,0,0, 15,03,00,06,01,05,0,02,1,0, 14,04,00,06,01,05,0,01,2,0, 15,04,00,06,01,05,0,01,3,0); 
     159                _OPN("valsound.brass2",  "E.mute Trampet",        2,7, 13,06,00,08,01,26,2,02,3,0, 15,08,00,08,01,32,1,02,7,0, 21,15,00,08,11,20,0,02,3,0, 18,04,00,08,02,00,1,08,0,0); 
     160                _OPN("valsound.brass3",  "HORN 2",                4,7, 15,11,02,00,02,23,0,02,3,0, 13,12,02,15,02,00,0,02,3,0, 15,13,05,00,01,27,0,02,7,0, 13,11,02,15,02,00,0,02,7,0); 
     161                _OPN("valsound.brass4",  "Alpine Horn #3",        5,7, 15,10,00,06,05,35,0,01,0,0, 15,05,00,08,02,06,0,02,2,0, 15,05,00,08,02,06,0,01,5,0, 15,05,00,08,02,06,0,01,0,0); 
     162                _OPN("valsound.brass5",  "Lead brass",            2,7, 18,04,02,08,01,27,0,02,3,0, 14,14,00,08,05,33,1,08,0,0, 20,00,02,08,00,36,0,02,7,0, 17,04,01,08,03,00,0,02,0,0); 
     163                _OPN("valsound.brass6",  "Normal HORN",           4,7, 15,13,02,15,01,36,0,02,3,0, 13,12,02,15,03,00,0,02,3,0, 15,13,05,15,02,25,0,02,7,0, 13,11,02,15,03,00,0,02,7,0); 
     164                _OPN("valsound.brass7",  "Synth Oboe",            6,3, 17,15,15,03,15,15,0,01,7,0, 16,00,09,00,00,00,0,06,3,0, 21,15,11,01,04,04,0,04,3,0, 18,15,11,01,04,04,0,06,7,0); 
     165                _OPN("valsound.brass8",  "Oboe 2",                2,5, 19,18,00,09,02,23,1,01,0,0, 31,17,00,06,03,28,0,06,0,0, 31,20,00,05,01,51,0,08,0,0, 16,31,00,11,00,00,1,04,0,0); 
     166                _OPN("valsound.brass9",  "Attack Brass (q2)",     4,4, 15,09,08,08,02,14,1,04,7,0, 18,15,01,08,03,00,0,04,3,0, 16,09,08,08,02,12,1,02,3,0, 31,15,01,08,03,00,0,02,7,0); 
     167                _OPN("valsound.brass10", "SAX",                   2,6, 13,06,00,08,01,14,2,02,3,0, 15,08,00,08,01,30,1,10,7,0, 21,07,00,08,02,35,0,01,3,0, 18,04,00,09,02,00,1,02,0,0); 
     168                _OPN("valsound.brass11", "Soft brass(lead)",      4,7, 16,03,00,02,01,30,0,01,5,0, 18,00,00,07,00,03,1,04,0,0, 16,00,00,02,02,35,0,01,1,0, 18,05,00,07,01,00,0,01,0,0); 
     169                _OPN("valsound.brass12", "Synth Brass 1 OLD",     5,7, 31,07,05,10,02,28,0,01,0,0, 31,02,05,10,02,00,0,00,0,0, 31,02,05,10,02,02,0,01,0,0, 31,10,05,10,10,00,0,02,0,0); 
     170                _OPN("valsound.brass13", "Synth Brass 2 OLD",     5,7, 31,10,01,10,02,28,1,02,0,0, 31,12,01,10,02,02,0,01,0,0, 31,12,01,10,02,04,0,02,0,0, 31,12,01,10,10,03,0,04,0,0); 
     171                _OPN("valsound.brass14", "Synth Brass 3",         4,7, 15,09,00,09,02,22,0,02,7,0, 23,04,02,09,05,00,0,02,7,0, 14,10,00,09,02,20,0,02,3,0, 20,04,00,09,02,00,0,02,3,0); 
     172                _OPN("valsound.brass15", "Synth Brass #4",        5,7, 20,00,00,00,00,22,0,04,0,0, 18,12,00,08,01,00,0,08,0,0, 20,12,00,08,01,00,0,04,6,0, 22,12,00,08,01,00,0,04,2,0); 
     173                _OPN("valsound.brass16", "Syn.Brass 5(long)",     4,7, 29,02,02,00,03,28,0,02,7,0, 29,00,02,08,05,04,0,04,7,0, 21,02,02,00,02,32,0,01,3,0, 29,00,02,08,05,04,0,02,3,0); 
     174                _OPN("valsound.brass17", "Synth Brass 6",         2,7, 30,08,08,05,03,25,0,01,1,0, 25,10,08,06,04,30,0,02,1,0, 20,10,05,06,03,40,0,01,5,0, 20,05,05,07,05,00,0,01,3,0); 
     175                _OPN("valsound.brass18", "Trumpet",               2,7, 13,06,00,08,01,25,2,02,3,0, 15,08,00,08,01,32,1,06,7,0, 21,07,00,08,02,42,0,02,3,0, 18,04,00,08,02,00,1,02,0,0); 
     176                _OPN("valsound.brass19", "Trumpet 2",             2,6, 13,06,00,08,01,14,2,02,3,0, 15,08,00,08,01,30,1,12,7,0, 21,07,00,08,02,38,0,02,3,0, 18,04,00,08,02,00,2,02,0,0); 
     177                _OPN("valsound.brass20", "Twin Horn (or OL=25)",  4,6, 14,06,00,11,03,32,0,04,3,0, 16,08,00,09,02,00,0,04,3,0, 14,06,00,11,03,33,0,03,7,0, 16,08,00,09,02,00,0,03,7,0); 
     178 
     179 
     180                _categoly("valsound.guitar"); 
     181                _OPN("valsound.guitar1",  "Guitar VeloLow",       1,3, 31,11,06,00,02,45,1,07,0,0, 31,07,05,00,05,35,1,02,0,0, 31,07,06,00,05,40,1,01,0,0, 31,13,05,05,01,00,1,01,0,0); 
     182                _OPN("valsound.guitar2",  "Guitar VeloHigh",      1,4, 31,11,06,00,02,43,1,09,0,0, 31,07,05,00,05,35,1,02,0,0, 31,07,06,00,05,35,1,01,0,0, 31,13,06,05,01,00,1,01,0,0); 
     183                _OPN("valsound.guitar3",  "A.Guitar #3",          1,7, 31,10,08,04,02,34,2,13,0,0, 31,09,07,04,02,36,0,02,0,0, 31,09,08,04,02,38,0,01,0,0, 31,04,02,08,02,00,1,01,0,0); 
     184                _OPN("valsound.guitar4",  "Cutting E.Guitar",     3,5, 21,07,01,00,01,18,0,04,0,0, 24,00,04,09,01,15,0,06,0,0, 22,20,02,07,13,05,0,02,3,0, 31,12,00,06,01,00,0,02,7,0); 
     185                _OPN("valsound.guitar5",  "Dis. Synth (old)",     5,7, 31,00,00,12,01,18,1,01,0,0, 31,00,01,12,01,04,1,02,0,0, 31,00,01,12,01,04,1,00,0,0, 31,00,01,12,01,04,1,02,0,0); 
     186                _OPN("valsound.guitar6",  "Dra-spi-Dis.G.",       0,7, 16,15,01,03,03,26,0,03,3,0, 19,31,01,03,00,27,0,01,0,0, 26,31,01,03,00,26,0,01,5,0, 27,31,01,08,00,00,0,01,0,0); 
     187                _OPN("valsound.guitar7",  "Dis.Guitar 3-",        1,7, 31,15,01,03,03,30,1,03,3,0, 31,00,01,10,01,25,1,01,0,0, 31,00,01,10,01,22,1,01,5,0, 31,13,01,07,01,00,1,01,0,0); 
     188                _OPN("valsound.guitar8",  "Dis.Guitar 3+",        0,5, 31,04,00,00,01,08,0,03,0,0, 18,01,00,08,00,25,0,15,0,0, 31,04,00,00,01,23,0,07,7,0, 31,12,00,09,00,00,0,01,1,0); 
     189                _OPN("valsound.guitar9",  "Feed-back Guitar 1",   3,7, 31,13,00,02,02,26,0,06,3,0, 18,07,04,10,05,24,0,03,3,0, 31,00,00,08,00,22,0,04,0,0, 31,00,00,07,01,00,0,02,7,0); 
     190                _OPN("valsound.guitar10", "Hard Dis. Guitar 1",   0,5, 31,04,04,06,01,08,0,03,0,0, 18,01,04,00,01,27,0,12,0,0, 31,04,04,00,01,22,0,02,3,0, 31,12,00,08,01,00,0,02,7,0); 
     191                _OPN("valsound.guitar11", "Hard Dis.Guitar 3",    0,5, 31,04,01,00,00,11,0,03,0,0, 18,01,04,07,00,23,0,15,0,0, 31,04,02,00,00,24,0,05,1,0, 31,12,00,07,01,00,0,01,7,0); 
     192                _OPN("valsound.guitar12", "Dis.Guitar '94 Hard",  0,7, 31,00,00,11,00,21,0,09,7,0, 31,15,00,10,01,26,0,02,3,0, 31,05,00,08,01,25,0,01,3,0, 31,00,00,07,00,04,0,02,7,0); 
     193                _OPN("valsound.guitar13", "New Dis.Guitar 1",     0,5, 31,05,00,00,00,20,0,02,3,0, 18,05,04,07,01,20,1,05,3,0, 31,06,05,00,00,22,0,01,7,0, 31,12,00,08,01,00,0,01,7,0); 
     194                _OPN("valsound.guitar14", "New Dis.Guitar 2",     0,5, 31,05,00,00,00,20,0,03,3,0, 18,05,04,07,01,20,1,07,3,0, 31,06,05,00,00,22,0,01,7,0, 31,12,00,08,01,00,0,01,7,0); 
     195                _OPN("valsound.guitar15", "New Dis.Guitar 3",     3,5, 31,05,00,00,10,08,0,03,0,0, 31,01,00,08,00,20,0,15,0,0, 31,04,00,15,00,22,0,01,3,0, 31,12,00,08,01,00,0,01,7,0); 
     196                _OPN("valsound.guitar16", "Overdrive.G. (AL=013)",1,7, 31,05,00,00,01,30,0,03,0,0, 18,05,00,08,01,21,0,02,2,0, 31,05,04,00,01,29,0,01,6,0, 31,11,00,08,01,00,0,01,2,0); 
     197                _OPN("valsound.guitar17", "METAL",                3,7, 26,16,07,04,08,24,2,08,7,0, 22,15,06,04,09,22,2,12,2,0, 26,09,02,07,08,43,1,03,0,0, 30,08,02,08,08,00,2,04,0,0); 
     198                _OPN("valsound.guitar18", "Soft Dis.Guitar",      0,7, 16,15,01,09,03,26,0,06,3,0, 19,15,01,00,00,27,0,03,0,0, 26,15,02,00,02,26,0,01,5,0, 21,31,00,07,00,00,0,01,0,0); 
     199 
     200 
     201                _categoly("valsound.lead"); 
     202                _OPN("valsound.lead1",  "Aco code",               4,4, 15,00,00,12,00,28,0,08,3,0, 17,06,01,12,01,00,1,08,3,0, 15,00,00,12,00,21,0,04,7,0, 17,06,01,12,01,00,1,04,7,0); 
     203                _OPN("valsound.lead2",  "Analog synthe 1",        1,6, 31,10,00,08,05,18,0,10,0,0, 31,05,01,08,02,30,0,02,0,0, 31,05,01,08,02,50,0,08,0,0, 31,05,01,08,02,00,0,02,0,0); 
     204                _OPN("valsound.lead3",  "Bosco-lead",             6,5, 28,02,02,06,00,20,0,05,7,0, 10,04,04,06,00,10,0,02,3,0, 15,02,02,06,00,00,0,03,7,0, 15,04,04,06,00,00,0,01,3,0); 
     205                _OPN("valsound.lead4",  "Cosmo Lead",             3,7, 31,00,00,00,00,25,0,00,3,0, 15,00,00,01,00,25,0,01,7,0, 22,00,00,01,00,23,0,01,7,0, 18,00,00,06,00,00,0,01,0,0); 
     206                _OPN("valsound.lead5",  "Cosmo Lead 2",           3,7, 31,00,00,00,00,33,0,00,3,0, 15,00,00,01,00,30,0,01,7,0, 22,00,00,01,00,28,0,00,7,0, 18,00,00,06,00,00,0,01,0,0); 
     207                _OPN("valsound.lead6",  "Digital lead #1",        2,7, 31,00,00,00,00,26,0,01,0,0, 31,00,00,00,00,37,0,02,3,0, 31,00,00,00,00,27,0,02,7,0, 31,12,00,15,01,00,0,01,0,0); 
     208                _OPN("valsound.lead7",  "Double sin wave",        7,4, 18,04,00,10,01,00,0,01,3,0, 18,04,00,07,01,00,0,04,3,0, 17,04,00,10,01,00,0,01,7,0, 14,04,00,07,01,00,0,04,7,0); 
     209                _OPN("valsound.lead8",  "E.Organ 2 bright",       6,7, 31,00,00,09,00,33,0,05,7,0, 31,13,00,09,01,00,0,03,3,0, 31,00,00,09,00,03,0,02,3,0, 31,00,00,09,00,00,0,01,7,0); 
     210                _OPN("valsound.lead9",  "E.Organ 2 (voice)",      6,3, 31,15,00,15,03,35,0,07,7,0, 31,00,00,09,00,00,0,03,3,0, 31,15,03,11,01,04,0,01,3,0, 31,15,00,11,01,04,0,02,7,0); 
     211                _OPN("valsound.lead10", "E.Organ 4 Click",        6,3, 31,00,00,04,01,33,0,02,0,0, 31,00,00,10,01,00,0,01,3,0, 31,12,00,10,01,00,0,04,7,0, 31,16,00,12,06,00,1,08,3,0); 
     212                _OPN("valsound.lead11", "E.Organ 5 Click",        6,2, 31,00,00,04,01,35,0,02,0,0, 31,00,00,10,01,00,0,02,3,0, 31,12,00,10,01,00,0,04,7,0, 28,16,00,14,08,00,1,08,3,0); 
     213                _OPN("valsound.lead12", "E.Organ 6",              6,7, 31,15,00,00,01,33,0,07,7,0, 31,10,00,09,01,00,0,04,3,0, 31,00,00,09,00,03,0,01,3,0, 31,00,00,09,00,00,0,02,7,0); 
     214                _OPN("valsound.lead13", "E.Organ 7 Church",       6,7, 31,00,00,09,00,33,0,04,7,0, 31,00,00,09,00,00,0,04,3,0, 31,00,00,09,00,00,0,02,3,0, 31,00,00,09,00,00,0,01,7,0); 
     215                _OPN("valsound.lead14", "Metal Lead",             0,7, 25,05,00,15,04,22,0,02,3,0, 21,02,00,12,03,26,0,07,0,0, 18,07,05,08,04,27,0,06,7,0, 21,05,03,08,02,00,0,04,0,0); 
     216                _OPN("valsound.lead15", "Metal Lead 3",           2,7, 31,10,00,00,01,25,0,04,3,0, 31,05,00,04,15,25,0,00,3,0, 31,09,00,06,10,37,0,04,7,0, 31,00,00,09,00,00,0,02,7,0); 
     217                _OPN("valsound.lead16", "MONO Lead",              3,7, 24,11,01,00,08,42,2,04,2,0, 24,09,01,00,05,19,2,04,6,0, 23,09,02,00,10,25,2,08,1,0, 23,05,03,11,08,00,1,01,0,0); 
     218                _OPN("valsound.lead17", "PSG like PC88 (long)",   1,7, 31,00,00,15,00,27,0,02,0,0, 31,00,00,15,00,50,0,01,0,0, 31,00,00,15,00,40,0,02,0,0, 31,00,00,15,00,00,0,01,0,0); 
     219                _OPN("valsound.lead18", "PSG Cut 1",              5,7, 31,00,00,00,00,30,0,02,0,0, 31,15,00,15,03,00,0,01,0,0, 31,15,00,15,03,00,0,01,0,0, 31,15,00,15,03,00,0,01,0,0); 
     220                _OPN("valsound.lead19", "Attack Synth",           0,7, 31,15,01,00,01,40,0,08,0,0, 31,15,01,00,01,20,1,04,0,0, 31,15,01,00,01,37,0,01,0,0, 31,15,01,08,03,00,0,01,0,0); 
     221                _OPN("valsound.lead20", "Sin wave",               6,2, 31,00,00,15,00,43,0,00,0,0, 31,00,00,15,00,00,0,00,0,0, 31,00,00,15,00,00,0,00,0,0, 31,00,00,15,00,00,0,00,0,0); 
     222                _OPN("valsound.lead21", "Synth &amp,  Bell 2",    4,7, 21,00,01,11,00,29,1,02,3,0, 14,08,00,13,01,08,0,04,3,0, 31,11,00,00,02,35,0,14,3,0, 31,08,05,10,15,00,0,04,7,0); 
     223                _OPN("valsound.lead22", "Chorus #2(Voice)+bell",  4,7, 21,00,01,11,00,35,1,02,3,0, 14,08,00,13,01,00,0,02,3,0, 31,12,00,00,02,44,0,14,3,0, 31,09,05,10,15,00,0,08,7,0); 
     224                _OPN("valsound.lead23", "Synth Cut 8-4",          4,7, 31,00,00,00,00,30,1,08,3,0, 18,13,09,07,01,00,1,08,3,0, 31,00,00,00,00,22,1,04,7,0, 21,13,09,07,01,00,1,04,7,0); 
     225                _OPN("valsound.lead24", "Synth long 8-4",         4,7, 31,00,00,00,00,30,1,08,3,0, 18,13,01,07,01,00,1,08,3,0, 31,00,00,00,00,22,1,04,7,0, 21,13,01,07,01,00,1,04,7,0); 
     226                _OPN("valsound.lead25", "ACO_Code #2",            4,7, 31,00,00,00,00,28,0,04,3,0, 31,10,00,07,01,00,0,04,3,0, 31,00,00,00,00,21,0,04,7,0, 31,10,00,07,01,00,0,04,7,0); 
     227                _OPN("valsound.lead26", "ACO_Code #3",            4,7, 31,00,00,00,00,28,0,04,3,0, 31,10,00,07,01,00,0,08,3,0, 31,00,00,00,00,21,0,04,7,0, 31,10,00,07,01,00,0,04,7,0); 
     228                _OPN("valsound.lead27", "Synth FB long 4",        3,7, 25,07,00,00,05,23,0,02,7,0, 17,00,00,09,00,32,0,04,3,0, 25,07,00,00,06,27,0,02,3,0, 16,08,00,09,01,00,0,02,0,0); 
     229                _OPN("valsound.lead28", "Synth FB long 5",        4,7, 22,04,00,00,03,22,0,02,3,0, 16,08,00,09,02,00,0,08,3,0, 22,00,00,00,00,15,0,02,7,0, 16,08,00,09,02,00,0,08,7,0); 
     230                _OPN("valsound.lead29", "Synth Lead 0",           4,6, 24,07,01,00,00,23,0,01,3,0, 23,08,00,06,01,00,0,01,3,0, 24,07,01,00,00,12,0,01,7,0, 15,08,00,08,01,08,0,03,7,0); 
     231                _OPN("valsound.lead30", "Synth Lead 1",           3,7, 14,10,00,15,01,25,0,02,0,0, 31,00,07,15,00,15,0,01,3,0, 31,00,00,15,00,30,0,02,7,0, 31,00,00,15,00,00,0,01,0,0); 
     232                _OPN("valsound.lead31", "Synth Lead 2",           2,7, 31,04,02,08,01,25,0,04,3,0, 14,14,00,08,05,32,1,04,0,0, 21,00,02,08,00,35,0,02,7,0, 21,04,01,08,03,00,0,02,0,0); 
     233                _OPN("valsound.lead32", "Synth Lead 3",           3,7, 20,00,00,00,00,29,0,02,3,0, 18,12,00,08,01,25,0,02,7,0, 20,12,00,08,01,30,0,01,3,0, 22,12,00,08,01,00,0,02,0,0); 
     234                _OPN("valsound.lead33", "Synth Lead 4",           4,5, 25,31,01,03,01,10,0,02,3,0, 31,10,01,10,02,00,0,04,7,0, 25,31,01,03,01,05,1,02,7,0, 31,10,01,10,02,00,0,04,3,0); 
     235                _OPN("valsound.lead34", "Synth Lead 5",           4,6, 31,10,00,08,02,16,0,11,7,0, 31,03,00,08,02,18,0,01,7,0, 31,03,00,08,02,50,0,08,3,0, 31,03,00,08,02,00,0,02,3,0); 
     236                _OPN("valsound.lead35", "Synth Lead 6",           4,5, 31,00,00,00,00,22,0,02,7,0, 18,10,00,06,01,00,0,08,7,0, 31,00,00,00,00,23,0,04,3,0, 18,10,00,06,01,00,0,04,3,0); 
     237                _OPN("valsound.lead36", "Synth Lead 7 (Soft FB)", 1,7, 31,00,00,00,00,23,0,02,1,0, 31,10,08,00,05,20,0,02,7,0, 15,12,00,12,02,36,0,06,5,0, 18,00,00,06,00,00,0,02,0,0); 
     238                _OPN("valsound.lead37", "Synth PSG",              0,7, 31,01,03,00,15,21,0,02,3,0, 31,01,06,00,15,41,0,04,3,0, 31,01,03,00,15,22,0,01,3,0, 31,13,00,06,02,00,0,01,3,0); 
     239                _OPN("valsound.lead38", "Synth PSG 2",            0,7, 17,01,03,08,15,32,0,08,3,0, 19,01,06,08,15,35,0,04,3,0, 22,01,03,08,15,20,0,02,3,0, 31,11,00,08,02,00,0,01,3,0); 
     240                _OPN("valsound.lead39", "Synth PSG 3",            5,7, 31,00,00,00,00,24,0,02,0,0, 31,15,00,09,03,06,0,01,0,0, 31,15,00,09,03,06,0,01,0,0, 31,15,00,09,03,06,0,02,0,0); 
     241                _OPN("valsound.lead40", "Synth PSG 4",            5,7, 31,00,00,00,00,22,0,01,0,0, 31,15,01,09,03,00,0,01,0,0, 31,15,01,09,03,00,0,00,0,0, 31,15,02,09,04,10,0,02,0,0); 
     242                _OPN("valsound.lead41", "Synth PSG 5",            1,7, 31,00,00,15,00,28,0,05,0,0, 31,00,00,15,00,45,0,03,0,0, 31,00,00,15,00,45,0,02,0,0, 31,00,00,15,00,00,0,01,0,0); 
     243                _OPN("valsound.lead42", "Sin water synth",        6,0, 31,00,00,15,00,44,0,01,0,0, 24,00,00,15,00,02,0,01,0,0, 25,21,00,15,15,14,0,06,0,0, 24,00,00,15,00,04,0,02,0,0); 
     244 
     245 
     246                _categoly("valsound.percus"); 
     247                _OPN("valsound.percus1",  "Bass Drum 2",          0,0, 30,26,00,13,15,26,0,01,0,0, 30,28,00,14,15,37,0,15,3,0, 30,16,00,08,15,05,0,00,0,0, 29,16,00,08,15,00,0,00,0,0); 
     248                _OPN("valsound.percus2",  "Bass Drum 3 o1f",      2,5, 24,19,00,00,15,30,2,01,3,0, 31,18,13,14,15,30,1,00,0,0, 31,19,13,08,15,05,1,01,7,0, 31,16,15,12,15,00,1,01,0,0); 
     249                _OPN("valsound.percus3",  "RUFINA BD o2c",        5,5, 29,20,18,15,05,11,1,00,2,0, 31,16,18,15,05,02,1,00,0,0, 31,16,17,15,03,00,1,00,0,0, 31,15,18,15,04,00,1,00,0,0); 
     250                _OPN("valsound.percus4",  "B.D.(-vBend)",         3,7, 31,08,00,01,05,08,2,15,1,0, 31,21,04,01,12,18,2,01,0,0, 31,26,00,15,15,14,2,00,0,0, 31,13,10,15,15,00,2,00,0,0); 
     251                _OPN("valsound.percus5",  "BD808_2(-vBend)",      6,3, 31,16,10,15,15,15,0,00,0,0, 31,15,10,15,15,00,0,00,0,0, 28,15,20,15,15,00,0,02,3,0, 26,15,20,15,15,00,0,02,7,0); 
     252                _OPN("valsound.percus6",  "Cho cho 3 (o2e)",      4,2, 18,18,00,14,15,00,3,04,7,0, 17,17,00,14,15,00,2,02,3,0, 18,18,00,14,15,00,3,04,3,0, 17,17,00,14,15,00,2,02,7,0); 
     253                _OPN("valsound.percus7",  "Cow-Bell 1",           3,7, 31,18,19,06,02,08,1,12,1,0, 31,18,12,06,02,35,1,07,2,0, 31,17,13,06,03,32,1,07,3,0, 31,19,15,09,01,00,0,02,7,0); 
     254                _OPN("valsound.percus8",  "Crash Cymbal (noise)", 4,7, 31,00,00,00,00,00,0,15,7,0, 21,10,11,13,05,00,1,00,7,0, 31,00,00,14,00,00,0,08,3,0, 31,09,09,09,15,05,2,15,3,0); 
     255                _OPN("valsound.percus9",  "Crash Noise",          0,7, 23,02,08,02,15,00,0,15,3,0, 25,02,08,02,15,14,1,12,7,0, 22,02,08,05,15,04,0,03,3,0, 23,07,08,05,15,00,0,06,7,0); 
     256                _OPN("valsound.percus10", "Crash Noise Short",    0,7, 23,02,08,02,15,00,2,15,3,0, 25,02,08,02,15,14,3,12,7,0, 22,02,08,05,15,04,2,03,3,0, 23,07,08,05,15,00,2,06,7,0); 
     257                _OPN("valsound.percus11", "ETHNIC Percus.0",      3,7, 31,19,06,03,13,40,1,10,3,0, 31,12,04,00,05,34,1,04,3,0, 31,16,06,10,14,36,1,02,7,0, 31,14,06,06,15,00,1,00,0,0); 
     258                _OPN("valsound.percus12", "ETHNIC Percus.1",      4,6, 31,16,00,05,15,35,0,00,3,0, 31,05,15,15,15,00,0,00,3,0, 31,21,00,15,11,15,0,04,1,0, 31,20,21,09,02,00,0,00,7,0); 
     259                _OPN("valsound.percus13", "Heavy BD.",            5,0, 31,15,00,08,15,10,0,00,0,0, 31,13,00,08,15,00,0,00,0,0, 31,13,00,08,15,00,0,00,0,0, 31,24,00,09,15,20,0,01,0,0); 
     260                _OPN("valsound.percus14", "Heavy BD2",            5,3, 31,16,10,08,15,10,0,00,0,0, 31,15,10,08,15,00,0,00,0,0, 31,10,10,08,14,00,0,00,0,0, 31,20,10,08,15,10,0,01,0,0); 
     261                _OPN("valsound.percus15", "Heavy SD1",            4,7, 31,00,00,00,00,00,0,15,0,0, 28,00,15,13,00,00,0,04,0,0, 31,18,15,07,04,00,1,00,0,0, 31,05,12,07,00,00,0,00,0,0); 
     262                _OPN("valsound.percus16", "Hi-Hat close 5_",      4,7, 31,00,00,00,00,00,0,15,7,0, 18,17,18,13,05,00,0,00,7,0, 31,00,00,14,00,00,0,08,3,0, 18,16,13,09,15,05,1,15,3,0); 
     263                _OPN("valsound.percus17", "Hi-Hat close 4",       4,7, 31,11,00,00,05,00,1,15,0,0, 31,17,12,09,09,00,1,00,0,0, 31,00,00,15,00,00,1,00,0,0, 25,19,20,15,15,07,0,15,0,0); 
     264                _OPN("valsound.percus18", "Hi-Hat close 5",       4,7, 31,00,00,00,00,00,0,15,7,0, 21,18,18,13,05,00,0,00,7,0, 31,00,00,14,00,00,0,08,3,0, 31,17,13,09,15,05,1,15,3,0); 
     265                _OPN("valsound.percus19", "Hi-Hat Close 6 -808-", 0,7, 27,00,10,00,15,39,0,15,0,0, 31,04,10,14,15,30,0,11,0,0, 31,10,10,14,15,05,1,09,7,0, 31,19,10,15,15,00,1,09,3,0); 
     266                _OPN("valsound.percus20", "Hi-hat #7 Metal o3-6", 4,7, 31,16,10,08,10,00,0,15,3,0, 31,18,07,12,15,00,1,01,3,0, 31,10,10,06,10,02,0,15,7,0, 21,18,07,12,15,00,1,00,7,0); 
     267                _OPN("valsound.percus21", "Hi-Hat Close #8 o4",   4,7, 25,19,00,09,03,00,1,15,0,0, 22,19,16,14,05,00,1,01,0,0, 31,10,15,15,05,00,0,15,0,0, 31,19,19,15,02,00,1,15,0,0); 
     268                _OPN("valsound.percus22", "Hi-hat Open o4e-g+",   4,5, 31,05,06,00,05,00,2,15,7,0, 31,10,04,07,08,19,2,03,1,0, 31,20,06,03,03,00,2,01,7,0, 31,25,06,07,10,06,3,07,0,0); 
     269                _OPN("valsound.percus23", "Open-hat2 Metal o4c-", 4,7, 31,14,00,08,03,00,1,15,3,0, 31,15,08,12,13,00,1,07,3,0, 31,13,00,06,03,01,0,10,7,0, 31,15,11,12,12,00,1,07,7,0); 
     270                _OPN("valsound.percus24", "Open-hat3 Metal",      4,7, 31,14,00,08,03,00,1,15,3,0, 31,15,08,12,13,00,0,07,3,0, 31,13,00,06,01,01,0,10,7,0, 31,15,11,12,07,00,0,07,7,0); 
     271                _OPN("valsound.percus25", "Hi-Hat Open #4 o4f",   4,6, 31,15,00,09,01,00,0,15,0,0, 31,20,05,14,05,03,0,04,0,0, 31,10,09,09,01,00,0,10,0,0, 31,22,05,14,05,00,1,07,0,0); 
     272                _OPN("valsound.percus26", "Metal ride o4c or o5c",4,5, 20,05,00,00,05,11,2,15,3,0, 18,11,09,07,11,00,2,08,3,0, 31,19,00,03,03,00,1,15,7,0, 16,12,09,07,11,00,2,07,7,0); 
     273                _OPN("valsound.percus27", "Rim Shot #1 o3c",      0,7, 31,11,00,15,15,37,1,15,1,0, 31,12,00,15,15,40,1,10,2,0, 31,17,00,15,15,13,2,00,3,0, 31,16,00,15,15,00,2,00,7,0); 
     274                _OPN("valsound.percus28", "Snare Drum Light",     4,7, 31,00,00,07,00,00,0,15,0,0, 31,15,15,09,02,00,0,15,0,0, 31,21,00,15,11,10,0,04,1,0, 31,19,17,09,02,00,0,00,7,0); 
     275                _OPN("valsound.percus29", "Snare Drum Lighter",   4,6, 31,00,00,14,00,00,0,10,3,0, 31,15,15,14,01,00,0,12,7,0, 31,15,00,14,15,00,3,02,3,0, 31,15,00,14,15,00,2,00,7,0); 
     276                _OPN("valsound.percus30", "Snare Drum 808 o2-o3", 4,7, 31,00,00,00,00,05,0,15,7,0, 31,18,17,15,01,00,0,09,3,0, 31,19,00,15,15,00,0,00,7,0, 26,21,16,15,15,00,0,00,3,0); 
     277                _OPN("valsound.percus31", "Snare4 -808type- o2",  4,7, 31,12,00,12,04,00,1,07,3,0, 27,15,18,15,01,00,1,15,3,0, 31,20,15,12,15,11,0,01,7,0, 31,19,15,15,15,00,1,01,7,0); 
     278                _OPN("valsound.percus32", "Snare5 o1-2(Franger)", 4,7, 31,16,00,00,02,06,0,15,7,0, 31,18,15,15,00,00,0,09,3,0, 28,20,00,15,15,00,0,00,7,0, 25,16,15,15,15,00,0,00,3,0); 
     279                _OPN("valsound.percus33", "Tom (old)",            4,7, 31,11,00,01,15,00,0,15,3,0, 31,20,14,15,05,00,0,01,3,0, 31,16,15,05,15,48,0,00,7,0, 31,11,15,15,15,00,0,00,7,0); 
     280                _OPN("valsound.percus34", "Synth tom 2 algo 3",   3,7, 31,04,00,01,00,00,1,15,1,0, 31,21,04,01,10,15,1,01,0,0, 31,26,00,15,15,00,1,00,0,0, 31,11,00,07,15,00,1,00,0,0); 
     281                _OPN("valsound.percus35", "Synth (Noisy) Tom #3", 3,7, 31,20,00,00,02,00,0,15,3,0, 31,18,13,06,08,28,0,00,3,0, 31,16,09,12,05,44,0,01,7,0, 31,14,04,12,01,00,0,00,7,0); 
     282                _OPN("valsound.percus36", "Synth Tom #3",         1,7, 31,18,10,00,01,00,0,15,3,0, 31,15,10,06,05,00,0,05,3,0, 31,17,12,12,06,37,0,01,7,0, 31,14,04,12,01,00,0,00,7,0); 
     283                _OPN("valsound.percus37", "Synth -DX7- Tom #4",   3,7, 31,04,00,01,00,00,1,11,0,0, 31,21,04,01,06,25,1,01,3,0, 31,26,00,15,15,00,1,00,0,0, 31,11,00,07,15,00,1,00,0,0); 
     284                _OPN("valsound.percus38", "Triangle 1 o5c",       4,5, 31,18,00,11,02,09,0,14,3,0, 31,21,07,12,04,00,0,08,3,0, 31,22,00,12,15,00,0,15,7,0, 31,20,06,15,15,00,0,07,7,0); 
     285 
     286 
     287                _categoly("valsound.piano"); 
     288                _OPN("valsound.piano1",  "Aco Piano2 (Attack)",   4,5, 31,05,00,00,00,23,1,01,3,0, 20,10,03,07,08,00,1,01,3,0, 31,03,00,00,00,25,1,01,7,0, 31,12,03,07,10,02,1,01,7,0); 
     289                _OPN("valsound.piano2",  "Backing 1 (Clav.)",     2,7, 31,08,03,06,02,40,2,01,3,0, 31,07,04,06,02,37,1,05,2,0, 31,07,02,06,01,30,1,03,7,0, 28,30,09,07,00,00,2,01,4,0); 
     290                _OPN("valsound.piano3",  "Clav. coad",            2,6, 31,15,08,06,02,35,0,12,3,0, 31,06,02,06,02,32,0,03,0,0, 31,06,02,06,01,32,0,01,7,0, 31,08,06,07,04,00,0,02,0,0); 
     291                _OPN("valsound.piano4",  "Deep Piano 1",          2,5, 31,09,04,00,02,38,0,00,3,0, 22,07,03,09,03,31,1,03,0,0, 31,07,03,02,03,27,1,00,7,0, 28,07,01,07,01,00,1,00,0,0); 
     292                _OPN("valsound.piano5",  "Deep Piano 3",          2,0, 31,20,09,00,02,08,1,00,7,0, 31,11,03,01,01,23,1,04,3,0, 31,13,05,02,02,30,0,00,3,0, 31,00,04,06,00,00,1,01,7,0); 
     293                _OPN("valsound.piano6",  "E.piano #2",            4,6, 22,05,00,03,05,30,0,02,3,0, 16,08,08,07,02,00,1,02,3,0, 20,05,00,03,05,34,0,04,7,0, 17,08,07,07,02,00,1,02,7,0); 
     294                _OPN("valsound.piano7",  "E.piano #3",            4,7, 22,05,00,03,05,41,0,01,3,0, 16,08,08,07,02,00,1,02,3,0, 31,18,00,03,10,44,0,08,7,0, 31,09,07,07,02,03,1,01,7,0); 
     295                _OPN("valsound.piano8",  "E.piano #4(2+)",        4,6, 31,05,00,15,05,46,2,02,3,0, 31,09,08,15,03,00,2,02,3,0, 31,05,00,15,05,44,2,04,7,0, 31,09,07,15,03,00,2,02,7,0); 
     296                _OPN("valsound.piano9",  "E.(Bell)Piano #5",      4,7, 31,07,00,09,05,35,0,06,3,0, 31,11,07,14,04,05,1,02,3,0, 31,10,09,09,05,35,0,12,7,0, 31,11,07,14,04,05,0,02,7,0); 
     297                _OPN("valsound.piano10", "E.Piano #6",            4,7, 29,20,00,00,03,34,0,08,3,0, 17,08,00,07,06,02,0,04,3,0, 30,00,00,00,00,25,0,04,7,0, 18,08,00,07,06,02,0,04,7,0); 
     298                _OPN("valsound.piano11", "E.Piano #7",            4,7, 31,15,00,10,15,40,0,15,0,0, 31,10,00,07,15,15,0,01,0,0, 31,10,00,05,15,20,0,01,0,0, 31,10,00,07,15,00,0,01,0,0); 
     299                _OPN("valsound.piano12", "Harpci chord 1",        2,5, 31,13,00,15,10,30,1,00,3,0, 31,11,02,00,03,32,1,07,3,0, 31,02,00,00,01,30,0,00,7,0, 31,06,06,07,01,00,1,04,7,0); 
     300                _OPN("valsound.piano13", "Harpci 2",              2,7, 31,04,00,05,01,30,2,00,3,0, 31,09,01,02,01,40,2,12,0,0, 31,04,03,06,01,30,1,03,7,0, 31,11,05,08,04,00,2,01,0,0); 
     301                _OPN("valsound.piano14", "Piano1 (ML1,10,05,01)", 2,7, 28,04,00,05,01,37,2,01,3,0, 22,09,01,02,01,47,2,12,0,0, 29,04,03,06,01,37,1,03,7,0, 18,08,00,06,06,00,2,01,0,0); 
     302                _OPN("valsound.piano15", "Piano3",                2,7, 31,04,02,00,01,35,2,01,3,0, 24,00,01,05,00,38,3,01,0,0, 28,00,00,05,00,42,2,04,5,0, 28,07,04,06,04,00,2,01,0,0); 
     303                _OPN("valsound.piano16", "Piano4",                2,7, 31,04,00,05,01,37,2,01,3,0, 31,09,01,02,01,47,2,10,0,0, 31,04,03,06,01,37,1,02,7,0, 31,08,00,06,06,00,1,01,0,0); 
     304                _OPN("valsound.piano17", "Digital Piano #5",      3,7, 28,04,00,07,01,27,1,01,4,0, 28,14,07,04,03,42,2,14,3,0, 26,04,03,08,02,38,0,03,7,0, 25,07,08,07,00,00,2,01,6,0); 
     305                _OPN("valsound.piano18", "Piano 6 High-tone",     2,7, 28,04,00,05,01,39,2,01,3,0, 31,13,01,02,02,50,2,14,0,0, 29,04,03,06,01,41,1,03,7,0, 21,08,06,06,06,00,2,01,0,0); 
     306                _OPN("valsound.piano19", "Panning Harpci",        2,7, 31,02,10,06,14,40,3,12,3,0, 25,02,15,06,14,32,0,09,0,0, 30,02,04,06,14,34,3,05,7,0, 20,02,08,06,14,00,3,01,0,0); 
     307                _OPN("valsound.piano20", "Yam Harpci chord",      1,4, 31,06,05,06,07,40,0,10,0,0, 31,06,04,05,05,35,0,02,0,0, 31,06,05,05,05,24,0,01,0,0, 31,07,06,07,05,00,0,01,0,0); 
     308 
     309                _categoly("valsound.se"); 
     310                _OPN("valsound.se1", "S.E.(Detune is needed o2c)",0,4, 31,07,03,00,01,12,0,00,1,0, 31,10,00,08,03,25,0,00,2,0, 31,06,04,08,08,00,0,04,3,0, 31,12,00,08,00,00,0,12,7,0); 
     311                _OPN("valsound.se2", "S.E. 2 o0-1-2",             1,2, 31,06,07,15,03,08,0,00,3,0, 31,06,09,15,06,08,0,00,7,0, 06,06,06,15,01,10,0,12,3,0, 31,05,04,15,02,00,0,00,0,0); 
     312                _OPN("valsound.se3", "S.E. 3(Feedin /noise add.)",4,6, 04,03,00,15,04,00,0,00,7,0, 08,07,07,15,01,00,0,07,7,0, 05,00,00,15,00,00,0,00,3,0, 08,06,03,15,01,00,0,04,3,0); 
     313 
     314                _categoly("valsound.special"); 
     315                _OPN("valsound.special1", "Digital 1",            3,6, 31,12,03,05,05,26,0,14,7,0, 31,16,06,00,03,28,0,08,3,0, 31,00,12,00,00,30,0,00,0,0, 31,15,12,12,02,00,0,01,7,0); 
     316                _OPN("valsound.special2", "Digital 2",            0,7, 31,15,00,12,03,27,0,10,7,0, 31,16,00,00,04,30,0,15,3,0, 31,15,00,00,02,30,0,02,0,0, 31,15,00,12,02,00,0,01,7,0); 
     317                _OPN("valsound.special3", "Digital[BAS] 3 o2-o3", 0,7, 31,00,00,09,00,27,0,12,1,0, 31,10,00,09,01,25,0,00,2,0, 31,10,00,09,01,25,0,12,3,0, 31,12,00,14,02,03,0,01,7,0); 
     318                _OPN("valsound.special4", "Digital[GTR] 3 o2-o3", 0,7, 31,00,00,09,00,27,0,12,1,0, 31,10,00,09,01,25,0,00,2,0, 31,10,00,09,01,25,0,03,3,0, 31,12,00,14,02,03,0,01,7,0); 
     319                _OPN("valsound.special5", "Digital 4 o4a",        5,0, 31,31,00,00,00,61,0,09,0,0, 31,31,00,13,00,03,0,03,0,0, 31,31,00,13,00,15,0,09,0,0, 31,31,00,13,00,06,0,06,0,0); 
     320 
     321 
     322                _categoly("valsound.strpad"); 
     323                _OPN("valsound.strpad1",  "Accordion1",           4,6, 17,00,00,00,00,20,0,04,3,0, 16,09,00,12,02,00,0,08,3,0, 15,00,00,07,00,36,0,04,7,0, 15,09,00,12,02,00,0,08,7,0); 
     324                _OPN("valsound.strpad2",  "Accordion2",           4,6, 21,00,01,11,00,22,1,04,3,0, 14,08,00,13,01,00,0,04,3,0, 21,00,01,10,00,30,1,04,7,0, 14,08,01,13,01,00,0,04,7,0); 
     325                _OPN("valsound.strpad3",  "Accordion3",           4,7, 31,05,00,00,00,25,0,04,7,0, 14,08,00,13,01,00,0,04,7,0, 31,08,00,00,10,25,0,02,3,0, 14,06,00,13,01,00,0,04,3,0); 
     326                _OPN("valsound.strpad4",  "Chorus #2(Voice)",     4,6, 21,00,01,11,00,40,1,04,3,0, 14,08,00,13,01,00,0,04,3,0, 21,00,01,10,00,37,1,04,7,0, 14,08,01,13,01,00,0,04,7,0); 
     327                _OPN("valsound.strpad5",  "Chorus #3",            4,4, 21,00,00,02,00,42,0,04,3,0, 18,04,00,09,01,00,0,08,3,0, 21,00,00,02,00,45,0,04,7,0, 18,04,00,09,01,00,0,04,7,0); 
     328                _OPN("valsound.strpad6",  "Chorus #4",            6,3, 21,00,00,02,00,39,0,04,0,0, 18,04,00,09,01,00,0,04,1,0, 18,10,00,09,01,00,0,04,3,0, 18,08,00,09,02,00,0,02,7,0); 
     329                _OPN("valsound.strpad7",  "F.Strings 1",          2,7, 25,10,00,05,01,29,1,01,1,0, 25,11,00,08,05,15,1,05,1,0, 28,13,00,06,02,45,1,01,0,0, 14,04,00,06,00,00,1,01,0,0); 
     330                _OPN("valsound.strpad8",  "F.Strings 2",          2,0, 21,07,00,07,03,37,1,01,3,0, 20,11,00,12,03,15,1,05,7,0, 16,08,00,12,03,45,1,01,0,0, 14,05,00,12,01,00,1,01,0,0); 
     331                _OPN("valsound.strpad9",  "F.Strings 3",          2,7, 25,10,00,05,01,35,1,01,3,0, 25,11,00,08,05,13,1,05,0,0, 28,13,00,06,02,45,1,01,7,0, 14,04,00,06,01,00,1,01,0,0); 
     332                _OPN("valsound.strpad10", "F.Strings 4 (low)",    2,7, 25,10,00,05,01,29,1,00,3,0, 25,11,00,08,05,20,1,04,0,0, 28,13,00,06,02,38,1,01,7,0, 14,04,00,06,01,00,1,01,0,0); 
     333                _OPN("valsound.strpad11", "Pizzicate#1(KOTO2)",   0,6, 31,07,08,01,02,30,3,03,7,0, 31,05,09,01,01,30,3,02,0,0, 31,05,08,03,02,35,3,01,0,0, 31,11,07,05,05,00,2,01,3,0); 
     334                _OPN("valsound.strpad12", "sound truck modoki",   4,7, 31,00,00,00,00,30,1,02,3,0, 18,13,04,07,01,00,1,02,3,0, 31,00,00,00,00,22,1,03,7,0, 21,13,04,07,01,00,1,03,7,0); 
     335                _OPN("valsound.strpad13", "Strings",              2,7, 15,09,00,05,01,27,2,02,3,0, 15,00,00,05,15,31,2,02,0,0, 15,00,00,05,00,27,1,02,0,0, 13,03,00,08,00,00,1,02,7,0); 
     336                _OPN("valsound.strpad14", "Synth Accordion",      4,7, 18,00,00,11,00,21,1,02,3,0, 15,09,00,13,02,00,1,08,3,0, 18,00,00,11,00,20,1,02,7,0, 14,09,00,13,02,00,1,04,7,0); 
     337                _OPN("valsound.strpad15", "Phaser synthe.",       0,7, 27,31,05,05,05,08,0,01,4,0, 26,31,04,05,04,18,0,01,5,0, 19,31,00,05,02,18,0,01,6,0, 16,15,00,06,02,00,0,03,4,0); 
     338                _OPN("valsound.strpad16", "FB Synth.",            3,7, 31,06,00,00,04,22,0,02,0,0, 18,00,00,08,00,28,0,04,6,0, 20,05,00,08,02,28,0,02,1,0, 20,04,00,08,01,00,0,02,2,0); 
     339                _OPN("valsound.strpad17", "Synth Strings MB",     3,7, 21,00,00,00,00,30,0,01,1,0, 14,07,07,06,03,25,0,02,6,0, 15,00,00,05,00,38,0,05,6,0, 18,00,00,06,00,00,0,02,0,0); 
     340                _OPN("valsound.strpad18", "Synth Strings #2",     2,7, 20,01,00,08,01,32,0,02,7,0, 15,04,00,08,01,28,0,02,0,0, 22,01,00,08,01,34,0,02,3,0, 14,02,00,09,01,00,0,02,0,0); 
     341                _OPN("valsound.strpad19", "Synth.Sweep Pad #1",   5,6, 31,07,00,09,05,18,0,04,0,0, 31,15,00,14,01,05,0,08,0,0, 31,16,00,15,02,05,0,04,0,0, 31,26,00,14,02,05,0,08,1,0); 
     342                _OPN("valsound.strpad20", "Twin synth. #1 Calm",  4,2, 16,03,00,00,02,25,0,04,3,0, 19,12,00,06,01,00,0,04,3,0, 16,03,00,00,02,20,0,03,7,0, 19,12,00,06,01,00,0,03,7,0); 
     343                _OPN("valsound.strpad21", "Twin synth. #2 FB",    4,6, 16,03,00,00,02,20,0,04,7,0, 19,12,00,06,01,00,0,08,3,0, 16,03,00,00,02,06,0,03,3,0, 19,12,00,06,01,08,0,06,7,0); 
     344                _OPN("valsound.strpad22", "Twin synth. #3 FB",    4,6, 16,06,05,00,02,20,0,04,3,0, 19,12,00,06,01,00,0,08,3,0, 16,06,05,00,02,06,0,03,7,0, 19,12,00,06,01,08,0,06,7,0); 
     345                _OPN("valsound.strpad23", "Vocoder voice1",       4,7, 31,08,05,12,15,20,0,04,7,0, 31,00,00,15,00,00,0,08,7,0, 31,08,05,12,15,24,0,03,3,0, 31,00,00,15,00,00,0,06,3,0); 
     346                _OPN("valsound.strpad24", "Voice o3-o5",          6,0, 10,00,01,03,00,70,0,01,0,0, 12,00,00,05,00,07,2,03,3,0, 12,00,01,06,02,00,1,02,7,0, 18,00,00,06,00,17,1,00,3,0); 
     347                _OPN("valsound.strpad25", "Voice' o3-o5",         6,0, 10,00,01,03,00,70,0,00,0,0, 12,00,00,05,00,06,2,03,3,0, 12,00,01,06,02,00,1,02,7,0, 18,00,00,06,00,10,1,01,3,0); 
     348 
     349 
     350                _categoly("valsound.wind"); 
     351                _OPN("valsound.wind1", "Clarinet #1",             3,7, 31,00,00,07,00,35,0,04,0,0, 25,14,00,04,02,42,0,04,0,0, 31,00,00,08,00,38,0,02,0,0, 18,07,00,08,01,00,0,01,0,0); 
     352                _OPN("valsound.wind2", "Clarinet #2 Brighter",    3,7, 31,00,00,07,00,40,0,08,0,0, 27,17,00,04,04,45,0,08,0,0, 31,00,00,08,00,37,0,04,0,0, 18,07,00,08,01,00,0,01,0,0); 
     353                _OPN("valsound.wind3", "E.Flute",                 3,0, 20,00,00,10,00,38,0,06,0,0, 14,16,00,10,05,36,0,02,3,0, 18,18,00,10,03,40,0,04,0,0, 14,12,00,10,01,00,1,02,0,0); 
     354                _OPN("valsound.wind4", "E.Flute 2",               3,5, 20,00,00,10,00,28,0,02,3,0, 14,16,00,10,05,40,0,02,3,0, 18,18,00,10,03,34,0,04,0,0, 14,12,00,10,01,00,1,02,7,0); 
     355                _OPN("valsound.wind5", "Flute + Bell",            4,5, 16,00,00,08,01,47,0,08,3,0, 14,00,00,08,00,00,0,04,3,0, 31,12,00,08,02,45,0,14,7,0, 31,08,00,08,15,00,0,08,7,0); 
     356                _OPN("valsound.wind6", "Old flute",               2,7, 20,05,00,14,01,50,0,04,0,0, 15,15,00,14,02,45,0,08,0,0, 18,15,00,14,02,50,0,08,0,0, 14,02,00,14,00,00,0,04,0,0); 
     357                _OPN("valsound.wind7", "Whitsle 1",               2,7, 20,05,00,14,01,60,0,04,0,0, 15,15,00,14,02,55,0,12,0,0, 18,15,00,14,02,60,0,08,0,0, 14,02,00,14,00,00,0,04,0,0); 
     358                _OPN("valsound.wind8", "Whitsle 2",               2,7, 20,05,00,14,01,55,0,02,0,0, 15,15,00,14,02,55,0,08,0,0, 18,15,00,14,02,60,0,08,0,0, 14,02,00,14,00,00,0,04,0,0); 
     359 
     360 
     361                _categoly("valsound.world"); 
     362                _OPN("valsound.world1", "Banjo (Harpci)",         1,7, 31,07,00,10,15,38,0,12,7,0, 31,08,06,07,03,52,2,10,1,0, 31,12,06,07,03,25,0,01,0,0, 31,11,07,07,03,00,2,03,5,0); 
     363                _OPN("valsound.world2", "KOTO",                   3,0, 31,00,00,10,00,38,0,06,0,0, 24,13,00,10,05,40,0,02,3,0, 28,15,00,10,03,40,0,04,0,0, 24,12,08,10,02,00,1,02,0,0); 
     364                _OPN("valsound.world3", "Koto 2",                 0,7, 31,07,03,03,02,30,3,03,7,0, 31,05,03,03,01,30,3,02,0,0, 31,05,03,05,02,30,3,01,0,0, 31,10,03,07,02,00,3,01,3,0); 
     365                _OPN("valsound.world4", "Sitar 1",                0,6, 18,05,03,01,02,30,1,03,7,0, 31,05,04,01,01,28,1,02,0,0, 31,05,03,03,02,35,1,01,0,0, 31,10,02,05,04,00,0,01,3,0); 
     366                _OPN("valsound.world5", "Shamisen 2",             3,7, 31,16,06,07,02,33,0,01,3,0, 31,16,06,07,04,18,2,06,0,0, 31,06,06,07,01,40,0,01,7,0, 31,15,06,07,05,00,0,02,0,0); 
     367                _OPN("valsound.world6", "Shamisen 1",             2,7, 31,16,06,07,02,33,0,01,3,0, 31,16,06,07,04,18,2,08,0,0, 31,06,06,07,01,40,0,01,7,0, 31,15,06,07,05,00,0,02,0,0); 
     368                _OPN("valsound.world7", "Synth Shamisen",         2,7, 31,16,06,07,01,33,0,01,3,0, 31,16,06,07,04,18,2,07,0,0, 31,06,06,07,00,40,0,01,7,0, 31,15,06,07,02,00,0,02,0,0); 
     369            } 
     370 
     371 
     372            if (includeFlag & INCLUDE_MIDI) { 
     373                _categoly("midi"); 
     374                _MA3("midi.piano1",  "GrandPno",  3,0, 08,15,07,00,06,15,39,0,1,01,0,0, 00,14,03,02,03,02,28,1,3,05,0,0, 00,13,01,01,04,03,22,0,0,01,0,0, 00,13,03,02,06,04,00,1,2,01,0,0); 
     375                _MA3("midi.piano2",  "BritePno",  3,0, 00,15,02,02,02,05,39,1,2,01,0,0, 00,15,02,02,03,15,28,0,2,05,0,0, 00,15,02,02,02,13,25,1,2,01,0,0, 00,15,02,01,05,04,10,1,0,01,0,0); 
     376                _MA3("midi.piano3",  "E.GrandP",  5,6, 00,13,02,02,04,06,20,1,1,04,0,0, 00,13,01,01,06,07,08,1,2,01,0,0, 00,13,03,03,04,14,11,1,1,02,0,0, 00,13,01,01,05,15,08,1,2,02,0,0); 
     377                _MA3("midi.piano4",  "HnkyTonk",  5,6, 00,15,01,02,05,14,26,1,0,01,3,2, 00,13,03,02,10,03,02,1,2,02,7,2, 00,12,01,02,05,03,23,0,0,01,7,0, 00,13,03,03,10,03,02,1,2,02,3,2); 
     378                _MA3("midi.piano5",  "E.Piano1",  3,1, 00,11,03,02,10,03,27,1,1,03,0,1, 00,11,02,02,09,04,27,0,3,03,0,0, 00,10,04,01,04,01,19,1,1,02,0,0, 00,10,01,01,07,08,05,1,0,01,0,1); 
     379                _MA3("midi.piano6",  "E.Piano2",  5,5, 18,15,04,05,12,11,35,1,0,07,0,2, 00,15,02,01,08,15,04,0,2,01,0,2, 00,15,00,01,11,01,18,1,1,01,0,2, 00,15,02,01,07,15,04,1,0,01,0,2); 
     380                _MA3("midi.piano7",  "Harpsi.",   6,4, 04,14,02,02,05,00,00,1,1,01,0,0, 03,15,02,00,05,03,20,1,3,06,0,0, 04,15,03,00,01,06,28,1,2,07,0,0, 05,14,02,02,07,15,04,1,0,01,0,0); 
     381                _MA3("midi.piano8",  "Clavi.",    3,5, 05,15,01,01,06,15,24,0,0,01,0,2, 00,15,01,01,05,00,29,0,0,01,0,2, 04,15,03,03,07,02,27,1,1,07,0,2, 00,15,02,02,09,02,08,1,0,03,0,2); 
     382                 
     383                _MA3("midi.chrom1",  "Celesta",   5,2, 02,14,06,06,05,15,21,1,2,09,0,0, 00,13,04,04,04,14,06,0,0,01,0,0, 05,14,06,06,06,12,22,1,3,11,0,0, 00,14,04,04,04,14,06,0,0,01,0,0); 
     384                _MA3("midi.chrom2",  "Glocken",   7,0, 00,15,09,03,04,04,09,1,0,07,0,2, 00,15,11,02,03,11,15,1,0,04,0,2, 00,15,03,02,04,04,18,1,1,02,0,2, 00,15,04,03,04,14,04,0,0,01,0,2); 
     385                _MA3("midi.chrom3",  "MusicBox",  5,0, 01,05,05,02,02,00,32,1,2,02,0,0, 00,15,04,03,02,00,01,1,1,01,3,0, 01,10,05,02,02,00,28,1,0,09,0,0, 00,15,02,01,01,00,06,1,0,01,7,0); 
     386                _MA3("midi.chrom4",  "Vibes",     5,0, 00,12,04,02,04,02,23,0,0,07,0,2, 00,13,09,02,05,06,07,1,2,04,0,2, 00,12,04,02,03,02,30,1,0,08,0,2, 00,13,02,03,04,15,07,0,0,01,0,1); 
     387                _MA3("midi.chrom5",  "Marimba",   5,7, 00,10,07,04,04,15,40,1,1,12,0,0, 00,11,04,04,05,15,05,0,0,01,0,0, 00,11,07,06,04,15,33,1,0,06,0,0, 00,13,04,05,05,15,05,1,0,01,0,0); 
     388                _MA3("midi.chrom6",  "Xylophon",  5,2, 00,15,09,06,06,13,24,0,2,05,0,0, 00,15,07,05,07,13,03,0,0,01,0,0, 00,15,06,06,06,10,29,1,2,05,0,0, 00,15,06,06,07,14,00,0,2,01,0,0); 
     389                _MA3("midi.chrom7",  "TubulBel",  5,0, 16,15,04,03,03,05,16,0,1,10,0,1, 00,15,03,02,03,02,05,0,0,01,0,0, 08,15,04,03,03,05,16,0,1,07,3,1, 00,15,03,02,03,02,05,0,2,02,7,0); 
     390                _MA3("midi.chrom8",  "Dulcimer",  6,3, 01,14,10,04,04,12,06,0,2,02,0,0, 01,11,03,03,03,05,20,0,1,03,0,0, 00,13,03,03,03,00,10,0,0,01,0,0, 00,12,04,04,04,06,06,0,0,01,0,0); 
     391 
     392                _MA3("midi.organ1",  "DrawOrgn",  2,0, 00,15,04,00,12,00,00,0,2,00,0,1, 04,15,05,00,12,00,00,0,1,01,0,0, 09,13,05,00,12,01,07,0,2,03,1,1, 04,15,01,00,12,00,07,0,2,02,0,1); 
     393                _MA3("midi.organ2",  "PercOrgn",  7,4, 00,14,05,00,10,01,03,0,2,00,2,2, 00,13,08,00,00,05,29,0,0,02,0,0, 00,14,05,00,10,01,01,0,2,01,3,0, 00,14,06,00,10,00,01,0,2,02,7,0); 
     394                _MA3("midi.organ3",  "RockOrgn",  7,4, 00,15,15,00,13,00,09,0,1,01,3,3, 21,11,15,00,10,01,05,0,1,01,0,2, 00,15,15,00,14,00,09,0,0,02,6,0, 17,15,15,00,14,00,09,0,0,00,7,1); 
     395                _MA3("midi.organ4",  "ChrchOrg",  7,0, 00,09,15,00,05,00,19,0,2,03,0,0, 00,11,07,00,02,02,29,0,0,07,0,0, 00,08,15,00,05,00,04,0,2,01,0,0, 05,08,07,00,05,00,04,0,2,00,0,0); 
     396                _MA3("midi.organ5",  "ReedOrgn",  5,3, 16,07,08,00,05,01,24,1,2,02,0,0, 00,05,15,00,06,00,00,1,2,01,0,0, 05,06,12,00,05,03,10,1,1,01,0,0, 00,05,15,00,07,00,00,1,1,02,0,0); 
     397                _MA3("midi.organ6",  "Acordion",  5,2, 17,08,02,00,00,01,21,0,0,03,6,0, 00,07,02,00,10,02,02,0,1,01,7,0, 17,06,15,00,00,01,18,0,0,01,2,0, 00,07,15,00,10,00,07,0,2,02,3,0); 
     398                _MA3("midi.organ7",  "Harmnica",  4,0, 00,15,15,00,09,00,44,0,3,14,0,0, 00,15,15,00,08,00,41,0,0,10,0,0, 00,15,15,00,08,00,36,0,0,01,0,0, 00,06,15,00,08,00,03,0,2,02,0,0); 
     399                _MA3("midi.organ8",  "TangoAcd",  5,4, 12,07,12,00,00,00,15,0,0,02,1,1, 00,07,02,00,10,00,10,0,2,02,1,0, 05,07,15,00,00,00,20,0,0,01,0,0, 16,07,15,00,10,00,10,0,0,01,0,1); 
     400 
     401                _MA3("midi.guitar1", "NylonGtr",  5,6, 00,14,01,01,04,08,21,1,1,01,0,0, 00,15,03,03,07,15,00,0,0,01,0,0, 01,11,05,05,05,04,14,1,0,03,0,0, 00,13,04,04,09,15,13,0,2,01,0,0); 
     402                _MA3("midi.guitar2", "SteelGtr",  4,4, 05,15,07,01,04,02,26,0,2,09,0,2, 00,15,03,01,08,05,45,1,2,13,0,2, 00,15,02,01,04,01,23,1,2,01,0,2, 00,13,03,02,08,15,04,0,0,01,0,1); 
     403                _MA3("midi.guitar3", "Jazz Gtr",  3,0, 00,15,07,01,07,03,17,1,1,01,0,2, 00,15,05,01,04,02,18,0,3,05,0,2, 00,15,02,00,07,15,31,0,1,03,0,2, 00,12,02,00,08,15,04,0,0,01,0,2); 
     404                _MA3("midi.guitar4", "CleanGtr",  5,0, 01,15,10,02,02,01,15,0,1,01,0,0, 00,15,02,02,09,15,03,0,2,01,0,0, 04,15,02,02,03,06,16,1,1,03,0,0, 00,14,04,04,08,06,03,0,2,01,0,0); 
     405                _MA3("midi.guitar5", "Mute.Gtr",  5,7, 00,13,08,06,07,07,17,1,0,00,0,0, 00,14,09,03,09,07,00,0,0,00,0,0, 00,14,03,03,08,09,04,0,3,01,0,0, 00,11,04,03,10,03,00,1,0,01,0,0); 
     406                _MA3("midi.guitar6", "Ovrdrive",  4,2, 12,15,08,00,02,15,19,1,0,00,7,2, 00,12,01,00,01,01,15,0,1,02,3,2, 00,11,02,00,10,01,15,0,0,01,0,2, 00,11,01,01,10,01,10,0,0,02,0,2); 
     407                _MA3("midi.guitar7", "Dist.Gtr",  4,4, 03,11,12,00,02,00,08,0,1,02,0,0, 00,12,05,00,10,01,29,0,0,01,0,0, 08,12,05,00,10,01,23,0,0,02,0,0, 06,12,01,00,10,05,15,0,0,01,0,0); 
     408                _MA3("midi.guitar8", "GtrHarmo",  5,5, 08,15,02,08,07,00,22,0,1,00,0,0, 08,13,03,03,09,15,06,0,0,02,0,0, 00,11,02,08,07,00,17,0,0,00,0,0, 06,10,07,07,07,15,13,0,0,02,0,0); 
     409 
     410                _MA3("midi.bass1",   "Aco.Bass",  5,3, 00,11,03,03,08,10,14,1,1,01,0,0, 00,12,03,03,08,11,00,0,0,01,0,0, 00,09,03,03,01,01,07,0,3,01,0,0, 00,12,03,03,08,10,05,0,0,01,0,0); 
     411                _MA3("midi.bass2",   "FngrBass",  3,6, 00,10,02,01,03,01,28,1,2,01,0,2, 00,09,04,03,06,04,58,1,0,12,0,2, 00,11,03,02,03,02,22,1,2,01,0,2, 00,11,01,01,08,02,00,1,0,02,0,2); 
     412                _MA3("midi.bass3",   "PickBass",  3,5, 00,15,07,02,03,01,19,1,2,01,0,2, 00,12,11,04,06,07,21,1,0,07,0,2, 00,15,09,02,06,02,23,1,2,02,0,2, 00,11,02,06,08,06,00,1,0,01,0,2); 
     413                _MA3("midi.bass4",   "Fretless",  3,4, 00,12,03,02,03,01,29,1,2,01,2,2, 00,10,03,03,06,03,25,1,2,01,1,2, 00,09,03,02,06,01,25,1,2,01,0,2, 00,11,01,02,08,02,00,1,0,02,0,2); 
     414                _MA3("midi.bass5",   "SlapBas1",  3,3, 00,15,07,02,03,02,14,1,2,01,0,2, 00,15,06,06,06,04,21,1,0,09,0,2, 00,12,09,02,06,02,24,1,2,01,0,2, 00,15,02,15,08,15,03,1,0,01,0,2); 
     415                _MA3("midi.bass6",   "SlapBas2",  3,2, 00,15,07,02,03,01,14,1,2,01,0,2, 00,11,05,06,07,02,18,0,0,13,0,2, 00,09,09,02,06,02,30,1,2,01,0,2, 00,15,02,06,08,06,06,1,0,01,0,2); 
     416                _MA3("midi.bass7",   "SynBass1",  3,5, 00,14,06,02,08,05,14,0,0,01,0,0, 08,14,04,01,08,06,39,0,1,02,0,0, 00,14,02,01,08,06,35,0,0,01,0,0, 00,14,02,02,08,09,00,0,0,01,0,0); 
     417                _MA3("midi.bass8",   "SynBass2",  5,6, 00,15,05,07,08,06,20,0,0,02,0,2, 00,15,01,07,08,12,00,0,1,02,0,2, 00,15,03,07,07,06,20,0,0,01,0,2, 00,15,02,07,08,12,00,0,1,01,0,2); 
     418                 
     419                _MA3("midi.strings1", "Violin",    5,2, 12,06,00,00,03,00,18,1,2,01,0,0, 00,06,04,00,07,02,03,0,0,01,5,0, 06,14,05,07,10,00,06,1,1,04,0,0, 00,06,07,07,07,15,03,0,2,01,1,0); 
     420                _MA3("midi.strings2", "Viola",     5,2, 01,06,00,00,03,00,09,1,2,01,0,0, 00,06,06,00,07,01,03,0,0,01,0,0, 06,14,06,07,07,00,08,1,1,01,0,0, 00,06,07,07,07,15,03,0,2,01,0,0); 
     421                _MA3("midi.strings3", "Cello",     3,4, 01,15,06,00,06,00,16,0,0,01,0,0, 00,15,05,15,14,15,20,0,0,05,0,2, 00,15,05,00,07,02,45,0,0,01,0,0, 00,06,03,00,07,01,01,0,2,03,0,0); 
     422                _MA3("midi.strings4", "ContraBs",  3,6, 00,15,06,00,02,00,25,0,0,01,0,0, 17,15,06,15,14,15,21,0,0,05,0,2, 00,15,06,00,04,03,27,0,0,03,0,0, 00,06,03,00,07,01,00,0,2,02,0,0); 
     423                _MA3("midi.strings5", "Trem.Str",  5,3, 20,07,02,00,03,01,22,1,2,01,2,0, 00,06,03,00,06,01,02,0,0,02,0,1, 12,07,03,00,04,00,22,1,1,01,4,0, 00,06,03,00,06,01,02,0,0,01,0,2); 
     424                _MA3("midi.strings6", "Pizz.Str",  5,7, 00,15,11,05,11,09,20,0,0,01,0,0, 00,14,07,08,07,02,00,0,0,01,0,0, 08,15,07,06,05,15,17,0,1,01,0,0, 00,12,06,05,06,15,00,0,0,01,0,0); 
     425                _MA3("midi.strings7", "Harp",      3,6, 00,15,08,05,08,04,41,0,0,02,0,0, 00,11,08,07,09,04,33,0,0,05,0,0, 00,11,07,03,02,04,33,0,2,01,0,0, 00,15,04,02,02,01,04,1,0,01,0,2); 
     426                _MA3("midi.strings8", "Timpani",   3,3, 00,15,08,04,03,03,04,1,1,01,0,2, 00,15,02,02,02,15,33,1,0,00,7,2, 00,15,07,03,03,00,28,1,2,01,0,2, 08,15,04,03,03,15,00,1,0,00,0,2); 
     427 
     428                _MA3("midi.ensemble1", "Strings1",  7,2, 07,05,10,00,06,00,11,0,2,01,1,1, 04,12,06,00,06,01,24,0,0,02,0,0, 00,06,06,00,06,01,07,0,2,01,5,0, 12,06,05,00,06,01,05,0,0,02,3,1); 
     429                _MA3("midi.ensemble2", "Strings2",  7,3, 09,06,10,00,05,00,00,0,0,01,3,0, 02,12,06,00,05,01,23,0,0,01,0,1, 01,05,06,00,06,00,00,0,2,01,5,0, 27,05,05,00,06,01,07,0,0,01,7,0); 
     430                _MA3("midi.ensemble3", "Syn.Str1",  5,0, 00,09,08,00,02,01,27,0,0,01,6,0, 00,07,15,00,05,00,07,0,0,01,3,0, 04,09,11,00,02,00,20,1,0,01,3,0, 00,06,15,00,04,00,00,0,1,01,7,0); 
     431                _MA3("midi.ensemble4", "Syn.Str2",  5,5, 09,09,08,00,02,01,19,0,0,01,0,0, 00,06,06,00,05,00,06,0,0,01,0,0, 27,08,08,00,02,00,10,0,0,01,0,0, 00,05,07,00,04,03,00,0,1,01,0,0); 
     432                _MA3("midi.ensemble5", "ChoirAah",  5,5, 07,12,00,00,00,15,19,0,0,06,0,0, 00,06,03,00,05,06,23,0,2,04,0,0, 08,07,15,00,03,00,30,0,1,01,0,0, 00,05,15,00,05,00,00,0,0,02,0,0); 
     433                _MA3("midi.ensemble6", "VoiceOoh",  5,7, 07,12,00,00,00,15,20,1,0,05,0,1, 00,07,03,00,05,06,20,0,2,04,0,0, 10,07,07,00,04,03,26,0,2,01,0,0, 00,09,01,00,05,00,00,0,0,01,0,0); 
     434                _MA3("midi.ensemble7", "SynVoice",  5,0, 00,10,00,00,04,15,22,0,0,01,0,0, 00,07,15,00,05,01,08,0,2,01,0,0, 09,09,15,00,04,00,26,0,1,01,0,0, 00,07,15,00,05,00,00,0,2,03,0,0); 
     435                _MA3("midi.ensemble8", "Orch.Hit",  7,5, 08,15,04,04,06,06,00,1,0,04,0,1, 06,12,05,03,03,01,00,0,0,01,0,0, 06,12,07,06,06,00,00,0,0,01,0,0, 06,11,07,07,06,00,00,0,0,00,0,0); 
     436 
     437                _MA3("midi.brass1",    "Trumpet",   3,6, 01,08,08,00,05,01,20,0,0,01,0,0, 00,10,08,00,05,04,23,0,2,03,0,0, 00,07,07,00,06,01,26,0,2,01,0,0, 00,09,15,00,08,00,06,0,0,01,0,0); 
     438                _MA3("midi.brass2",    "Trombone",  3,7, 08,07,06,00,07,01,28,0,0,01,0,0, 00,09,08,00,05,04,15,0,2,01,0,0, 01,06,07,00,07,01,26,0,2,01,0,0, 00,08,15,00,08,00,05,0,0,01,0,0); 
     439                _MA3("midi.brass3",    "Tuba",      3,7, 08,06,05,00,06,02,34,0,0,01,0,0, 01,12,08,00,11,04,24,0,2,01,0,0, 01,09,07,00,09,03,17,0,2,01,0,0, 00,07,15,00,08,00,00,0,0,02,0,0); 
     440                _MA3("midi.brass4",    "Mute.Trp",  5,0, 10,07,00,00,07,05,26,0,0,03,0,0, 02,09,13,00,09,04,00,0,0,00,0,0, 17,07,09,00,06,01,19,0,0,05,0,0, 02,08,07,00,09,02,00,0,0,01,0,0); 
     441                _MA3("midi.brass5",    "Fr.Horn",   5,0, 08,07,09,00,00,00,16,0,3,01,2,0, 00,09,14,00,07,00,01,0,2,01,7,0, 00,06,09,00,02,01,22,0,2,01,6,1, 08,10,14,00,07,00,01,0,2,01,3,0); 
     442                _MA3("midi.brass6",    "BrasSect",  5,6, 00,08,06,00,02,01,22,0,0,01,7,2, 00,09,15,00,08,00,08,0,0,01,7,2, 12,07,07,00,05,01,22,0,0,01,0,2, 00,09,08,00,08,00,07,0,0,01,0,2); 
     443                _MA3("midi.brass7",    "SynBras1",  5,6, 00,07,06,00,08,02,16,0,0,01,7,2, 00,09,15,00,10,00,10,0,0,01,7,2, 00,07,06,00,08,02,16,0,0,01,0,2, 00,09,08,00,10,00,10,0,0,01,0,2); 
     444                _MA3("midi.brass8",    "SynBras2",  3,6, 00,06,03,00,04,01,28,0,0,01,0,0, 01,09,07,00,05,07,39,0,0,06,0,0, 08,07,05,03,03,11,35,0,0,01,0,0, 00,15,15,00,07,00,04,0,0,01,0,0); 
     445 
     446                _MA3("midi.reed1",     "SprnoSax",  3,0, 00,15,09,06,06,03,29,1,0,03,0,0, 00,08,02,00,06,00,26,0,0,01,0,0, 01,08,05,00,00,00,12,0,1,01,0,0, 00,08,06,00,08,01,03,0,0,01,0,0); 
     447                _MA3("midi.reed2",     "Alto Sax",  5,4, 01,09,03,00,00,00,10,1,2,01,0,2, 00,08,02,00,09,00,09,0,0,01,0,2, 09,09,03,00,00,00,13,1,2,01,0,2, 01,09,02,00,09,00,21,0,0,01,0,2); 
     448                _MA3("midi.reed3",     "TenorSax",  5,3, 01,07,03,00,00,00,05,1,2,01,0,2, 08,07,02,00,09,00,15,0,0,01,0,2, 09,07,03,00,00,00,08,1,2,01,0,2, 00,07,02,00,09,00,13,0,2,01,0,2); 
     449                _MA3("midi.reed4",     "Bari.Sax",  5,6, 00,07,03,00,05,00,18,1,2,01,0,0, 00,07,02,00,08,02,06,1,0,02,0,0, 02,07,05,00,01,00,14,1,1,02,0,0, 00,07,04,00,08,01,05,1,0,01,0,0); 
     450                _MA3("midi.reed5",     "Oboe",      5,0, 05,10,00,00,04,00,30,0,2,01,0,0, 00,09,01,01,09,00,09,0,0,03,0,0, 00,11,00,00,04,02,24,0,0,01,0,1, 00,10,00,00,10,00,14,0,0,02,0,0); 
     451                _MA3("midi.reed6",     "Eng.Horn",  5,0, 05,10,00,00,04,00,34,0,2,01,0,0, 00,09,01,01,09,01,11,0,0,03,0,0, 00,11,00,00,04,02,24,0,0,01,0,1, 00,10,00,01,10,01,11,0,0,02,0,0); 
     452                _MA3("midi.reed7",     "Bassoon",   5,0, 01,12,07,00,00,01,24,1,2,01,0,0, 09,07,01,00,08,01,00,1,2,03,0,0, 01,12,07,00,00,01,24,1,2,01,0,0, 09,07,01,00,08,01,03,1,0,03,1,0); 
     453                _MA3("midi.reed8",     "Clarinet",  5,7, 00,07,02,00,01,01,37,1,2,02,0,0, 00,08,02,00,08,01,03,0,0,01,0,0, 00,05,02,00,01,01,26,1,1,04,0,0, 00,07,02,00,08,01,03,0,0,01,0,0); 
     454                 
     455                _MA3("midi.pipe1",     "Piccolo",   5,7, 02,10,12,00,07,01,12,0,0,05,0,0, 00,09,07,00,08,15,39,0,0,01,0,0, 01,08,05,00,07,01,30,0,0,01,0,0, 00,08,05,00,10,00,06,0,0,01,0,0); 
     456                _MA3("midi.pipe2",     "Flute",     5,7, 00,13,10,00,01,01,07,0,0,03,0,0, 00,07,08,00,11,03,37,0,0,03,0,0, 00,14,08,00,09,00,39,0,0,01,0,1, 16,06,05,00,10,00,01,0,0,01,0,0); 
     457                _MA3("midi.pipe3",     "Recorder",  5,7, 03,09,06,07,10,00,58,0,0,02,0,1, 08,08,05,00,10,00,04,0,0,01,0,0, 24,10,09,06,06,09,15,0,0,07,0,0, 00,08,05,00,10,00,36,0,0,01,0,1); 
     458                _MA3("midi.pipe4",     "PanFlute",  5,7, 00,10,00,00,06,00,00,0,1,13,0,1, 03,11,10,01,10,00,35,0,0,10,0,1, 00,08,15,00,04,00,44,0,0,02,0,0, 00,08,00,00,09,00,05,0,0,01,0,1); 
     459                _MA3("midi.pipe5",     "Bottle",    5,7, 10,12,12,00,07,01,12,1,0,05,0,0, 00,07,07,00,09,06,27,0,0,01,0,0, 08,07,08,00,08,03,11,0,3,02,0,1, 00,07,05,00,08,00,01,0,0,01,0,0); 
     460                _MA3("midi.pipe6",     "Shakhchi",  5,7, 02,10,12,00,05,01,06,0,0,05,0,0, 08,06,07,00,09,05,23,0,0,01,0,1, 18,10,08,00,03,03,02,0,1,00,0,2, 00,06,05,00,09,00,01,0,0,01,0,0); 
     461                _MA3("midi.pipe7",     "Whistle",   2,0, 00,06,10,00,06,00,05,0,0,01,0,0, 00,08,08,00,07,00,05,0,0,01,0,2, 17,06,10,09,07,00,44,0,0,01,0,2, 08,06,08,00,07,00,05,0,0,01,7,2); 
     462                _MA3("midi.pipe8",     "Ocarina",   5,7, 03,08,06,07,08,00,60,0,1,02,0,0, 00,08,05,00,09,00,00,0,0,01,0,0, 24,10,09,06,06,09,15,0,0,01,0,0, 08,07,05,00,10,00,26,0,0,01,0,0); 
     463                 
     464                _MA3("midi.lead1", "SquareLd",  5,0, 08,15,15,00,07,04,46,0,3,01,0,0, 08,10,15,00,10,00,03,0,2,01,0,0, 08,15,15,00,02,03,38,0,3,02,0,0, 08,10,15,00,10,00,03,0,2,01,0,0); 
     465                _MA3("midi.lead2", "Saw.Lead",  5,7, 00,15,00,00,07,00,26,0,0,01,7,2, 08,13,15,00,07,00,10,0,0,01,7,2, 20,15,15,00,03,00,20,0,1,01,0,2, 08,14,15,00,08,00,10,0,0,01,0,2); 
     466                _MA3("midi.lead3", "CaliopLd",  5,7, 08,12,04,00,07,08,00,0,0,04,0,1, 08,12,06,00,06,07,20,0,1,04,0,2, 00,08,06,00,05,05,03,0,1,02,0,0, 16,06,04,00,08,01,02,0,0,01,0,1); 
     467                _MA3("midi.lead4", "ChiffLd",   5,0, 08,07,07,00,02,06,04,0,1,01,4,0, 08,15,06,00,08,00,11,0,0,01,0,0, 08,07,07,00,02,06,03,0,1,01,1,0, 08,15,06,00,08,00,11,0,0,01,2,0); 
     468                _MA3("midi.lead5", "CharanLd",  5,0, 01,09,02,00,06,02,08,0,2,01,4,2, 12,09,01,00,08,02,14,0,0,02,0,0, 01,09,02,00,06,02,10,0,2,01,1,2, 12,09,01,00,08,02,14,0,0,02,1,0); 
     469                _MA3("midi.lead6", "Voice Ld",  5,0, 06,04,00,00,00,15,13,0,0,07,0,0, 00,07,03,00,08,06,19,0,0,02,0,0, 08,07,15,00,09,00,28,0,1,01,0,1, 00,07,15,00,08,00,02,0,0,01,0,0); 
     470                _MA3("midi.lead7", "Fifth Ld",  7,0, 24,12,01,01,08,01,21,0,0,01,0,2, 00,12,01,01,06,02,15,0,0,01,1,2, 00,12,00,00,08,00,26,0,0,02,4,2, 16,12,01,01,08,01,06,0,0,03,1,2); 
     471                _MA3("midi.lead8", "Bass &Ld",  5,0, 01,11,02,00,03,00,22,0,0,01,0,0, 16,10,02,00,09,00,17,0,0,01,0,0, 00,12,03,04,04,05,11,0,2,01,0,0, 00,13,03,00,09,06,12,0,0,01,0,0); 
     472 
     473                _MA3("midi.pad1",  "NewAgePd",  5,5, 01,15,15,03,03,00,38,1,0,07,0,2, 00,15,07,04,04,00,11,0,2,05,0,2, 01,06,01,00,01,00,24,0,2,01,7,0, 00,08,01,00,05,01,00,0,2,01,0,0); 
     474                _MA3("midi.pad2",  "Warm Pad",  5,7, 00,10,00,00,05,00,40,0,0,01,1,0, 00,03,00,00,04,00,02,0,0,01,0,0, 00,10,00,00,03,00,47,0,0,01,3,0, 00,03,00,00,04,00,02,0,0,01,2,0); 
     475                _MA3("midi.pad3",  "PolySyPd",  5,0, 03,06,05,00,04,01,34,0,0,01,7,0, 00,10,05,00,06,01,02,0,2,02,6,0, 27,06,03,00,03,01,34,0,0,01,0,0, 08,09,03,00,05,00,00,0,2,01,2,0); 
     476                _MA3("midi.pad4",  "ChoirPad",  5,2, 08,10,00,00,00,15,33,0,0,01,7,2, 00,04,03,00,07,03,22,0,2,08,0,0, 00,07,03,00,03,00,33,0,1,01,0,0, 00,06,15,00,05,00,00,0,0,02,3,0); 
     477                _MA3("midi.pad5",  "BowedPad",  5,4, 00,02,01,00,03,04,42,0,2,07,0,0, 00,06,02,00,05,03,00,0,0,01,0,0, 00,02,01,00,03,04,42,0,2,07,1,0, 00,06,02,00,05,03,00,0,0,01,2,0); 
     478                _MA3("midi.pad6",  "MetalPad",  5,6, 10,15,02,00,03,00,23,1,2,01,0,0, 00,05,06,00,04,00,03,0,2,01,5,0, 00,15,06,00,03,03,07,1,1,01,0,0, 00,05,07,00,04,00,04,0,1,01,1,0); 
     479                _MA3("midi.pad7",  "Halo Pad",  5,6, 00,04,01,00,03,01,37,0,0,01,5,2, 00,06,02,00,05,00,00,0,2,01,7,0, 00,12,05,00,04,01,30,0,0,01,3,2, 00,08,02,00,05,00,00,0,2,01,0,0); 
     480                _MA3("midi.pad8",  "SweepPad",  5,0, 00,04,08,00,03,00,30,0,0,01,5,0, 00,03,08,00,04,00,00,0,2,01,3,0, 00,03,01,00,04,00,34,0,2,02,2,0, 00,07,02,00,05,00,00,0,2,01,7,0); 
     481 
     482                _MA3("midi.fx1", "Rain",      5,1, 00,15,08,00,06,08,02,1,3,10,0,2, 16,08,05,01,02,00,00,1,0,01,0,3, 00,15,08,00,06,08,02,1,3,10,2,2, 16,08,05,01,02,00,00,1,0,01,3,2); 
     483                _MA3("midi.fx2", "SoundTrk",  5,3, 00,06,03,00,03,03,18,0,2,03,0,0, 00,04,02,00,04,00,09,0,1,03,0,0, 16,06,03,00,03,03,16,0,0,01,0,0, 00,04,01,00,04,01,03,0,2,01,0,0); 
     484                _MA3("midi.fx3", "Crystal",   5,5, 00,15,08,01,05,04,20,0,1,06,0,2, 00,12,02,02,04,07,09,0,0,01,0,2, 00,15,08,01,05,04,20,0,1,14,2,2, 00,12,02,02,04,07,09,0,0,01,2,2); 
     485                _MA3("midi.fx4", "Atmosphr",  5,4, 20,06,03,02,04,15,21,0,1,01,0,0, 00,15,03,00,04,03,00,0,0,01,0,0, 20,12,03,00,04,15,16,0,1,02,3,0, 00,09,06,05,04,03,12,0,0,02,7,0); 
     486                _MA3("midi.fx5", "Bright",    2,0, 11,15,01,01,04,05,07,0,2,01,3,0, 09,15,02,05,04,15,07,0,0,01,3,0, 11,15,01,01,04,05,07,0,2,01,1,0, 09,15,02,05,04,15,07,0,0,01,1,0); 
     487                _MA3("midi.fx6", "Goblins",   5,4, 13,01,01,00,01,02,18,0,2,03,7,2, 00,02,01,00,04,01,09,0,2,03,0,0, 00,02,01,00,02,00,20,0,0,01,0,2, 00,03,01,00,03,00,03,0,2,01,4,2); 
     488                _MA3("midi.fx7", "Echoes",    5,0, 00,04,03,00,00,05,34,0,0,02,0,0, 00,10,02,00,12,00,14,0,2,01,0,0, 16,03,03,00,02,02,35,0,0,01,0,1, 00,10,15,00,03,00,00,0,0,01,0,0); 
     489                _MA3("midi.fx8", "Sci-Fi",    5,2, 01,05,03,00,03,08,25,0,1,02,0,0, 04,06,01,01,04,02,06,0,0,01,7,0, 01,05,03,00,03,08,25,0,1,02,3,0, 04,06,01,01,04,02,06,0,0,01,3,0); 
     490 
     491                _MA3("midi.world1",  "Sitar",     5,3, 00,13,02,03,02,05,10,0,2,02,0,2, 09,15,02,06,04,15,08,0,0,07,0,2, 08,13,02,03,02,05,03,0,2,01,1,2, 17,15,02,06,04,15,08,0,0,04,1,2); 
     492                _MA3("midi.world2",  "Banjo",     5,0, 04,13,03,02,01,01,10,1,0,01,0,0, 00,13,03,03,05,14,00,1,2,03,0,0, 01,15,07,04,02,01,15,0,0,06,0,0, 01,15,07,08,08,14,00,0,2,01,0,0); 
     493                _MA3("midi.world3",  "Shamisen",  3,4, 08,15,01,01,03,02,26,0,0,01,0,2, 00,15,10,05,06,07,20,0,0,03,0,2, 16,15,08,03,03,03,24,0,0,05,0,2, 08,15,04,04,04,15,01,1,0,03,0,2); 
     494                _MA3("midi.world4",  "Koto",      3,6, 08,15,07,05,05,02,20,0,2,03,0,0, 16,15,09,08,08,04,21,0,2,05,0,0, 00,15,02,02,03,15,42,0,0,01,0,0, 00,15,02,02,02,15,03,1,0,01,0,2); 
     495                _MA3("midi.world5",  "Kalimba",   5,6, 04,15,10,05,06,10,08,0,1,04,3,2, 00,12,02,03,05,00,08,0,0,01,0,2, 00,15,08,05,06,10,14,0,1,05,2,2, 00,12,02,04,04,00,08,1,0,01,4,2); 
     496                _MA3("midi.world6",  "Bagpipe",   5,1, 09,11,09,00,12,01,16,0,2,01,0,2, 08,07,15,00,13,00,11,0,0,03,1,2, 00,10,09,00,09,03,00,0,0,01,0,2, 01,08,06,00,13,00,10,0,0,04,0,2); 
     497                _MA3("midi.world7",  "Fiddle",    5,2, 01,08,09,00,03,01,07,1,2,01,0,0, 00,06,06,00,07,02,00,0,0,01,0,2, 04,12,06,07,07,00,09,1,1,02,0,0, 00,09,03,07,08,14,25,0,2,01,0,0); 
     498                _MA3("midi.world8",  "Shanai",    5,0, 05,10,00,00,04,00,16,0,2,01,0,0, 00,09,01,01,09,00,13,0,0,06,0,0, 00,11,00,00,04,02,24,0,0,01,0,1, 00,10,00,00,10,00,15,0,0,02,0,0); 
     499 
     500                _MA3("midi.percus1",  "TnklBell",  5,3, 00,15,06,03,04,05,16,0,1,14,0,2, 00,12,06,07,06,14,11,0,2,02,0,2, 01,12,06,02,02,05,30,0,0,07,7,2, 00,15,05,04,05,13,01,0,0,06,0,2); 
     501                _MA3("midi.percus2",  "Agogo",     5,1, 00,14,10,04,04,02,23,0,0,07,0,2, 00,15,07,06,06,01,08,0,0,05,0,2, 00,14,09,06,04,02,33,0,0,10,7,2, 00,15,07,06,06,07,04,0,0,02,0,2); 
     502                _MA3("midi.percus3",  "SteelDrm",  7,0, 16,04,04,04,05,02,00,1,0,02,0,2, 00,06,06,03,04,00,22,0,0,02,0,2, 00,14,04,04,04,02,00,1,0,02,0,2, 02,15,04,04,04,02,00,1,0,00,3,0); 
     503                _MA3("midi.percus4",  "WoodBlok",  5,5, 00,15,10,09,09,02,33,1,2,05,1,2, 00,15,10,07,07,02,00,1,0,02,3,2, 00,15,10,10,08,02,28,0,0,10,3,2, 00,15,10,07,07,02,00,0,0,02,0,2); 
     504                _MA3("midi.percus5",  "TaikoDrm",  4,7, 04,15,11,04,03,05,24,0,0,00,0,0, 00,15,12,10,03,01,19,0,0,04,0,0, 00,15,12,04,03,04,11,0,0,03,0,0, 00,15,14,05,05,00,00,0,0,00,0,0); 
     505                _MA3("midi.percus6",  "MelodTom",  5,7, 04,15,09,08,08,05,14,0,2,01,0,2, 00,15,03,05,05,14,00,0,0,00,0,2, 01,15,03,04,04,05,12,1,2,00,0,2, 00,15,04,04,04,14,00,1,0,00,0,2); 
     506                _MA3("midi.percus7",  "Syn.Drum",  5,2, 12,14,11,08,10,02,00,1,0,00,7,0, 00,12,03,00,04,15,00,1,0,00,0,0, 24,15,04,00,04,07,00,0,0,00,0,2, 22,15,07,00,07,15,00,0,0,00,0,2); 
     507                _MA3("midi.percus8",  "RevCymbl",  5,7, 00,04,15,00,00,00,00,0,0,14,0,2, 08,02,15,15,15,15,06,0,0,09,0,1, 00,04,15,00,00,00,00,0,0,14,0,2, 03,02,15,15,15,15,06,0,0,14,0,2); 
     508 
     509                _MA3("midi.se1",  "FretNoiz",  5,7, 08,15,08,04,06,02,00,0,2,06,0,2, 02,08,06,04,10,08,15,0,2,03,0,2, 10,15,06,02,06,02,00,0,0,06,0,2, 02,08,08,08,10,08,00,0,2,06,0,2); 
     510                _MA3("midi.se2",  "BrthNoiz",  5,7, 02,10,12,00,05,01,14,0,0,05,0,0, 00,07,08,08,09,15,05,0,0,01,0,0, 00,10,12,00,05,01,09,0,0,08,0,0, 00,08,08,07,09,15,12,0,0,01,0,0); 
     511                _MA3("midi.se3",  "Seashore",  3,7, 00,15,15,00,00,00,04,0,0,03,0,0, 04,15,02,02,02,15,21,0,0,00,0,0, 01,15,00,04,04,15,12,0,0,00,0,0, 00,01,02,04,04,15,00,0,0,00,0,0); 
     512                _MA3("midi.se4",  "Tweet",     5,0, 00,03,07,03,03,10,21,1,2,05,0,2, 00,05,06,07,07,03,00,1,1,10,0,2, 00,03,07,03,03,10,21,1,2,05,0,2, 00,05,06,04,04,03,00,1,1,10,7,3); 
     513                _MA3("midi.se5",  "Telphone",  5,5, 02,11,02,00,00,06,28,1,1,05,0,2, 00,15,04,03,03,01,03,1,0,04,0,2, 02,11,02,00,00,06,28,1,1,05,0,2, 00,15,04,03,03,01,15,1,0,04,7,2); 
     514                _MA3("midi.se6",  "Helicptr",  5,5, 14,15,06,00,00,00,01,0,0,15,0,2, 00,02,00,00,05,00,04,0,0,00,0,2, 14,15,00,00,00,00,24,0,0,00,0,2, 00,02,00,00,05,00,11,0,0,00,0,2); 
     515                _MA3("midi.se7",  "Applause",  5,7, 24,15,12,00,01,00,00,0,0,00,0,0, 00,04,02,00,05,00,08,0,0,00,0,0, 24,06,00,00,01,15,00,0,0,09,0,1, 00,03,00,07,07,15,07,0,0,03,0,0); 
     516                _MA3("midi.se8",  "Gunshot",   5,7, 00,15,03,00,00,15,11,0,0,05,0,0, 06,15,06,08,08,11,04,0,0,15,0,0, 01,15,02,00,00,15,02,0,0,05,0,0, 06,15,06,08,08,11,26,0,0,05,0,0); 
     517            } 
     518             
     519            if (includeFlag & INCLUDE_MIDIDRUM) { 
     520                _categoly("midi.drum"); 
     521                _MA3("midi.drum24",  "Seq Click H",      5,6, 04,15,00,15,15,00,56,0,0,06,0,2, 00,15,08,15,15,12,00,1,0,05,0,2, 06,15,11,15,15,11,39,0,0,10,0,2, 00,14,11,15,15,15,01,1,0,05,0,2); 
     522                _MA3("midi.drum25",  "Brush Tap",        5,7, 00,15,08,00,00,03,00,0,0,05,0,2, 00,09,08,08,11,11,00,0,2,00,0,2, 06,15,08,06,14,03,36,0,0,12,0,2, 06,12,13,08,08,00,44,0,2,01,0,2); 
     523                _MA3("midi.drum26",  "Brush Swirl",      5,7, 18,15,05,00,06,00,00,0,0,00,0,2, 03,09,08,00,10,06,00,0,0,00,0,3, 16,15,00,00,15,15,00,0,0,00,0,0, 00,03,06,03,15,06,21,0,0,01,0,3); 
     524                _MA3("midi.drum27",  "Brush Slap",       5,7, 00,15,00,00,00,00,00,0,0,04,0,2, 13,12,08,06,12,09,00,0,0,14,0,2, 07,11,10,04,07,13,09,0,0,00,0,2, 00,08,08,11,11,13,00,0,2,00,0,2); 
     525                _MA3("midi.drum28",  "Brush Tap Swirl",  5,7, 18,15,05,00,03,00,00,0,0,05,5,2, 03,09,06,00,10,06,00,0,0,03,0,3, 16,15,00,00,15,15,00,0,0,09,0,0, 20,03,06,03,15,06,16,0,0,03,0,3); 
     526                _MA3("midi.drum29",  "Snare Roll",       5,7, 02,07,00,00,02,00,13,0,0,08,3,1, 26,15,05,00,09,03,00,0,0,00,6,0, 00,15,10,08,04,03,08,0,0,03,0,2, 00,14,06,07,07,05,00,0,0,00,0,2); 
     527                _MA3("midi.drum30",  "Castanet",         5,6, 01,15,07,05,09,15,02,0,0,07,0,2, 06,10,08,05,15,15,00,1,0,05,0,2, 05,15,05,06,05,00,39,0,0,02,0,2, 00,12,10,09,09,10,20,0,0,05,0,2); 
     528                _MA3("midi.drum31",  "Snare L",          5,7, 24,15,12,00,00,01,09,0,0,00,0,2, 00,15,07,07,07,03,00,0,0,00,0,2, 00,14,11,07,05,15,48,0,0,07,0,2, 00,15,10,06,00,00,28,0,0,00,0,2); 
     529                _MA3("midi.drum32",  "Sticks",           6,7, 20,15,09,12,08,09,00,0,1,15,0,2, 03,13,10,02,08,11,00,0,0,10,0,2, 03,13,08,02,05,05,21,0,1,11,0,2, 08,12,11,09,07,11,00,0,0,13,0,2); 
     530                _MA3("midi.drum33",  "Bass Drum L",      5,1, 04,15,10,11,06,15,00,0,0,02,0,2, 00,15,06,06,05,07,16,0,0,02,0,2, 01,11,09,07,04,07,13,0,0,05,0,2, 12,15,07,08,05,07,00,0,0,01,0,2); 
     531                _MA3("midi.drum34",  "Open Rim Shot",    5,7, 02,15,00,05,05,00,05,1,0,12,0,2, 00,15,07,07,07,07,00,1,0,11,0,2, 00,15,10,06,06,08,00,0,0,12,0,2, 02,15,07,07,07,07,00,0,0,07,0,2); 
     532                _MA3("midi.drum35",  "Bass Drum M",      5,6, 06,15,13,07,07,15,00,0,0,13,0,2, 00,15,07,07,04,07,00,0,0,02,0,2, 10,15,09,07,06,07,19,0,0,03,0,2, 12,15,08,10,06,11,00,0,0,02,0,2); 
     533                _MA3("midi.drum36",  "Bass Drum H",      5,6, 06,15,13,07,06,15,14,0,0,13,0,2, 00,15,07,07,07,07,12,0,0,02,0,2, 02,15,09,07,04,07,09,0,0,02,0,2, 12,15,07,08,06,07,00,0,0,01,0,2); 
     534                _MA3("midi.drum37",  "Closed Rim Shot",  5,6, 01,15,02,00,08,05,08,0,0,10,0,2, 06,13,09,03,03,15,00,1,0,07,0,2, 18,11,00,00,09,13,00,0,0,09,0,2, 18,13,09,11,09,11,00,0,0,00,0,2); 
     535                _MA3("midi.drum38",  "Snare M",          5,7, 13,15,00,05,07,00,07,1,0,12,0,2, 00,15,07,10,09,07,00,1,0,08,0,2, 00,15,05,07,08,06,00,0,0,12,0,2, 02,15,07,07,06,07,01,0,0,07,0,2); 
     536                _MA3("midi.drum39",  "Hand Clap",        5,7, 00,15,04,04,06,00,02,0,0,00,0,2, 05,15,06,09,04,01,00,0,0,00,0,2, 27,15,08,00,15,01,00,0,2,13,1,2, 02,15,10,09,08,05,00,0,2,15,0,2); 
     537                _MA3("midi.drum40",  "Snare H",          5,7, 02,15,01,00,07,00,10,0,0,12,0,2, 00,15,07,11,07,13,00,0,0,11,0,0, 28,15,10,06,05,08,09,0,0,09,0,2, 18,15,08,10,06,01,00,0,0,07,0,2); 
     538                _MA3("midi.drum41",  "Floor Tom L",      5,4, 06,13,10,06,06,15,09,0,0,12,0,2, 00,15,10,07,11,07,00,0,0,05,0,2, 01,15,03,05,05,15,21,0,0,00,0,2, 00,15,06,05,06,07,00,0,0,05,0,2); 
     539                _MA3("midi.drum42",  "Hi-Hat Closed",    5,7, 00,15,00,00,00,03,02,0,0,15,0,2, 00,11,08,12,08,11,00,0,2,00,0,2, 14,15,03,03,13,03,12,0,0,00,0,2, 11,11,10,08,11,00,00,0,2,13,0,2); 
     540                _MA3("midi.drum43",  "Floor Tom H",      5,0, 06,12,05,06,06,15,00,0,0,12,0,2, 19,15,09,07,11,07,00,0,0,11,0,2, 01,15,04,04,05,15,26,0,0,00,0,2, 00,15,06,04,06,05,00,0,0,05,0,2); 
     541                _MA3("midi.drum44",  "Hi-Hat Pedal",     5,7, 00,15,00,00,00,03,00,0,0,12,0,2, 00,07,08,08,08,11,15,0,2,00,0,2, 20,15,03,05,14,03,08,0,0,06,0,2, 11,08,03,08,08,00,00,0,2,05,0,2); 
     542                _MA3("midi.drum45",  "Low Tom",          5,0, 06,12,05,06,06,15,01,0,0,10,0,2, 18,15,08,07,09,07,00,0,0,01,0,2, 01,15,03,05,05,15,17,0,0,00,0,2, 00,15,06,05,05,07,00,0,0,05,0,2); 
     543                _MA3("midi.drum46",  "Hi-Hat Open",      5,7, 00,15,00,00,00,03,02,0,0,15,0,2, 00,11,07,06,08,11,01,0,2,00,0,2, 14,15,03,03,13,03,12,0,0,00,0,2, 11,11,09,05,11,00,09,0,2,13,0,2); 
     544                _MA3("midi.drum47",  "Mid Tom L",        5,0, 06,12,05,06,06,15,00,0,0,10,0,2, 18,15,09,07,10,06,00,0,0,08,0,2, 00,15,04,02,05,15,28,0,0,00,0,2, 00,15,06,05,07,07,02,0,0,04,0,2); 
     545                _MA3("midi.drum48",  "Mid Tom H",        5,0, 06,12,04,06,05,15,09,0,0,10,0,2, 19,15,09,07,07,07,00,0,0,01,0,2, 01,15,04,05,05,15,39,0,0,01,0,2, 00,15,06,06,07,07,03,0,0,04,0,2); 
     546                _MA3("midi.drum49",  "Crash Cymbal 1",   5,3, 16,15,09,00,06,00,14,0,0,13,0,2, 18,09,03,04,05,02,03,0,0,11,0,0, 00,11,03,00,04,00,00,0,0,15,0,2, 06,12,04,05,05,07,13,0,0,15,0,2); 
     547                _MA3("midi.drum50",  "High Tom",         5,0, 06,12,04,06,07,15,04,0,0,08,0,2, 19,15,10,07,08,07,00,0,0,06,0,2, 05,15,05,05,06,15,50,0,0,01,0,2, 00,12,06,05,06,07,00,0,0,05,0,2); 
     548                _MA3("midi.drum51",  "Ride Cymbal 1",    5,7, 00,15,07,00,00,04,09,0,2,15,0,2, 14,14,04,04,04,14,03,0,0,09,0,2, 00,15,00,00,00,04,08,0,2,14,0,2, 11,15,04,02,05,13,16,0,0,14,0,2); 
     549                _MA3("midi.drum52",  "Chinese Cymbal",   5,7, 00,15,03,07,02,01,31,0,0,00,0,2, 30,14,03,05,02,00,00,1,0,05,0,0, 00,15,01,08,03,06,15,0,0,02,0,2, 06,09,02,05,03,00,09,0,0,00,0,2); 
     550                _MA3("midi.drum53",  "Ride Cymbal Cup",  5,7, 19,15,07,00,00,04,22,0,2,15,0,2, 12,15,05,04,04,14,00,0,0,15,0,2, 19,15,00,00,00,04,12,0,2,12,0,2, 11,15,05,02,05,13,27,0,0,15,0,2); 
     551                _MA3("midi.drum54",  "Tambourine",       5,6, 00,08,07,04,01,02,10,0,0,11,0,2, 13,14,07,12,11,05,00,0,0,05,0,2, 08,08,07,05,02,02,00,0,0,11,0,2, 08,13,07,12,07,06,00,0,0,15,0,2); 
     552                _MA3("midi.drum55",  "Splash Cymbal",    5,7, 25,12,06,03,03,00,00,0,0,08,0,0, 03,09,03,04,03,12,00,1,0,13,0,0, 13,05,00,03,03,00,01,0,0,05,0,0, 19,12,03,05,08,06,00,1,0,15,0,0); 
     553                _MA3("midi.drum56",  "Cowbell",          5,4, 00,15,09,08,05,03,00,1,2,03,0,2, 00,10,07,05,03,03,00,1,0,00,0,2, 02,15,15,11,09,10,03,1,0,04,0,2, 00,15,12,05,05,03,32,1,0,01,0,2); 
     554                _MA3("midi.drum57",  "Crash Cymbal 2",   5,7, 00,15,06,00,00,00,00,0,2,09,0,2, 00,09,04,02,02,00,00,1,0,00,0,0, 00,15,03,00,00,00,00,0,2,15,0,2, 02,09,06,03,04,03,08,0,0,07,4,2); 
     555                _MA3("midi.drum58",  "Vibraslap",        5,7, 29,13,01,02,06,00,00,0,0,01,2,1, 08,15,06,05,09,02,00,0,0,00,6,0, 29,15,05,04,04,00,29,0,0,06,0,2, 30,15,06,05,04,00,00,0,0,00,0,2); 
     556                _MA3("midi.drum59",  "Ride Cymbal 2",    5,7, 07,15,00,00,06,00,05,0,0,14,0,3, 14,14,05,05,04,11,16,0,0,15,0,2, 06,15,00,00,00,04,07,0,2,09,0,2, 11,15,05,03,05,14,00,0,0,09,0,2); 
     557                _MA3("midi.drum60",  "Bongo H",          5,3, 00,15,05,12,12,00,00,0,0,06,0,2, 00,15,05,08,07,00,00,0,0,11,0,2, 00,15,05,12,12,00,02,0,0,15,0,2, 00,15,04,07,03,00,00,0,0,15,0,2); 
     558                _MA3("midi.drum61",  "Bongo L",          5,3, 00,15,05,12,12,00,00,0,0,06,0,2, 00,15,05,08,07,00,07,0,0,11,0,2, 00,15,05,12,12,00,06,0,0,15,0,2, 00,15,05,08,03,00,00,0,0,15,0,2); 
     559                _MA3("midi.drum62",  "Conga H Mute",     5,4, 00,14,14,10,10,01,06,0,0,00,2,2, 08,15,08,09,10,01,00,0,0,01,0,2, 00,15,00,00,00,00,44,0,0,00,0,2, 00,15,13,09,10,01,07,0,0,00,0,2); 
     560                _MA3("midi.drum63",  "Conga H Open",     5,7, 03,10,10,05,08,12,38,0,0,10,0,2, 00,12,06,07,09,04,00,0,0,12,0,2, 00,15,10,06,08,08,00,0,0,12,0,2, 02,15,07,07,09,07,00,0,0,02,0,2); 
     561                _MA3("midi.drum64",  "Conga L",          5,7, 03,10,10,05,08,12,31,0,0,10,0,2, 00,12,05,06,09,04,00,0,0,12,0,2, 00,15,10,06,08,08,00,0,0,12,0,2, 10,15,07,07,09,07,00,0,0,02,0,2); 
     562                _MA3("midi.drum65",  "Timbale H",        3,6, 00,12,07,00,08,00,22,0,0,02,0,2, 00,15,09,06,08,00,49,0,0,07,0,2, 04,13,06,10,06,01,26,0,0,09,0,2, 06,15,09,06,08,00,06,0,0,09,0,2); 
     563                _MA3("midi.drum66",  "Timbale L",        3,6, 00,12,07,00,08,00,22,0,0,02,0,2, 00,15,09,06,08,00,49,0,0,07,0,2, 04,13,06,10,06,01,23,0,0,12,0,2, 06,15,09,06,08,00,04,0,0,09,0,2); 
     564                _MA3("midi.drum67",  "Agogo H",          5,5, 00,14,12,06,06,02,21,0,0,07,0,2, 00,15,08,06,06,01,10,0,0,02,0,2, 00,14,12,06,05,02,26,0,0,07,0,2, 00,15,08,06,06,01,10,0,0,02,0,2); 
     565                _MA3("midi.drum68",  "Agogo L",          5,5, 00,14,12,06,06,02,21,0,0,07,0,2, 00,15,08,06,06,01,10,0,0,02,0,2, 00,14,12,05,05,02,13,0,0,07,0,2, 00,15,08,06,06,01,29,0,0,02,0,2); 
     566                _MA3("midi.drum69",  "Cabasa",           3,7, 00,15,00,03,05,06,00,0,0,07,0,2, 00,14,08,04,04,10,24,1,0,15,0,2, 00,14,04,02,06,04,00,0,0,15,0,2, 06,08,11,09,04,00,02,0,0,15,0,2); 
     567                _MA3("midi.drum70",  "Maracas",          4,7, 00,15,00,03,05,06,04,0,0,15,0,2, 00,08,08,04,04,06,03,1,0,15,0,2, 06,12,09,03,03,15,00,0,0,15,0,2, 12,07,10,10,03,08,00,0,0,15,0,2); 
     568                _MA3("midi.drum71",  "Samba Whistle H",  5,5, 01,15,00,00,07,00,10,0,0,00,0,1, 00,12,01,00,12,01,43,0,0,14,0,1, 00,15,00,00,07,00,23,0,0,00,0,2, 00,08,01,00,12,00,06,0,0,15,0,1); 
     569                _MA3("midi.drum72",  "Samba Whistle L",  5,5, 01,15,00,00,07,00,10,0,0,00,0,1, 00,12,01,00,12,01,43,0,0,14,0,1, 00,15,00,00,07,00,23,0,0,00,0,2, 00,08,01,00,12,00,06,0,0,15,0,1); 
     570                _MA3("midi.drum73",  "Guiro Short",      3,7, 01,12,02,06,00,00,12,0,0,01,0,0, 04,12,03,06,10,00,00,0,0,03,0,0, 11,13,01,00,06,00,32,0,0,14,5,0, 07,15,07,12,15,06,00,1,0,00,1,0); 
     571                _MA3("midi.drum74",  "Guiro Long",       3,7, 01,12,02,06,00,00,14,0,0,01,0,0, 04,12,03,06,10,00,00,0,0,03,0,0, 11,15,00,00,06,00,32,0,0,13,0,0, 07,09,06,14,12,06,05,0,0,00,2,0); 
     572                _MA3("midi.drum75",  "Claves",           4,0, 00,13,07,06,06,10,11,0,0,07,0,2, 00,15,14,11,03,10,13,0,0,07,0,2, 00,15,11,08,00,12,00,1,0,00,0,2, 08,15,03,08,08,00,00,1,0,15,0,2); 
     573                _MA3("midi.drum76",  "Wood Block H",     4,0, 00,14,06,06,06,10,63,0,0,15,0,2, 00,15,06,06,05,11,00,0,0,06,0,2, 02,13,12,00,10,12,00,1,0,07,0,2, 08,15,07,12,07,04,00,1,0,03,0,2); 
     574                _MA3("midi.drum77",  "Wood Block L",     4,0, 00,14,06,06,06,10,63,0,0,15,0,2, 00,15,06,06,05,11,00,0,0,06,0,2, 02,15,10,00,10,12,16,1,0,10,0,2, 16,12,07,12,12,04,00,1,0,03,0,2); 
     575                _MA3("midi.drum78",  "Cuica Mute",       5,0, 00,13,10,12,13,11,15,0,2,00,0,2, 00,06,00,06,05,00,06,0,0,06,0,2, 00,15,08,08,12,00,14,0,0,00,0,2, 00,06,00,07,07,00,02,0,0,06,0,2); 
     576                _MA3("midi.drum79",  "Cuica Open",       5,1, 16,09,08,15,08,15,12,0,0,00,0,0, 08,07,06,08,08,04,00,0,0,14,0,0, 00,15,07,00,00,00,36,0,0,02,0,2, 00,13,07,11,11,12,18,0,0,11,0,2); 
     577                _MA3("midi.drum80",  "Triangle Mute",    7,0, 22,15,12,08,04,00,05,0,0,09,0,2, 04,11,05,09,05,06,00,0,0,15,0,2, 06,15,11,12,07,03,07,0,0,14,0,2, 00,14,13,08,11,15,06,0,0,06,0,2); 
     578                _MA3("midi.drum81",  "Triangle Open",    7,0, 22,15,05,05,04,00,03,0,0,09,0,2, 04,11,05,09,05,06,00,0,0,15,0,2, 06,15,09,09,07,03,08,0,0,14,0,2, 00,14,05,05,11,15,03,0,0,06,0,2); 
     579                _MA3("midi.drum82",  "Shaker",           4,7, 00,09,00,03,05,06,00,0,0,07,0,2, 00,09,06,04,04,06,04,1,0,03,0,2, 00,14,04,02,06,04,01,0,0,12,0,2, 06,09,10,09,04,08,02,0,0,15,0,2); 
     580                _MA3("midi.drum83",  "Jingle Bells",     5,0, 02,07,06,00,00,00,20,0,0,06,0,2, 03,06,11,05,05,04,00,0,0,02,0,2, 02,03,00,00,02,00,07,1,0,06,0,2, 02,07,05,02,06,15,00,0,0,09,0,2); 
     581                _MA3("midi.drum84",  "Bell Tree",        5,7, 19,12,04,02,00,00,24,0,0,03,0,2, 02,04,03,05,05,04,00,0,0,02,0,3, 02,03,00,00,02,00,07,1,0,07,0,3, 13,05,04,02,06,06,02,0,0,03,0,3); 
     582            } 
    343583        } 
    344584         
    345585         
     586         
     587         
     588    // internal functions 
     589    //-------------------------------------------------- 
    346590        // create new voice 
    347591        private function _new(key:String, name:String, voice:SiONVoice) : void { 
     
    361605        } 
    362606         
     607         
     608        // create new MA3 voice 
     609        private function _MA3(key:String, name:String, ...args) : void { 
     610            var voice:SiONVoice = new SiONVoice(); 
     611            voice.paramMA3 = args; 
     612            voice.name = name; 
     613            _categolyList.push(voice); 
     614            this[key] = voice; 
     615        } 
     616         
     617         
     618        // register categoly 
    363619        private var _categolyList:Array; 
    364620        private function _categoly(key:String) : void { 
  • as3/SiOPM/trunk/src/org/si/sion/utils/SiONUtil.as

    r2903 r2989  
    1010    import flash.utils.ByteArray; 
    1111    import org.si.sion.module.SiOPMTable; 
     12    import org.si.sion.module.SiOPMWaveTable; 
    1213     
    1314     
     
    113114         
    114115         
    115         /** Calculate sample length from 16th beat. */ 
     116        /** Calculate sample length from 16th beat.  
     117         *  @param bpm Beat per minuits. 
     118         *  @param beat16 Count of 16th beat. 
     119         */ 
    116120        static public function calcSampleLength(bpm:Number, beat16:Number) : Number 
    117121        { 
     
    119123            return beat16 * 661500 / bpm; 
    120124        } 
     125         
     126         
     127         
     128         
     129    // wave table 
     130    //-------------------------------------------------- 
     131        /** create Wave table Vector from wave color. 
     132         *  @param color wave color value 
     133         *  @param waveType wave type (the voice number of '%5') 
     134         *  @param dst returning Vector.<Number>. if null, allocate new Vector inside. 
     135         */ 
     136        static public function waveColor(color:uint, waveType:int=0, dst:Vector.<Number>=null) : Vector.<Number> 
     137        { 
     138            if (dst == null) dst = new Vector.<Number>(SiOPMTable.SAMPLING_TABLE_SIZE); 
     139            var len:int, bits:int=0; 
     140            for (len=dst.length>>1; len!=0; len>>=1) bits++; 
     141            dst.length = 1<<bits; 
     142            bits = SiOPMTable.PHASE_BITS - bits; 
     143             
     144            var i:int, imax:int, j:int, gain:int, mul:int, n:Number, nmax:Number,  
     145                bars:Vector.<Number> = new Vector.<Number>(7), 
     146                barr:Vector.<int> = Vector.<int>([1,2,3,4,5,6,8]), 
     147                log:Vector.<int> = SiOPMTable.instance.logTable, 
     148                waveTable:SiOPMWaveTable = SiOPMTable.instance.getWaveTable(waveType + (color>>>28)), 
     149                wavelet:Vector.<int> = waveTable.wavelet, fixedBits:int = waveTable.fixedBits, 
     150                filter:int = SiOPMTable.PHASE_FILTER, envtop:int = (-SiOPMTable.ENV_TOP)<<3, 
     151                index:int, step:int = SiOPMTable.PHASE_MAX >> bits; 
     152             
     153            for (i=0; i<7; i++, color>>=4) bars[i] = (color & 15) * 0.0625; 
     154 
     155            imax = SiOPMTable.PHASE_MAX; 
     156            nmax = 0; 
     157            for (i=0; i<imax; i+=step) { 
     158                j = i>>bits; 
     159                dst[j] = 0; 
     160                for (mul=0; mul<7; mul++) { 
     161                    index = (((i * barr[mul]) & filter) >> fixedBits); 
     162                    gain = wavelet[index] + envtop; 
     163                    dst[j] += log[gain] * bars[mul]; 
     164                } 
     165                n = (dst[j]<0) ? -dst[j] : dst[j]; 
     166                if (nmax < n) nmax = n; 
     167            } 
     168 
     169            if (nmax < 8192) nmax = 8192 
     170            n = 1/nmax; 
     171            imax = dst.length; 
     172            for (i=0; i<imax; i++) dst[i] *= n; 
     173            return dst; 
     174        } 
    121175    } 
    122176} 
  • as3/SiOPM/trunk/src/org/si/sion/utils/Translator.as

    r2625 r2989  
    3636    //-------------------------------------------------- 
    3737        /** Translate pTSSCP mml to SiOPM mml. */ 
    38         static public function tsscp(tsscpMML:String) : String 
     38        static public function tsscp(tsscpMML:String, volumeByX:Boolean=true) : String 
    3939        { 
    4040            var mml:String, com:String, str1:String, str2:String, i:int, imax:int, volUp:String, volDw:String, rex:RegExp, rex_sys:RegExp, rex_com:RegExp, res:*; 
     
    121121                                }break; 
    122122                                case 'v': { 
    123                                     p0 = (res[3].length == 0) ? 40 : ((int(res[3])<<2)+(int(res[3])>>2)); 
    124                                     if (res[4]) { 
    125                                         p1 = (int(res[4])<<2) + (int(res[4])>>2); 
    126                                         p2 = (p1 > 0) ? (int(Math.atan(p0/p1)*81.48733086305041)) : 128; // 81.48733086305041 = 128/(PI*0.5) 
    127                                         p3 = (p0 > p1) ? p0 : p1; 
    128                                         mml += "@p" + String(p2) + "x" + String(p3); 
     123                                    if (volumeByX) { 
     124                                        p0 = (res[3].length == 0) ? 40 : ((int(res[3])<<2)+(int(res[3])>>2)); 
     125                                        if (res[4]) { 
     126                                            p1 = (int(res[4])<<2) + (int(res[4])>>2); 
     127                                            p2 = (p1 > 0) ? (int(Math.atan(p0/p1)*81.48733086305041)) : 128; // 81.48733086305041 = 128/(PI*0.5) 
     128                                            p3 = (p0 > p1) ? p0 : p1; 
     129                                            mml += "@p" + String(p2) + "x" + String(p3); 
     130                                        } else { 
     131                                            mml += "x" + String(p0); 
     132                                        } 
    129133                                    } else { 
    130                                         mml += "x" + String(p0); 
     134                                        p0 = (res[3].length == 0) ? 10 : (res[3]); 
     135                                        if (res[4]) { 
     136                                            p1 = res[4]; 
     137                                            p2 = (p1 > 0) ? (int(Math.atan(p0/p1)*81.48733086305041)) : 128; // 81.48733086305041 = 128/(PI*0.5) 
     138                                            p3 = (p0 > p1) ? p0 : p1; 
     139                                            mml += "@p" + String(p2) + "v" + String(p3); 
     140                                        } else { 
     141                                            mml += "v" + String(p0); 
     142                                        } 
    131143                                    } 
    132144                                }break; 
    133145                                case '@v': { 
    134                                     p0 = (res[3].length == 0) ? 40 : (int(res[3])>>2); 
    135                                     if (res[4]) { 
    136                                         p1 = int(res[4])>>2; 
    137                                         p2 = (p1 > 0) ? (int(Math.atan(p0/p1)*81.48733086305041)) : 128; // 81.48733086305041 = 128/(PI*0.5) 
    138                                         p3 = (p0 > p1) ? p0 : p1; 
    139                                         mml += "@p" + String(p2) + "x" + String(p3); 
     146                                    if (volumeByX) { 
     147                                        p0 = (res[3].length == 0) ? 40 : (int(res[3])>>2); 
     148                                        if (res[4]) { 
     149                                            p1 = int(res[4])>>2; 
     150                                            p2 = (p1 > 0) ? (int(Math.atan(p0/p1)*81.48733086305041)) : 128; // 81.48733086305041 = 128/(PI*0.5) 
     151                                            p3 = (p0 > p1) ? p0 : p1; 
     152                                            mml += "@p" + String(p2) + "x" + String(p3); 
     153                                        } else { 
     154                                            mml += "x" + String(p0); 
     155                                        } 
    140156                                    } else { 
    141                                         mml += "x" + String(p0); 
     157                                        p0 = (res[3].length == 0) ? 10 : (int(res[3])>>4); 
     158                                        if (res[4]) { 
     159                                            p1 = int(res[4])>>4; 
     160                                            p2 = (p1 > 0) ? (int(Math.atan(p0/p1)*81.48733086305041)) : 128; // 81.48733086305041 = 128/(PI*0.5) 
     161                                            p3 = (p0 > p1) ? p0 : p1; 
     162                                            mml += "@p" + String(p2) + "v" + String(p3); 
     163                                        } else { 
     164                                            mml += "v" + String(p0); 
     165                                        } 
    142166                                    } 
    143167                                }break; 
     
    438462            for (var opeIndex:int=0; opeIndex<param.opeCount; opeIndex++) { 
    439463                var opp:SiOPMOperatorParam = param.opeParam[opeIndex]; 
    440                 opp.setPGType(int(data[dataIndex++]) & 1023); // 1 
     464                opp.setPGType(int(data[dataIndex++]) & 511); // 1 
    441465                opp.ar     = int(data[dataIndex++]) & 63;   // 2 
    442466                opp.dr     = int(data[dataIndex++]) & 63;   // 3