|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.soundhelix.util.NoteUtils
public final class NoteUtils
Implements some static methods for converting notes to pitches and vice versa.
| Method Summary | |
|---|---|
static String |
getNoteName(int pitch)
Returns the note name of the given pitch in lower-case. |
static int |
getNotePitch(String name)
Returns the note pitch of the given note (between 0 and 11), ignoring case. |
static int |
getTransitionPitch(Chord chord,
Chord nextChord)
Returns a transition pitch between the chord and the next chord, which is based on the base pitches of the two chords. |
static boolean |
isOnScale(int pitch)
Returns true iff the given pitch is on the C/Am scale (i.e., a white key on the piano keyboard). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getNoteName(int pitch)
pitch - the pitch
public static int getNotePitch(String name)
name - the note name
public static boolean isOnScale(int pitch)
pitch - the pitch to check
public static int getTransitionPitch(Chord chord,
Chord nextChord)
chord - the current chordnextChord - the next chord (or null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||