/// <summary> /// Calculates the actual time duration, in seconds, for the given tempo that the specified /// source note value will last. For example, if tempo is M.M. 120 crotchets per minute, /// then each crotchet would last a half-second. /// </summary> /// <param name="source">Source note value.</param> /// <param name="dots">Total dotted note length extensions to apply.</param> /// <returns>Actual duration of note value in seconds.</returns> public double CalculateNoteValueTime(NoteValueBritish source, int dots) { return m_noteValueTime * source.Duration(this.NamedNoteValueBritish, dots); }
/// <summary> /// Validates that given note value will fit within this <see cref="MeasureSize"/> for specified beat. /// </summary> /// <param name="noteValue">Named note value to validate.</param> /// <param name="beat">Beat within in measure where note value is trying to fit.</param> /// <param name="dots">Dot length extensions to apply to named note value.</param> public void ValidateNoteValueAtBeat(NoteValueBritish noteValue, int beat, int dots) { ValidateNoteValueAtBeat(noteValue.Duration(dots), beat); }
/// <summary> /// Contructs a new <see cref="Tempo"/> object. /// </summary> /// <param name="totalNoteValues">A <see cref="System.Int32"/> indicating the total note values.</param> /// <param name="noteValue">Named note value used for <see cref="Tempo"/>.</param> public Tempo(int totalNoteValues, NoteValueBritish noteValue) { m_totalNoteValues = totalNoteValues; m_noteValue = noteValue.Duration(); CalculateNoteValueTime(); }
/// <summary> /// Creates a new musical measure defined as the number of beats per note value. /// </summary> /// <param name="beats">A <see cref="Int32"/> representing the beats.</param> /// <param name="noteValue">A <see cref="NoteValueBritish"/> representing the note value.</param> public MeasureSize(int beats, NoteValueBritish noteValue) { m_beats = beats; m_noteValue = noteValue.Duration(); }
/// <summary> /// Calculates the actual time duration, in seconds, for the given tempo that the specified /// source note value will last. For example, if tempo is M.M. 120 crotchets per minute, /// then each crotchet would last a half-second. /// </summary> /// <param name="source">Source note value.</param> /// <param name="dots">Total dotted note length extensions to apply.</param> /// <returns>Actual duration of note value in seconds.</returns> public double CalculateNoteValueTime(NoteValueBritish source, int dots) { return(m_noteValueTime * source.Duration(this.NamedNoteValueBritish, dots)); }
/// <summary> /// Creates a new musical measure defined as the number of beats per note value. /// </summary> public MeasureSize(int beats, NoteValueBritish noteValue) { m_beats = beats; m_noteValue = noteValue.Duration(); }
public void ValidateNoteValueAtBeat(NoteValueBritish noteValue, int beat, int dots) { ValidateNoteValueAtBeat(noteValue.Duration(dots), beat); }