Previous  Next          Package

Class MIDICompose.Ramp

java.lang.Object
   |
   +----MIDICompose.MIDIObject
           |
           +----MIDICompose.MIDIContainer
                   |
                   +----MIDICompose.Ramp

public class Ramp
extends MIDIContainer
implements Channelable, Lengthable

A Ramp is used to create a course of Amountable instances. Every Ramp needs an Amountable object as parameter which will be the first element in the Ramp. This element will be copied several (steps) times and added with other amount- and deltaTime-values to the Ramp. The difference in amount between each element is constant. The difference in time is depending on the curve-type.

Variable Index

 o EXP
Exponential curve.
 o LINEAR
Linear curve.
 o LOG
Logarithmic curve.
 o SOFT
Soft curve.

Constructor Index

 o Ramp(int, Amountable, int)
Creates new Ramp with length, Amountable-object and end-amount.
 o Ramp(int, Amountable, int, int, int)
Creates new Ramp with length, object, end, curve and steps.
 o Ramp(int, int, int, Amountable, int, int, int)
Creates new Ramp with deltaTime, channel, length, object, end, curve and steps.
 o Ramp(Ramp)
Creates new Ramp that is equal to parameter-Ramp.

Method Index

All methods from interfaces are implemented, but not listed here!
 o curve()
Returns current curve-type.
 o setCurve(int)
Sets curve-type.

Variables

 o LINEAR
 public static final int LINEAR
Amountable-elements are set in time: 0__1__2__3__4__5__6__7__8__9
 o SOFT
 public static final int SOFT
Amountable-elements are set in time: 0___1___2__3_45_6__7___8___9
 o EXP
 public static final int EXP
Amountable-elements are set in time: 0_______1_____2___3__4_56789
 o LOG
 public static final int LOG
Amountable-elements are set in time: 01234_5__6___7_____8_______9

Constructors

 o Ramp
 public Ramp(int length,
             Amountable object,
             int end)
Creates a new SOFT-Ramp with SIXTEENTH-stepsize.

Parameters:
length - any int (>= 0).
object - any Amountable (Ramps first element).
end - any int between object.MIN and object.MAX (Ramps last amount-value).
 o Ramp
 public Ramp(int length,
             Amountable object,
             int end,
             int curve,
             int steps)
Creates a new Ramp.

Parameters:
length - any int (>= 0).
object - any Amountable (Ramps first element).
end - any int between object.MIN and object.MAX (Ramps last amount-value).
curve - LINEAR, SOFT, LOG or EXP.
steps - any int (> 0).
 o Ramp
 public Ramp(int deltaTime,
             int channel,
             int length,
             Amountable object,
             int end,
             int curve,
             int steps)
Creates a new Ramp.

Parameters:
deltaTime - any int (>= 0).
channel - any int between 0 and 15 (CHAN_1...CHAN_16).
length - any int (>= 0).
object - any Amountable (Ramps first element).
end - any int between object.MIN and object.MAX (Ramps last amount-value).
curve - LINEAR, SOFT, LOG or EXP.
steps - any int (> 0).
 o Ramp
 protected Ramp(Ramp object)
Creates a new Ramp equal to another Ramp.

Parameters:
object - any Ramp that will be copied.

Methods

 o curve
 public int curve()
Returns the current curve-type.

Returns:
LINEAR, SOFT, EXP or LOG.
 o setCurve
 public void setCurve(int curve)
Sets curve-type.

Parameters:
curve - LINEAR, SOFT, EXP or LOG.

 Previous  Next          Package