Skip to content

Commit

Permalink
Merge pull request #2032 from Swiftb0y/components_samplerbutton_velocity
Browse files Browse the repository at this point in the history
Velocity sensitive ComponentsJS SamplerButtons
  • Loading branch information
Be-ing authored Feb 23, 2019
2 parents 31f2bb9 + 4071e4f commit 30a4e7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions res/controllers/midi-components-0.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
}
Expand Down

0 comments on commit 30a4e7f

Please sign in to comment.