add octaves control for arpeggios

This commit is contained in:
Felix Roos 2023-07-23 21:18:34 +02:00
parent d231ded7a2
commit 52b8d9d361
3 changed files with 9 additions and 8 deletions

View file

@ -196,10 +196,10 @@ export const voicing = register('voicing', function (pat) {
.fmap((value) => {
// destructure voicing controls out
value = typeof value === 'string' ? { chord: value } : value;
let { dictionary = 'default', chord, anchor, offset, mode, n, ...rest } = value;
let { dictionary = 'default', chord, anchor, offset, mode, n, octaves, ...rest } = value;
dictionary =
typeof dictionary === 'string' ? voicingRegistry[dictionary] : { dictionary, mode: 'below', anchor: 'c5' };
let notes = renderVoicing({ ...dictionary, chord, anchor, offset, mode, n });
let notes = renderVoicing({ ...dictionary, chord, anchor, offset, mode, n, octaves });
return stack(...notes)
.note()