コード例 #1
0
ファイル: Song2.cs プロジェクト: ngaspar/procedural-music
 public Song2()
 {
     stdDrums = new Instruments.StdDrums();
     stdBass = new Instruments.StdBass();
     //BPM = 140;
     timer = 0;
 }
コード例 #2
0
ファイル: Song1.cs プロジェクト: ngaspar/procedural-music
        public Song1()
        {
            stdDrums = new Instruments.StdDrums();
            stdBass = new Instruments.StdBass();
            BPM = 120;
            timer = 0;

            //Instruments Setup
            stdDrums.bassDrumSwitch = 4; stdDrums.bassDrumPercent = 1; //Bass drum will be played every four ticks
            stdDrums.crashSwitch = 16; stdDrums.crashPercent = 0.8; //Crash will have a 80% chance of playing every 16 ticks (end of a bar)
            stdDrums.hiHatSwitch = 2; stdDrums.hiHatPercent = 0.8; //Hi Hat will have a 80% chance of playing every 2 ticks
            stdDrums.snareSwitch = 1; stdDrums.snarePercent = 0.2; //Snare will have a 20% chance of playing every tick
            stdDrums.clapSwitch = 2; stdDrums.clapPercent = 0.5; //Crash will have a 50% chance of playing every 2 ticks

            stdBass.noteSwitch = 8; //After 8 ticks the bass will switch to a different note.
            stdBass.bassPercent = 0.667; // Has a 66.7% chance of playing every tick
        }