PauseTreatment() public method

The pause treatment.
/// Thrown if paramPauseTreatment is unknown. ///
public PauseTreatment ( ParamPauseTreatment paramPauseTreatment ) : Fmotiv
paramPauseTreatment ParamPauseTreatment /// The param pause treatment. ///
return Fmotiv
コード例 #1
0
 public void FmotivWithoutPausesSecondTest()
 {
     // проверка работы метода, который возвращает копию объекта (Fmotiv), только без пауз.
     var fmotiv = new Fmotiv("ПМТ", 0);
     fmotiv.NoteList.Add(new ValueNote((Pitch)null, new Duration(1, 4, false, 480), false, Tie.None));
     fmotiv.NoteList.Add(new ValueNote((Pitch)null, new Duration(1, 4, false, 480), false, Tie.None));
     fmotiv.NoteList.Add(new ValueNote(new Pitch(1, 'A', 0), new Duration(1, 2, false, 480), false, Tie.None));
     fmotiv.NoteList.Add(new ValueNote(new Pitch(1, 'A', 0), new Duration(1, 2, false, 480), false, Tie.None));
     fmotiv.NoteList.Add(new ValueNote((Pitch)null, new Duration(1, 4, false, 480), false, Tie.None));
     fmotiv.NoteList.Add(new ValueNote(new Pitch(1, 'A', 0), new Duration(1, 2, false, 480), false, Tie.None));
     Assert.AreEqual(fmotiv.PauseTreatment((int)ParamPauseTreatment.Ignore).NoteList[0].Pitch[0].Step, 'A');
     Assert.AreEqual(fmotiv.PauseTreatment((int)ParamPauseTreatment.Ignore).NoteList[1].Pitch[0].Step, 'A');
     Assert.AreEqual(fmotiv.PauseTreatment((int)ParamPauseTreatment.Ignore).NoteList[2].Pitch[0].Step, 'A');
     Assert.AreEqual(fmotiv.PauseTreatment((int)ParamPauseTreatment.Ignore).NoteList.Count, 3);
 }
コード例 #2
0
 /// <summary>
 /// The extract note list.
 /// </summary>
 /// <param name="fmotivBuffer">
 /// The fmotiv buffer.
 /// </param>
 /// <returns>
 /// The <see cref="List{ValueNote}"/>.
 /// </returns>
 private List<ValueNote> ExtractNoteList(Fmotiv fmotivBuffer)
 {
     return fmotivBuffer.PauseTreatment(paramPauseTreatment).TieGathered().NoteList;
 }