"fix" voice leading
This commit is contained in:
parent
719dcbcd4d
commit
a0ae8f4a07
1 changed files with 4 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue