public void GenerateNewCompositionFrom22nd176thAnd1stMeasures() { var musicDice = new MusicalDice(sampleCompositionFilePath); var composition = new StringBuilder(); var measure22 = 22; var measure176 = 176; var measure1 = 1; var firstMeasure = 1; var secondMeasure = 2; var thirdMeasure = 3; var beatsForMeasure22 = musicDice.RetrieveBeatsForMeasure(measure22); var firstMeasureBeatOffset = musicDice.GetBeatOffsetForMeasures(measure22, firstMeasure); var newFirstMeasure = musicDice.GetAdjustedBeatsForNewMeasure(beatsForMeasure22, firstMeasureBeatOffset); composition.Append(newFirstMeasure).Append("\n"); var beatsForMeasure176 = musicDice.RetrieveBeatsForMeasure(measure176); var secondMeasureBeatOffset = musicDice.GetBeatOffsetForMeasures(measure176, secondMeasure); var newSecondMeasure = musicDice.GetAdjustedBeatsForNewMeasure(beatsForMeasure176, secondMeasureBeatOffset); composition.Append(newSecondMeasure).Append("\n"); var beatsForMeasure1 = musicDice.RetrieveBeatsForMeasure(measure1); var thirdMeasureBeatOffset = musicDice.GetBeatOffsetForMeasures(measure1, thirdMeasure); var newThirdMeasure = musicDice.GetAdjustedBeatsForNewMeasure(beatsForMeasure1, thirdMeasureBeatOffset); composition.Append(newThirdMeasure).Append("\n"); var newComposition = composition.ToString().Trim(); Approvals.Verify(newComposition); }
public void Measure176HasBeat525UpTo528() { var musicDice = new MusicalDice(sampleCompositionFilePath); var beatsForMeasure176 = musicDice.RetrieveBeatsForMeasure(176); Approvals.Verify(beatsForMeasure176); }
public void Measure22HasBeats63UpTo66() { var musicDice = new MusicalDice(sampleCompositionFilePath); var beatsForMeasure22 = musicDice.RetrieveBeatsForMeasure(22); Approvals.Verify(beatsForMeasure22); }
public void Measure1HasBeats0UpTo3() { var musicDice = new MusicalDice(sampleCompositionFilePath); var beatsForMeasure1 = musicDice.RetrieveBeatsForMeasure(1); Approvals.Verify(beatsForMeasure1); }
public void GenerateRawCompositionFrom22nd176thAnd1stMeasures() { var musicDice = new MusicalDice(sampleCompositionFilePath); var composition = new StringBuilder(); var firstMeasure = musicDice.RetrieveBeatsForMeasure(22); composition.Append(firstMeasure).Append("\n"); var secondMeasure = musicDice.RetrieveBeatsForMeasure(176); composition.Append(secondMeasure).Append("\n"); var thirdMeasure = musicDice.RetrieveBeatsForMeasure(1); composition.Append(thirdMeasure); var rawComposition = composition.ToString().Trim(); Approvals.Verify(rawComposition); }
public void Measure8BeatsCalculatedToBeMeasure13Beats() { var musicDice = new MusicalDice(sampleCompositionFilePath); var currentMeasure = 8; var newMeasure = 13; var currentMeasureBeats = musicDice.RetrieveBeatsForMeasure(currentMeasure); var beatOffset = musicDice.GetBeatOffsetForMeasures(currentMeasure, newMeasure); var newMeasureBeats = musicDice.GetAdjustedBeatsForNewMeasure(currentMeasureBeats, beatOffset); Approvals.Verify(newMeasureBeats); }