mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-27 05:28:41 +00:00
highlight voicings
This commit is contained in:
parent
067c0bfe70
commit
8b0e036ed5
@ -19,7 +19,7 @@ Pattern.prototype.fmapNested = function (func) {
|
|||||||
.map((event) =>
|
.map((event) =>
|
||||||
reify(func(event))
|
reify(func(event))
|
||||||
.query(span)
|
.query(span)
|
||||||
.map((hap) => new Hap(event.whole, event.part, hap.value))
|
.map((hap) => new Hap(event.whole, event.part, hap.value, hap.context))
|
||||||
)
|
)
|
||||||
.flat()
|
.flat()
|
||||||
);
|
);
|
||||||
@ -33,7 +33,9 @@ Pattern.prototype.voicings = function (range) {
|
|||||||
}
|
}
|
||||||
return this.fmapNested((event) => {
|
return this.fmapNested((event) => {
|
||||||
lastVoicing = getVoicing(event.value, lastVoicing, range);
|
lastVoicing = getVoicing(event.value, lastVoicing, range);
|
||||||
return stack(...lastVoicing);
|
return stack(...lastVoicing)._withContext(() => ({
|
||||||
|
locations: event.context.locations || [],
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user