com.softsynth.jmsl.score
Class KeySignature
java.lang.Object
com.softsynth.jmsl.score.KeySignature
public class KeySignature
- extends java.lang.Object
- Author:
- Nick Didkovsky, (c) 2004 All rights reserved, Email: didkovn@mail.rockefeller.edu
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
KEYSIG_SHARP_NAMES
public static final java.lang.String[] KEYSIG_SHARP_NAMES
KEYSIG_FLAT_NAMES
public static final java.lang.String[] KEYSIG_FLAT_NAMES
SHARP_KEY
public static final int SHARP_KEY
- See Also:
- Constant Field Values
FLAT_KEY
public static final int FLAT_KEY
- See Also:
- Constant Field Values
KeySignature
public KeySignature()
setKeySignatureType
public void setKeySignatureType(int sharpOrFlat)
- Set key signature type to SHARP_KEY or FLAT_KEY
getKeySignatureType
public int getKeySignatureType()
setNumAccidentals
public void setNumAccidentals(int numAcc)
- Set number of sharps or flats in this key signature (0 for C maj)
getNumAccidentals
public int getNumAccidentals()
- Returns:
- number of sharps or flats in this key signature (0 if C major)
getPitch
public int getPitch(int accNum)
- Returns:
- pitch in sharp/flat array for this key sig. Checks if flat or sharp.
keyNameToKeySignature
public static KeySignature keyNameToKeySignature(java.lang.String keyName)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object