1
0
Fork 0

Option sampling

This commit is contained in:
Joost De Cock 2018-08-09 16:11:56 +02:00
parent 98fef1a0ae
commit 00c3ebe14c

View file

@ -72,12 +72,9 @@ Pattern.prototype.draft = function() {
* Handles pattern sampling
*/
Pattern.prototype.sample = function() {
this.settings.mode = "sample";
if (this.settings.sample.type === "option") {
return this.sampleOption(this.settings.sample.option);
}
this.debug("sampling", this.settings);
this.debug(this.settings);
this.draft();
};
@ -85,6 +82,7 @@ Pattern.prototype.sample = function() {
* Handles option sampling
*/
Pattern.prototype.sampleOption = function(option) {
this.settings.mode = "sample";
let factor, step, val;
let parts = {};
if (typeof this.config.options[option].type === "undefined") factor = 100;