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 IntervalscreateIntervalsFromNotes(String noteString) static IntervalscreateIntervalsFromNotes(Pattern pattern) static IntervalscreateIntervalsFromNotes(Note[] notes) booleanstatic intgetHalfsteps(String wholeNumberDegree) getNotes()getNthInterval(int n) Returns a patternbooleanReturns true if this interval contains the provided note in any octave.booleanReturns true if this interval contains the provided note in any octave.inthashCode()rotate(int n) Rotates an interval string by the given value.intsize()int[]toString()
-
Constructor Details
-
Intervals
-
-
Method Details
-
setRoot
-
setRoot
-
getPattern
Description copied from interface:PatternProducerReturns a pattern- Specified by:
getPatternin interfacePatternProducer
-
getNotes
- Specified by:
getNotesin 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
-
toString
-
equals
-
hashCode
-
createIntervalsFromNotes
-
createIntervalsFromNotes
-
createIntervalsFromNotes
-