public class Intervals extends java.lang.Object implements PatternProducer, NoteProducer
Constructor and Description |
---|
Intervals(java.lang.String intervalPattern) |
Modifier and Type | Method and Description |
---|---|
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.
|
static Intervals |
createIntervalsFromNotes(Note[] notes) |
static Intervals |
createIntervalsFromNotes(Pattern pattern) |
static Intervals |
createIntervalsFromNotes(java.lang.String noteString) |
boolean |
equals(java.lang.Object o) |
static int |
getHalfsteps(java.lang.String wholeNumberDegree) |
java.util.List<Note> |
getNotes() |
java.lang.String |
getNthInterval(int n) |
Pattern |
getPattern()
Returns a pattern
|
boolean |
has(Note note)
Returns true if this interval contains the provided note
in any octave.
|
boolean |
has(java.lang.String note)
Returns true if this interval contains the provided note
in any octave.
|
int |
hashCode() |
Intervals |
rotate(int n)
Rotates an interval string by the given value.
|
Intervals |
setRoot(Note root) |
Intervals |
setRoot(java.lang.String root) |
int |
size() |
int[] |
toHalfstepArray() |
java.lang.String |
toString() |
public Intervals setRoot(java.lang.String root)
public Pattern getPattern()
PatternProducer
getPattern
in interface PatternProducer
public java.util.List<Note> getNotes()
getNotes
in interface NoteProducer
public java.lang.String getNthInterval(int n)
public int size()
public static int getHalfsteps(java.lang.String wholeNumberDegree)
public int[] toHalfstepArray()
public Intervals rotate(int n)
public boolean has(java.lang.String note)
public boolean has(Note note)
public Intervals as(java.lang.String asSequence)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static Intervals createIntervalsFromNotes(java.lang.String noteString)