default
core
core
core.Envelope
get() : float
- Return (interpolated) value and reset new_event flag (SH, SHRESET).
getAndResetNew(boolean ) : float
- Return (interpolated) value. Only reset new event flag if bResetNew is true.
getDeltaTime() : float
- Return delta time to the next event
getInterpolation() : int
- Return current interpolation function.
getNextEventTimeAfter(float t) : float
- Return absolute time of event after _t, or -1 if there is no event.
getSpeed() : float
- Return the current envelope base speed.
getTime() : float
- Return the current time offset.
indexToTime(int event) : float
- Return the absolute time offset of the given event number.
insertReplaceEvent(float t, v, w)
- Insert or replace an event at the given time offset.
insertReplaceEventLSB4(float t, byte v, float w)
- Insert or replace part of an (8bit) event at the given time offset (least significant nibble).
insertReplaceEventMSB4(float t, byte v, float w)
- Insert or replace part of an (8bit) event at the given time offset (most significant nibble).
insertReplaceEventPat1(float t, byte v, float w)
- Insert or replace part of an (7bit) event, formatted as '01A'..'32D' at the given time offset.
insertReplaceEventPat2(float t, byte v, float w)
- Insert or replace part of an (7bit) event, formatted as '01A'..'32D' at the given time offset.
insertReplaceEventPat3(float t, byte v, float w)
- Insert or replace part of an (7bit) event, formatted as '01A'..'32D' at the given time offset.
isNewEvent() : boolean
- Check whether the last tickPrecise()
call hit a new key event.
removeEvent(float t)
- Remove event at the given time offset and shift all succeeding events.
removeRange(float t, len)
- Remove all events within the given time window and shift the succeeding events.
removeRangeSH(float t, len)
- Remove range of sample&hold style envelope.
removeRangeUntilNext(float t, len, maxT)
- Remove range until next event and keep abstime of following event (if any)
reset()
- Reset time offset
rotateEvents(float r, startT, maxT)
- Rotate events within (startT..maxT) by delta time 'r'.
setInterpolation(int interpol)
- Set the interpolation function.
setSpeed(float speed)
- Set envelope base speed.
setTime(float t)
- Seek to the current time offset.
shiftEvents(float t, l)
- Shift all events after the given time offset by the given number of ticks.
shiftNextEvent(float t, l, maxT)
- Shift only next event and keep abstime of following event (if any / in range t..maxT)
tickPrecise(float dt)
- Increase time offset by the given time delta.
timeToIndex(float t) : int
- Return the last event number (not array offset!) before the given time offset.
valueAtTimeRaster(float t, res) : var
- Return the value at the given absolute time offset in the given time window.
valueAtTimeSH(float t) : var
- Return the value of the last event before the given point in time.
ENV_COSINE
- Cosine interpolation
ENV_CUBIC
- Cubic interpolation
ENV_LINEAR
- Linear interpolation.
ENV_QUADRATIC
- Quadratic interpolation.
ENV_QUINTIC
- Quintic interpolation
ENV_SH
- Sample and hold (no interpolation)
ENV_SHRESET
- Sample and hold + reset (no interpolation).
Most of the methods assume that time is actually a number of ticks, i.e. an integer number.
The current time offset may be a fractional number resulting in a smooth interpolation of successive event values if the current interpolation function is set to something other than ENV_SHRESET
or ENV_SH
.
Method get | |||||
Return (interpolated) value and reset new_event flag (SH, SHRESET). | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getAndResetNew | ||||||||||
Return (interpolated) value. Only reset new event flag if bResetNew is true. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getDeltaTime | |||||
Return delta time to the next event | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getInterpolation | |||||
Return current interpolation function. | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getNextEventTimeAfter | ||||||||||
Return absolute time of event after _t, or -1 if there is no event. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getSpeed | |||||
Return the current envelope base speed. | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getTime | |||||
Return the current time offset. | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method indexToTime | ||||||||||
Return the absolute time offset of the given event number. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method insertReplaceEvent | ||||||||||||||||||||
Insert or replace an event at the given time offset. | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Description | ||||||||||||||||||||
Keep deltatime if event already exists within [t..t+w]. |
Method insertReplaceEventLSB4 | ||||||||||||||||||||
Insert or replace part of an (8bit) event at the given time offset (least significant nibble). | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Description | ||||||||||||||||||||
Keep deltatime if event already exists within [t..t+w]. |
Method insertReplaceEventMSB4 | ||||||||||||||||||||
Insert or replace part of an (8bit) event at the given time offset (most significant nibble). | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Description | ||||||||||||||||||||
Keep deltatime if event already exists within [t..t+w]. |
Method insertReplaceEventPat1 | ||||||||||||||||||||
Insert or replace part of an (7bit) event, formatted as '01A'..'32D' at the given time offset. | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Description | ||||||||||||||||||||
Keep deltatime if event already exists within [t..t+w]. |
Method insertReplaceEventPat2 | ||||||||||||||||||||
Insert or replace part of an (7bit) event, formatted as '01A'..'32D' at the given time offset. | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Description | ||||||||||||||||||||
Keep deltatime if event already exists within [t..t+w]. |
Method insertReplaceEventPat3 | ||||||||||||||||||||
Insert or replace part of an (7bit) event, formatted as '01A'..'32D' at the given time offset. | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Description | ||||||||||||||||||||
Keep deltatime if event already exists within [t..t+w]. |
Method isNewEvent | |||||
Check whether the last tickPrecise() call hit a new key event. | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method removeEvent | |||||
Remove event at the given time offset and shift all succeeding events. | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method removeRange | |||||||||||||||
Remove all events within the given time window and shift the succeeding events. | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
|
Method removeRangeSH | |||||||||||||||
Remove range of sample&hold style envelope. | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
| |||||||||||||||
Description | |||||||||||||||
In contrary to removeRange() , events will only be delete if they are entirely with the given range. If only covered partly, their delta times will be adjusted. |
Method removeRangeUntilNext | ||||||||||||||||||||
Remove range until next event and keep abstime of following event (if any) | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
|
Method reset | |||
Reset time offset | |||
Signature | |||
|
Method rotateEvents | ||||||||||||||||||||
Rotate events within (startT..maxT) by delta time 'r'. | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
|
Method setInterpolation | |||||
Set the interpolation function. | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setSpeed | |||||
Set envelope base speed. | |||||
Signature | |||||
| |||||
Arguments | |||||
| |||||
Description | |||||
The default speed is 1.0f |
Method setTime | |||||
Seek to the current time offset. | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method shiftEvents | |||||||||||||||
Shift all events after the given time offset by the given number of ticks. | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
|
Method shiftNextEvent | ||||||||||||||||||||
Shift only next event and keep abstime of following event (if any / in range t..maxT) | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
|
Method tickPrecise | |||||
Increase time offset by the given time delta. | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method timeToIndex | ||||||||||
Return the last event number (not array offset!) before the given time offset. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method valueAtTimeRaster | ||||||||||||||||||||
Return the value at the given absolute time offset in the given time window. | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Returns | ||||||||||||||||||||
|
Method valueAtTimeSH | ||||||||||
Return the value of the last event before the given point in time. | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Constant ENV_COSINE () | |
Cosine interpolation | |
Description | |
y = y1 + (y2 - y1) * (1 - cos(PI * x)) / 2 | |
Constant ENV_CUBIC () | |
Cubic interpolation | |
Description | |
y = (y1 + y3 - (y0 + y2) * x3 + (2 * (y0 - y1) + y2 - y3) * x2 + (y2 - y0) * x + y1 | |
Constant ENV_LINEAR () | |
Linear interpolation. | |
Description | |
y = y1 + (y2 - y1) * x | |
Constant ENV_QUADRATIC () | |
Quadratic interpolation. | |
Description | |
y = (y1 + (y2 - y1) * x) * (1 - x2) + (y2 + (y3 - y2) * (x - 1)) * x2 | |
Constant ENV_QUINTIC () | |
Quintic interpolation | |
Description | |
y = 3 * (y1 + y3 - y2 - y4) * x5 + (8 * (y2 - y1) + 7 * (y4 - y3)) * x4 + (6 * (y1 - y2) + 4 * (y3 - y4)) * x3 + (y3 - y1) * x + y2 | |
Constant ENV_SH () | |
Sample and hold (no interpolation) | |
Constant ENV_SHRESET () | |
Sample and hold + reset (no interpolation). | |
Description | |
After reading a new key value, reset current value back to 0. Useful for one-shot triggers. | |
auto-generated by "DOG", the TkScript document generator. Mon, 28/Dec/2015 13:15:54