build
This commit is contained in:
parent
70dea049ae
commit
64e24e5fc1
6 changed files with 3213 additions and 1722 deletions
1
docs/dist/parse.js
vendored
1
docs/dist/parse.js
vendored
|
|
@ -3,6 +3,7 @@ import * as strudel from "../_snowpack/link/strudel.js";
|
|||
import {Scale, Note, Interval} from "../_snowpack/pkg/@tonaljs/tonal.js";
|
||||
import "./tone.js";
|
||||
import "./midi.js";
|
||||
import "./voicings.js";
|
||||
import * as toneStuff from "./tone.js";
|
||||
import shapeshifter from "./shapeshifter.js";
|
||||
const {
|
||||
|
|
|
|||
18
docs/dist/voicings.js
vendored
Normal file
18
docs/dist/voicings.js
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import {Pattern as _Pattern, stack, Hap} from "../_snowpack/link/strudel.js";
|
||||
import voicings from "../_snowpack/pkg/chord-voicings.js";
|
||||
const {dictionaryVoicing, minTopNoteDiff, lefthand} = voicings;
|
||||
const getVoicing = (chord, lastVoicing, range = ["F3", "A4"]) => dictionaryVoicing({
|
||||
chord,
|
||||
dictionary: lefthand,
|
||||
range,
|
||||
picker: minTopNoteDiff,
|
||||
lastVoicing
|
||||
});
|
||||
const Pattern = _Pattern;
|
||||
Pattern.prototype.voicings = function(range = ["F3", "A4"]) {
|
||||
let lastVoicing;
|
||||
return new Pattern((span) => this.query(span).map((event) => {
|
||||
lastVoicing = getVoicing(event.value, lastVoicing, range);
|
||||
return stack(...lastVoicing).query(span).map((hap) => new Hap(event.whole, event.part, hap.value));
|
||||
}).flat());
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue