Example #1
0
 public void Test_rhythm_with_ranged_alt_layer()
 {
     rhythm.AddLayer("So");
     rhythm.Length = 5;
     rhythm.AddRangedAltLayer(0, 1, 2, "PP");
     rhythm.GetRhythm().FirstOrDefault().Should().Be("SoPPPPSoSo");
 }
Example #2
0
        public void Test_put_rhythm_in_track()
        {
            Rhythm rhythm = new Rhythm();

            rhythm.AddLayer("So").AddLayer("xx");
            rhythm.Length = 10;
            rhythm.AddRecurringAltLayer(0, 0, 7, 2, "..");
            rhythm.AddRangedAltLayer(1, 1, 5, "XX");
            rhythm.AddOneTimeAltLayer(1, 4, "**");

            var rhythms = rhythm.GetRhythm().ToList();

            rhythms[0].Should().Be("..So..So..So..SoSoSo");
            rhythms[1].Should().Be("xxXXXXXX**XXxxxxxxxx");

            TrackTable t = new TrackTable(10, 1.0d);

            t.Add(rhythm);
            t[9, 3].ToString().Should().Be("V9 L0 [ACOUSTIC_SNARE]i Rs [BASS_DRUM]s L1 [HAND_CLAP]i [HAND_CLAP]i");
            t[9, 9].ToString().Should().Be("V9 L0 [ACOUSTIC_SNARE]i Rs [BASS_DRUM]s L1 Rs [HAND_CLAP]s Rs [HAND_CLAP]s");
        }