Exemplo n.º 1
0
        /// <inheritdoc cref="GetNotes(IChord, ChordNoteMappingSource, NotePitch, NotePitch)"/>
        internal static IEnumerable <NotePitch> GetNotes(IChord chord, ChordNoteMappingSource mappingSource, int minOctave = 0, int maxOctave = 9)
        {
            int       basePitch = MusicTheoryServices.SemitonesInOctave;
            NotePitch minPitch  = (NotePitch)(basePitch + (minOctave * MusicTheoryServices.SemitonesInOctave));
            NotePitch maxPitch  = (NotePitch)(basePitch + ((maxOctave + 1) * MusicTheoryServices.SemitonesInOctave) - 1);

            return(MusicTheoryServices.GetNotes(chord, mappingSource, minPitch, maxPitch));
        }
Exemplo n.º 2
0
 public IDuration Subtract(IDuration duration)
 {
     return(MusicTheoryServices.DurationArithmetic(MusicTheoryServices.ArithmeticOperation.Subtract, this, duration)
            .ReduceFractionToLowestTerms());
 }