Previous  Next          Package

Class MIDICompose.Tempo

java.lang.Object
   |
   +----MIDICompose.MIDIObject
           |
           +----MIDICompose.MIDIEvent
                   |
                   +----MIDICompose.MetaEvent
                           |
                           +----MIDICompose.Tempo

public class Tempo
extends MetaEvent
implements Amountable

Use Tempo to change or set the speed. Tempo is an Amountable class, but the amount-value is a double-value instead of an int. So there are further methods to set the tempo with a double value. But you can also use the Amountable-methods and set tempo with an int.

Variable Index

 o MIN
20 BPM (int).
 o MAX
300 BPM (int).
 o ZERO
120 BPM (int).
 o SLOWLY
70 BPM (double).
 o MODERATELY
120 BPM (double).
 o FAST
180 BPM (double).

Constructor Index

 o Tempo(double)
Creates new Tempo with tempo.
 o Tempo(int, double)
Creates new Tempo with deltaTime and tempo.

Method Index

All methods from interfaces are implemented, but not listed here!
Amountable-methods for reading and setting tempo only use int values!
 o setTempo(double)
Sets tempo.
 o tempo()
Returns current tempo.

Constructors

 o Tempo
 public Tempo(double tempo)
Creates a new Tempo.

Parameters:
tempo - any double between MIN and MAX.
 o Tempo
 public Tempo(int deltaTime,
              double tempo)
Creates a new Tempo.

Parameters:
deltaTime - any int (>= 0).
tempo - any double between MIN and MAX.

Methods

 o tempo
 public double tempo()
Returns the current tempo.

Returns:
an double between MIN and MAX.
 o setTempo
 public void setTempo(double tempo)
Sets the tempo.

Parameters:
tempo - any double between MIN and MAX.

 Previous  Next          Package