Skip to content

Commit 0f4887c

Browse files
authored
Merge pull request #4 from therewasaguy/jvntf-synths
upgrade tone / use getValueAtTime to fix polysynth voicesInUse
2 parents b4f0144 + 76974d1 commit 0f4887c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
"grunt-open": "^0.2.3"
2020
},
2121
"dependencies": {
22-
"tone": "therewasaguy/tone.js#p5-dev"
22+
"tone": "0.10.0"
2323
}
2424
}

src/polysynth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ define(function (require) {
193193
}
194194

195195

196-
if(this._voicesInUse.value < this.polyValue) {
197-
currentVoice = this._voicesInUse.value;
196+
if(this._voicesInUse.getValueAtTime(t) < this.polyValue) {
197+
currentVoice = this._voicesInUse.getValueAtTime(t);
198198
} else {
199199
currentVoice = this._oldest;
200200

0 commit comments

Comments
 (0)