uk.org.toot.midi.sequence
Class TimeSignatureList

java.lang.Object
  extended by uk.org.toot.midi.sequence.TimeSignatureList

public class TimeSignatureList
extends java.lang.Object

A List of Time Signatures with methods to ease use


Constructor Summary
TimeSignatureList(int resolution)
           
 
Method Summary
 boolean add(javax.sound.midi.MidiEvent event)
           
 java.util.Iterator beatIterator(long tick)
           
 int getBeatsPerBar(int index)
           
 int getBeatsPerBar(long tick)
           
 javax.sound.midi.MidiEvent getEvent(int index)
           
 int getIndex(long tick)
          Return the index of the time signature for this tick, or -1
 int getIndex(SequencePosition position)
          Return the index of the time signature for this position, or -1
 SequencePosition getPosition(long tick)
          Return a SequencePosition representing the tick
 int getStartBar(int index)
          With this we can linearise each time signature relative to the preceeding integration of bars
 long getTick(int index)
           
 long getTick(SequencePosition position)
          The inverse of getPosition.
 void setBarOffset(int offset)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeSignatureList

public TimeSignatureList(int resolution)
Method Detail

add

public boolean add(javax.sound.midi.MidiEvent event)

getIndex

public int getIndex(long tick)
Return the index of the time signature for this tick, or -1


getIndex

public int getIndex(SequencePosition position)
Return the index of the time signature for this position, or -1


setBarOffset

public void setBarOffset(int offset)

getPosition

public SequencePosition getPosition(long tick)
Return a SequencePosition representing the tick


getTick

public long getTick(SequencePosition position)
The inverse of getPosition. !!! HANDLE Div4 and Div16 !!!!!


getTick

public long getTick(int index)

getStartBar

public int getStartBar(int index)
With this we can linearise each time signature relative to the preceeding integration of bars


getBeatsPerBar

public int getBeatsPerBar(int index)

getBeatsPerBar

public int getBeatsPerBar(long tick)

getEvent

public javax.sound.midi.MidiEvent getEvent(int index)

beatIterator

public java.util.Iterator beatIterator(long tick)


Copyright © 2004, 2005, 2006, 2007 Steve Taylor. All Rights Reserved.