diff --git a/res/controllers/midi-components-0.0.js b/res/controllers/midi-components-0.0.js index 4e16c80ccf10..ccab8c2f70a7 100644 --- a/res/controllers/midi-components-0.0.js +++ b/res/controllers/midi-components-0.0.js @@ -320,9 +320,6 @@ if (engine.getValue(this.group, 'track_loaded') === 0) { engine.setValue(this.group, 'LoadSelectedTrack', 1); } else { - if (this.volumeByVelocity) { - engine.setValue(this.group, 'volume', this.inValueScale(value)); - } engine.setValue(this.group, 'cue_gotoandplay', 1); } } @@ -376,6 +373,15 @@ this.connections[2] = engine.connectControl(this.group, 'repeat', this.output); } }, + disconnect: function () { + // reset volume to initial volume + engine.setParameter(this.group,"volume",1); + if (this.connections[0] !== undefined) { + this.connections.forEach(function (conn) { + conn.disconnect(); + }); + } + }, outKey: null, // hack to get Component constructor to call connect() });