public void Test_atomize_pattern() { var pattern = new Pattern("C") .SetVoice(1) .SetInstrument(Instrument.ElectricGrandPiano); pattern.Atomize(); pattern.ToString().Should().Be("&V1,L0,I2,C"); }
public void Test_atomize_crazier_pattern() { // This pattern has: // - Unstated layers and instruments that should resolve to 0 // - Layers and instruments stated at the end of one voice that shouldn't affect other voices // - Layers and instruments that should be recalled when parsed later in the line var pattern = new Pattern("V1 A V2 B I55 L6 V1 I7 C V3 L7 E I8 D L5 C I4 A V2 G"); pattern.Atomize(); pattern.ToString().Should().Be("&V1,L0,I0,A &V2,L0,I0,B &V1,L0,I7,C &V3,L7,I0,E &V3,L7,I8,D &V3,L5,I8,C &V3,L5,I4,A &V2,L6,I55,G"); }