com.virtuosotechnologies.asaph.model.notation
Interface NotationFactory


public interface NotationFactory

API providing a factory for notation objects


Method Summary
 Note[] getBaseNotes()
          Get an array of the base notes-- that is, with a default modifier (usually natural).
 Interval[] getCommonIntervals()
          Get an array of the common intervals.
 NoteModifier[] getCommonModifiersForNote(Note note)
          Get an array of common modifiers for the given base note.
 Note getDefaultNote()
          Construct a default Note
 NoteModifier getDefaultNoteModifierFor(Note n)
          Get the default NoteModifier (typically natural) for the given note.
 Chord getEmptyChord()
          Construct an empty Chord
 Chord parseChord(String str)
          Parse a Chord from a String
 Chord[] parseChordArray(String str)
          Parse a Chord array from a String
 Note parseNote(String str)
          Parse a Note from a String
 Note[] parseNoteArray(String str)
          Parse a Note array from a String
 String unparseChordArray(Chord[] chords)
          Generate a string for a chord array
 

Method Detail

getCommonIntervals

public Interval[] getCommonIntervals()
Get an array of the common intervals. This is used to construct choosers for intervals.

Returns:
array of Interval

getBaseNotes

public Note[] getBaseNotes()
Get an array of the base notes-- that is, with a default modifier (usually natural). This is used to construct choosers for notes.

Returns:
array of Note

getCommonModifiersForNote

public NoteModifier[] getCommonModifiersForNote(Note note)
Get an array of common modifiers for the given base note. This is used to construct choosers for notes.

Parameters:
note - Note to modify
Returns:
array of common modifiers for the given note.

getDefaultNoteModifierFor

public NoteModifier getDefaultNoteModifierFor(Note n)
Get the default NoteModifier (typically natural) for the given note.

Parameters:
n - the note
Returns:
default NoteModifier

parseNote

public Note parseNote(String str)
Parse a Note from a String

Parameters:
str - source String
Returns:
resulting Note

parseNoteArray

public Note[] parseNoteArray(String str)
Parse a Note array from a String

Parameters:
str - source String
Returns:
resulting Note array

parseChord

public Chord parseChord(String str)
Parse a Chord from a String

Parameters:
str - source String
Returns:
resulting Chord

parseChordArray

public Chord[] parseChordArray(String str)
Parse a Chord array from a String

Parameters:
str - source String
Returns:
resulting Chord array

unparseChordArray

public String unparseChordArray(Chord[] chords)
Generate a string for a chord array

Parameters:
chords - array of Chords
Returns:
String

getEmptyChord

public Chord getEmptyChord()
Construct an empty Chord

Returns:
new empty Chord

getDefaultNote

public Note getDefaultNote()
Construct a default Note

Returns:
new Note