Package org.jfugue.theory
Class Intervals
java.lang.Object
org.jfugue.theory.Intervals
- All Implemented Interfaces:
NoteProducer
,PatternProducer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAccepts a string of replacement values, like $1 $2 $2, which will be populated with the 1st, 2nd, and 2nd intervals when getPattern() is called.static Intervals
createIntervalsFromNotes
(String noteString) static Intervals
createIntervalsFromNotes
(Pattern pattern) static Intervals
createIntervalsFromNotes
(Note[] notes) boolean
static int
getHalfsteps
(String wholeNumberDegree) getNotes()
getNthInterval
(int n) Returns a patternboolean
Returns true if this interval contains the provided note in any octave.boolean
Returns true if this interval contains the provided note in any octave.int
hashCode()
rotate
(int n) Rotates an interval string by the given value.int
size()
int[]
toString()
-
Constructor Details
-
Intervals
-
-
Method Details
-
setRoot
-
setRoot
-
getPattern
Description copied from interface:PatternProducer
Returns a pattern- Specified by:
getPattern
in interfacePatternProducer
-
getNotes
- Specified by:
getNotes
in interfaceNoteProducer
-
getNthInterval
-
size
public int size() -
getHalfsteps
-
toHalfstepArray
public int[] toHalfstepArray() -
rotate
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
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
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
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
-
equals
-
hashCode
public int hashCode() -
createIntervalsFromNotes
-
createIntervalsFromNotes
-
createIntervalsFromNotes
-