musiccreator
Class Beat

java.lang.Object
  extended by musiccreator.Beat

public class Beat
extends java.lang.Object

Implements the Beat class. A beat is a unit of rhythm containing a length (in 8th notes) and a name.


Constructor Summary
Beat()
          Creates a new instance of Beat with a default length of one 8th note and unemphasized.
Beat(int l, boolean b)
          Creates a new instance of Beat with a set length.
 
Method Summary
 int getLength()
          Get the musical length of the Beat in 8th notes.
 boolean getVelocity()
          Get velocity of beat.
 void setVelocity(boolean v)
          Set the velocity of the beat.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Beat

public Beat()
Creates a new instance of Beat with a default length of one 8th note and unemphasized.


Beat

public Beat(int l,
            boolean b)
Creates a new instance of Beat with a set length.

Parameters:
l - length of beat in 8th notes.
b - velocity of beat
Method Detail

getLength

public final int getLength()
Get the musical length of the Beat in 8th notes.

Returns:
length of Beat in 8th notes

getVelocity

public final boolean getVelocity()
Get velocity of beat.

Returns:
velocity of beat; true=emphasized, false=not emphasized

setVelocity

public void setVelocity(boolean v)
Set the velocity of the beat.

Parameters:
v - True=beat is emphasized, false=beat not emphasized