public class Structure
- extends Object
Defines the immutable logical structure of a song. The logical structure consists of the song's signature details (internal note quantization, song
The main unit is a beat. Beats are divided into ticks (usually 4 ticks form a beat), and beats are grouped into bars (usually 4 beats form a bar),
and an integer number of bars forms the song. Ticks are the smallest units of a song.
The song signature is defined by specifying the total number of bars, the number of beats per bar and the number of ticks per beat.
Each point in time within the song is addressed by its tick number (counted from 0). Beats, bars, ticks within a beat and beats within a bar can be
derived by using the ticks per beat and the beats per bar, if necessary.
Each component must be ready to handle at least the following ticks per beat: 1, 2, 3, 4, 6, 8, 12, 16. For most music types, 3 (3/4 bars) or 4
(4/4 bars) ticks per beat will be fine. In order to mix 3/4 with 4/4 notes, one might consider using 12 ticks per beat, so that quarter notes (3
ticks) and third notes (4 ticks) can be used at the same time.
- Thomas Schuerger (firstname.lastname@example.org)
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Structure(int bars,
bars - the number of bars
beatsPerBar - the number of beats per bar
ticksPerBeat - the number of ticks per beat
public int getBeatsPerBar()
public int getTicksPerBeat()
public int getTicks()
public int getTicksPerBar()
public int getBars()
public int getMaxVelocity()