abc.notation
Class TimeSignature
java.lang.Object
abc.notation.Fraction
abc.notation.TimeSignature
- All Implemented Interfaces:
- ScoreElementInterface
- public class TimeSignature
- extends Fraction
- implements ScoreElementInterface
This class enables you to describe any time signatures like 4/4, 6/8 ...
Constructor Summary |
TimeSignature(int num,
int den)
Creates a new time signature with the specified parameters. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TimeSignature
public TimeSignature(int num,
int den)
- Creates a new time signature with the specified parameters.
- Parameters:
num
- The number of beat in a bar.den
- The type of those beats.
getDefaultNoteLength
public short getDefaultNoteLength()
- Returns the default note length for this time signature.
- Returns:
- The default note length for this time signature.
The default note length is equals to Note.SIXTEENTH when the
time signature decimal conversion value is strictly less than 0.75.
If it's higher, the default is Note.EIGHTH.
isCoumpound
public boolean isCoumpound()
- Return true if this time signature if compound, false
otherwise.
- Returns:
- true if this time signature if compound, false
otherwise. Compound time signatures are 3/4, 3/8, 9/8 etc... simple time
signatures are C, 4/4, 2/4 etc...
getNumberOfDefaultNotesPerBeat
public int getNumberOfDefaultNotesPerBeat(short defaultLength)