mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-27 21:48:27 +00:00
add duration getter
This commit is contained in:
parent
f8f2fb608d
commit
9ef57152e4
@ -138,6 +138,10 @@ class Hap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get duration() {
|
||||||
|
return this.whole.end.sub(this.whole.begin).valueOf();
|
||||||
|
}
|
||||||
|
|
||||||
withSpan(func) {
|
withSpan(func) {
|
||||||
// Returns a new event with the function f applies to the event timespan.
|
// Returns a new event with the function f applies to the event timespan.
|
||||||
const whole = this.whole ? func(this.whole) : undefined
|
const whole = this.whole ? func(this.whole) : undefined
|
||||||
@ -1034,7 +1038,6 @@ Pattern.prototype.bootstrap = function() {
|
|||||||
}
|
}
|
||||||
return [functionName, curry(composable, makeComposable)];
|
return [functionName, curry(composable, makeComposable)];
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// note: this === Pattern.prototypetgh6z
|
// note: this === Pattern.prototypetgh6z
|
||||||
this.patternified.forEach((prop) => {
|
this.patternified.forEach((prop) => {
|
||||||
// the following will patternify all functions in Pattern.prototype.patternified
|
// the following will patternify all functions in Pattern.prototype.patternified
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user