diff --git a/res/controllers/midi-components-0.0.js b/res/controllers/midi-components-0.0.js index 4e5dec43d168..4e16c80ccf10 100644 --- a/res/controllers/midi-components-0.0.js +++ b/res/controllers/midi-components-0.0.js @@ -308,6 +308,7 @@ print('ERROR: No sampler number specified for new SamplerButton.'); return; } + this.volumeByVelocity = options.volumeByVelocity; this.number = options.number; this.group = '[Sampler' + this.number + ']'; Button.call(this, options); @@ -319,6 +320,9 @@ 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); } }