In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

SiON練習その2 プリセットボイスを使用

以下コードを参考にさせてもらいました
SiONの練習(プリセットボイスを使う) 
http://wonderfl.net/c/sVKr
/**
 * Copyright siouxcitizen ( http://wonderfl.net/user/siouxcitizen )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/cpzw
 */

// forked from siouxcitizen's SiON練習その1
//以下コードを参考にさせてもらいました
//SiONの練習(プリセットボイスを使う) 
//http://wonderfl.net/c/sVKr
package {
    import flash.display.Sprite;
    import org.si.sion.*;
    import org.si.sion.utils.SiONPresetVoice;
    public class SiONRensyu extends Sprite {
        public var driver:SiONDriver = new SiONDriver();
        public var presetVoice:SiONPresetVoice = new SiONPresetVoice();
        public var mainMelody:SiONData;
        public var voice:SiONVoice;
        function SiONRensyu() {
        	    mainMelody = driver.compile("t100 l8 [cdefgab<c c>bagfedc]1");
        	    voice = presetVoice["valsound.bell16"];
        	    driver.play();
        	    //第一引数にSiONData、第二引数にSiONVoice、第三引数以降は、length=0(play all of sequence), delay=0(no delay), quantize=2(8th beat)
            driver.sequenceOn(mainMelody, voice, 0, 0, 2);
        }
    }
}