jcaas.midi
Class Tempo

java.lang.Object
  extended by jcaas.midi.StaffProperty
      extended by jcaas.midi.Tempo

public class Tempo
extends StaffProperty

Tempo represents the tempo, or speed of a song. The unit is beats per minute. Extends StaffProperty since it may be set/got by methods in Song.

Version:
last updated: 4/17/05
Author:
Conrad Hutcheson

Constructor Summary
Tempo()
          Default constructor, sets the speed to 0.
Tempo(int speed)
          Constructor that takes an integer holding the speed to represent.
 
Method Summary
 java.lang.String getName()
          Returns the name for this type of Staff Property
 int getTempo()
          Returns the number of beats per minute represented by this song.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tempo

public Tempo()
Default constructor, sets the speed to 0.


Tempo

public Tempo(int speed)
Constructor that takes an integer holding the speed to represent. Set the tempo to that speed.

Parameters:
speed - the int number of beats per minute that this tempo represents.
Method Detail

getTempo

public int getTempo()
Returns the number of beats per minute represented by this song.

Returns:
the int number of beats per minute represented by this Tempo.

getName

public java.lang.String getName()
Description copied from class: StaffProperty
Returns the name for this type of Staff Property

Specified by:
getName in class StaffProperty
Returns:
a string name