Class BeatDivisionScheme
java.lang.Object
com.softsynth.jmsl.score.transcribe.BeatDivisionScheme
public class BeatDivisionScheme
extends java.lang.Object
This class specifies a unique division of a beat (triplet, quintuplet, etc).
Its properties are the number of divisions (5 for quintuplet),
its time span (1 for 8th note triplet, 2 for quarter note triplet, etc), and the minimum number of member required to
qualify (for example, if this number is two for a triplet, then it's ok for only 2/3 members of the triplet to be located in a beat).
- Author:
- Nick Didkovsky, Jan 28, 2002 , (c) 2002 Nick Didkovsky, All Rights reserved.
-
Constructor Summary
Constructors Constructor Description BeatDivisionScheme()
-
Method Summary
Modifier and Type Method Description boolean
getConformToBeat()
Can this beat division scheme fill a beat independently of time signature or beats left? For example, tuplets do not conform to beats.int
getMinRequired()
double
getMinTimeSpan()
int
getNumberOfDivisions()
double
getTimeSpan()
static void
main(java.lang.String[] args)
void
setConformToBeat(boolean b)
Can this beat division scheme fill a beat independently of what beat it start on in the measure? For example, tuplets do not conform to beats.void
setMinRequired(int minRequired)
Set the minimum number of distinct events to qualify this division as valid.void
setMinTimeSpan(double t)
Set the total duration required by this scheme (0.25 for 16th note, 1 for 16th note quintuplet, 1 for 8th note triplets, etc)void
setNumberOfDivisions(int numberOfDivisions)
void
setTimeSpan(double t)
Set the total duration spanned by this scheme (1 for 16th note quintuplet, 1 for 8th note triplets, etc)java.lang.String
toString()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
BeatDivisionScheme
public BeatDivisionScheme()
-
-
Method Details
-
setNumberOfDivisions
public void setNumberOfDivisions(int numberOfDivisions) -
getNumberOfDivisions
public int getNumberOfDivisions() -
setConformToBeat
public void setConformToBeat(boolean b)Can this beat division scheme fill a beat independently of what beat it start on in the measure? For example, tuplets do not conform to beats. They have rigid time spans. Binary 16ths do conform to beats because they can fill a beat no matter what the time signature -
getConformToBeat
public boolean getConformToBeat()Can this beat division scheme fill a beat independently of time signature or beats left? For example, tuplets do not conform to beats. They have rigid time spans. Binary 16ths do conform to beats because they can fill a beat no matter what the time signature- Returns:
- conform to beat flag
-
setTimeSpan
public void setTimeSpan(double t)Set the total duration spanned by this scheme (1 for 16th note quintuplet, 1 for 8th note triplets, etc) -
getTimeSpan
public double getTimeSpan() -
setMinTimeSpan
public void setMinTimeSpan(double t)Set the total duration required by this scheme (0.25 for 16th note, 1 for 16th note quintuplet, 1 for 8th note triplets, etc) -
getMinTimeSpan
public double getMinTimeSpan() -
setMinRequired
public void setMinRequired(int minRequired)Set the minimum number of distinct events to qualify this division as valid. For example, you may set this value to 2 for triplets so that it will consider a triplet made up of an 8th note and a 16th note (as opposed to 3 which would require all 3 16th note triplet members to be present in the music) -
getMinRequired
public int getMinRequired() -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
main
public static void main(java.lang.String[] args)
-