mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
.value
returns the scheduled value at time=now
This commit is contained in:
parent
366e61562f
commit
18b2136148
2 changed files with 4 additions and 2 deletions
|
@ -124,7 +124,7 @@ define(["Tone/core/Tone", "Tone/signal/TimelineSignal",
|
|||
*/
|
||||
Object.defineProperty(Tone.Envelope.prototype, "value", {
|
||||
get : function(){
|
||||
return this._sig.value;
|
||||
return this.getValueAtTime(this.now());
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -54,7 +54,9 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/core/Timeline"], function
|
|||
*/
|
||||
Object.defineProperty(Tone.TimelineSignal.prototype, "value", {
|
||||
get : function(){
|
||||
return this._toUnits(this._param.value);
|
||||
var now = this.now();
|
||||
var val = this.getValueAtTime(now);
|
||||
return this._toUnits(val);
|
||||
},
|
||||
set : function(value){
|
||||
var convertedVal = this._fromUnits(value);
|
||||
|
|
Loading…
Reference in a new issue