public void Test_rhythm_with_recurring_alt_layer_from_0() { rhythm.AddLayer("So"); rhythm.Length = 10; rhythm.AddRecurringAltLayer(0, 0, 10, 3, ".."); rhythm.GetRhythm().First().Should().Be("..SoSo..SoSo..SoSo.."); }
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"); }