abc.notation
Class Tempo

java.lang.Object
  extended byabc.notation.Tempo
All Implemented Interfaces:
ScoreElementInterface

public class Tempo
extends java.lang.Object
implements ScoreElementInterface

The tempo class enables you to define tempo values from a reference note length.


Constructor Summary
Tempo(int notesNbPerMinute)
          Creates a tempo object with the specified tempo value and quarter as length reference.
Tempo(short referenceLength, int value)
          Creates a tempo object with the specified tempo value and the specified length reference.
 
Method Summary
 int getNotesNumberPerMinute()
          Returns the number of note per minutes considering that those notes' length is the reference length.
 int getNotesNumberPerMinute(short refLength)
          Returns the tempo for the given length as reference.
 short getReference()
          Returns the reference length used to express this tempo.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tempo

public Tempo(int notesNbPerMinute)
Creates a tempo object with the specified tempo value and quarter as length reference.

Parameters:
notesNbPerMinute - The number of quarter notes per minutes.

Tempo

public Tempo(short referenceLength,
             int value)
Creates a tempo object with the specified tempo value and the specified length reference.

Parameters:
referenceLength - The reference length.
value - The number of reference lengths per minutes.
Method Detail

getReference

public short getReference()
Returns the reference length used to express this tempo.

Returns:
The reference length used to express this tempo. Possible values are Note.SIXTY_FOURTH, Note.THIRTY_SECOND ... or Note.WHOLE.

getNotesNumberPerMinute

public int getNotesNumberPerMinute()
Returns the number of note per minutes considering that those notes' length is the reference length.

Returns:
the number of note per minutes considering that those notes' length is the reference length.

getNotesNumberPerMinute

public int getNotesNumberPerMinute(short refLength)
Returns the tempo for the given length as reference.

Parameters:
refLength - The note length in which this tempo should be expressed.
Returns:
The number of notes of the specified length per minutes.