public void Test_rhythm_with_length() { rhythm.AddLayer("So"); rhythm.Length = 3; rhythm.GetRhythm().First().Should().Be("SoSoSo"); }
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"); }