mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-27 05:28:41 +00:00
"fix" voice leading
This commit is contained in:
parent
719dcbcd4d
commit
a0ae8f4a07
@ -61,17 +61,17 @@ const getVoicing = (chord, dictionaryName, lastVoicing) => {
|
|||||||
* stack("<C^7 A7 Dm7 G7>".voicings('lefthand'), "<C3 A2 D3 G2>").note()
|
* stack("<C^7 A7 Dm7 G7>".voicings('lefthand'), "<C3 A2 D3 G2>").note()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
let lastVoicing; // this now has to be global until another solution is found :-/
|
||||||
|
// it used to be local to the voicings function at evaluation time
|
||||||
|
// but since register will patternify by default, means that
|
||||||
|
// the function is called over and over again, resetting the lastVoicing variables
|
||||||
export const voicings = register('voicings', function (dictionary, pat) {
|
export const voicings = register('voicings', function (dictionary, pat) {
|
||||||
let lastVoicing;
|
|
||||||
return pat
|
return pat
|
||||||
.fmap((value) => {
|
.fmap((value) => {
|
||||||
lastVoicing = getVoicing(value, dictionary, lastVoicing);
|
lastVoicing = getVoicing(value, dictionary, lastVoicing);
|
||||||
return stack(...lastVoicing);
|
return stack(...lastVoicing);
|
||||||
})
|
})
|
||||||
.outerJoin();
|
.outerJoin();
|
||||||
/* .withContext(() => ({
|
|
||||||
locations: event.context.locations || [],
|
|
||||||
})); */
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user