Package org.jfugue.provider
Interface KeyProvider
-
- All Known Implementing Classes:
SignatureSubparser
public interface KeyProvider
This interface must be implemented by the parser responsible for Staccato strings.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte
convertAccidentalCountToKeyRootPositionInOctave(int accidentalCount, byte scale)
Turns number of accidentals (negative for flats, positive for sharps) to a key and returns the key's root note's position in the octavebyte
convertKeyToByte(Key key)
Converts the given Key to a byte value, from -7 for Cb major or Ab major to +7 for C# minor or A# minor, with 0 being C major or A minorKey
createKey(java.lang.String keySignature)
Given a key signature, like "Cmaj" or "Kbbbb", return the corresponding Keyjava.lang.String
createKeyString(byte notePositionInOctave, byte scale)
Creates a key name, like Cmaj, given the root note's position in an octave (e.g., 0 for C) and a major or minor indicator - @see Scale MAJOR_SCALE_INDICATOR and MINOR_SCALE_INDICATOR
-
-
-
Method Detail
-
createKey
Key createKey(java.lang.String keySignature)
Given a key signature, like "Cmaj" or "Kbbbb", return the corresponding Key
-
createKeyString
java.lang.String createKeyString(byte notePositionInOctave, byte scale)
Creates a key name, like Cmaj, given the root note's position in an octave (e.g., 0 for C) and a major or minor indicator - @see Scale MAJOR_SCALE_INDICATOR and MINOR_SCALE_INDICATOR
-
convertAccidentalCountToKeyRootPositionInOctave
byte convertAccidentalCountToKeyRootPositionInOctave(int accidentalCount, byte scale)
Turns number of accidentals (negative for flats, positive for sharps) to a key and returns the key's root note's position in the octave
-
convertKeyToByte
byte convertKeyToByte(Key key)
Converts the given Key to a byte value, from -7 for Cb major or Ab major to +7 for C# minor or A# minor, with 0 being C major or A minor
-
-