From 5a485b466779e26259323173f453275bece79713 Mon Sep 17 00:00:00 2001 From: Gubolin Date: Mon, 4 Aug 2014 12:17:32 +0200 Subject: mute notes --- threads.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'threads.js') diff --git a/threads.js b/threads.js index 56ff45a..5347110 100644 --- a/threads.js +++ b/threads.js @@ -2717,6 +2717,12 @@ Process.prototype.doPlayNote = function (pitch, beats) { Process.prototype.doPlayNoteForSecs = function (pitch, secs) { // interpolated var volume = this.homeContext.receiver.volume; + var muted = this.homeContext.receiver.parentThatIsA(StageMorph).muted; + + if (muted === true) { + volume = 0; + } + if (!this.context.startTime) { this.context.startTime = Date.now(); this.context.activeNote = new Note(pitch); -- cgit v1.3.1