uk.org.toot.music.timing
Class ConventionalTimingStrategy
java.lang.Object
uk.org.toot.music.timing.AbstractTimingStrategy
uk.org.toot.music.timing.ConventionalTimingStrategy
- All Implemented Interfaces:
- TimingStrategy
public class ConventionalTimingStrategy
- extends AbstractTimingStrategy
Generate conventional timing using recursive binary subdivision.
Always has a beat on ONE.
If the meter is 4/4, 2/4 or 8/4 the whole bar is subdivided in one action.
Otherwise the first part of the bar with the longest binary note length
is subdivided and the remaining part is iteratively subdivided into binary related
note lengths. e.g. 7/4 is divided into a whole note followed by half note
followed by an eighth note.
- Author:
- st
Method Summary |
java.util.BitSet |
createTiming(int nTicks)
Return a BitSet containing a bit for each tick of a bar. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConventionalTimingStrategy
public ConventionalTimingStrategy(float density,
int minnotelen,
float serialDensity)
- Parameters:
density
- the probability of subdividing a barminnotelen
- the minimum note length to subdivide toserialDensity
- the probability of serial subdivisions
createTiming
public java.util.BitSet createTiming(int nTicks)
- Description copied from interface:
TimingStrategy
- Return a BitSet containing a bit for each tick of a bar.
- Parameters:
nTicks
- the number of ticks in a bar
- Returns:
- BitSet of ticks, true if if a note starts on that tick
Copyright © 2004, 2005, 2006, 2007 Steve Taylor. All Rights Reserved.