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.
-
EXP
- Exponential curve.
-
LINEAR
- Linear curve.
-
LOG
- Logarithmic curve.
-
SOFT
- Soft curve.
-
Ramp(int, Amountable, int)
- Creates new Ramp with length, Amountable-object and end-amount.
-
Ramp(int, Amountable, int, int, int)
- Creates new Ramp with length, object, end, curve and steps.
-
Ramp(int, int, int, Amountable, int, int, int)
- Creates new Ramp with deltaTime, channel, length, object, end, curve and steps.
-
Ramp(Ramp)
- Creates new Ramp that is equal to parameter-Ramp.
All methods from interfaces are implemented, but not listed here!
-
curve()
- Returns current curve-type.
-
setCurve(int)
- Sets curve-type.
LINEAR
public static final int LINEAR
- Amountable-elements are set in time: 0__1__2__3__4__5__6__7__8__9
SOFT
public static final int SOFT
- Amountable-elements are set in time: 0___1___2__3_45_6__7___8___9
EXP
public static final int EXP
- Amountable-elements are set in time: 0_______1_____2___3__4_56789
LOG
public static final int LOG
- Amountable-elements are set in time: 01234_5__6___7_____8_______9
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).
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).
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).
Ramp
protected Ramp(Ramp object)
- Creates a new Ramp equal to another Ramp.
- Parameters:
- object - any Ramp that will be copied.
curve
public int curve()
- Returns the current curve-type.
- Returns:
- LINEAR, SOFT, EXP or LOG.
setCurve
public void setCurve(int curve)
- Sets curve-type.
- Parameters:
- curve - LINEAR, SOFT, EXP or LOG.
Previous Next Package