fix: voicings wouldn't work with objects

This commit is contained in:
Felix Roos 2022-02-20 23:37:17 +01:00
parent 74040e52b4
commit bc790d8cd5

View File

@ -32,7 +32,7 @@ Pattern.prototype.voicings = function (range) {
range = ['F3', 'A4'];
}
return this.fmapNested((event) => {
lastVoicing = getVoicing(event.value, lastVoicing, range);
lastVoicing = getVoicing(event.value?.value || event.value, lastVoicing, range);
return stack(...lastVoicing);
});
};