Class Intervals

    • Constructor Detail

      • Intervals

        public Intervals​(java.lang.String intervalPattern)
    • Method Detail

      • setRoot

        public Intervals setRoot​(java.lang.String root)
      • getNthInterval

        public java.lang.String getNthInterval​(int n)
      • size

        public int size()
      • getHalfsteps

        public static int getHalfsteps​(java.lang.String wholeNumberDegree)
      • toHalfstepArray

        public int[] toHalfstepArray()
      • rotate

        public Intervals rotate​(int n)
        Rotates an interval string by the given value. For example, with an Interval like "1 3 5" and rotate(1), this would return "3 5 1" (not "5 1 3").
      • has

        public boolean has​(java.lang.String note)
        Returns true if this interval contains the provided note in any octave. Requires that the interval has a root; the octave of the root or the provided values are ignored.
      • has

        public boolean has​(Note note)
        Returns true if this interval contains the provided note in any octave. Requires that the interval has a root; the octave of the root or the provided values are ignored.
      • as

        public Intervals as​(java.lang.String asSequence)
        Accepts a string of replacement values, like $1 $2 $2, which will be populated with the 1st, 2nd, and 2nd intervals when getPattern() is called.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • createIntervalsFromNotes

        public static Intervals createIntervalsFromNotes​(Pattern pattern)
      • createIntervalsFromNotes

        public static Intervals createIntervalsFromNotes​(java.lang.String noteString)
      • createIntervalsFromNotes

        public static Intervals createIntervalsFromNotes​(Note[] notes)