mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 13:48:34 +00:00
breaking: use ireal as default voicing dictionary
+ this has the big benefit that all chord symbols work by default without the need to specify a dict
This commit is contained in:
parent
4121ac91ee
commit
b14e5577b4
@ -184,19 +184,16 @@ export const rootNotes = register('rootNotes', function (octave, pat) {
|
|||||||
* If you pass a pattern of strings to voicing, they will be interpreted as chords.
|
* If you pass a pattern of strings to voicing, they will be interpreted as chords.
|
||||||
*
|
*
|
||||||
* @name voicing
|
* @name voicing
|
||||||
* @param {string} dictionary which voicing dictionary to use.
|
|
||||||
* @returns Pattern
|
* @returns Pattern
|
||||||
* @example
|
* @example
|
||||||
* voicing("<C Am F G>")
|
* n("0 1 2 3").chord("<C Am F G>").voicing()
|
||||||
* @example
|
|
||||||
* n("0 1 2 3 4 5 6 7").chord("<C Am F G>").voicing()
|
|
||||||
*/
|
*/
|
||||||
export const voicing = register('voicing', function (pat) {
|
export const voicing = register('voicing', function (pat) {
|
||||||
return pat
|
return pat
|
||||||
.fmap((value) => {
|
.fmap((value) => {
|
||||||
// destructure voicing controls out
|
// destructure voicing controls out
|
||||||
value = typeof value === 'string' ? { chord: value } : value;
|
value = typeof value === 'string' ? { chord: value } : value;
|
||||||
let { dictionary = 'default', chord, anchor, offset, mode, n, octaves, ...rest } = value;
|
let { dictionary = 'ireal', chord, anchor, offset, mode, n, octaves, ...rest } = value;
|
||||||
dictionary =
|
dictionary =
|
||||||
typeof dictionary === 'string' ? voicingRegistry[dictionary] : { dictionary, mode: 'below', anchor: 'c5' };
|
typeof dictionary === 'string' ? voicingRegistry[dictionary] : { dictionary, mode: 'below', anchor: 'c5' };
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -5365,55 +5365,22 @@ exports[`runs examples > example "vibmod" example index 1 1`] = `
|
|||||||
|
|
||||||
exports[`runs examples > example "voicing" example index 0 1`] = `
|
exports[`runs examples > example "voicing" example index 0 1`] = `
|
||||||
[
|
[
|
||||||
"[ 0/1 → 1/1 | note:E4 ]",
|
"[ 0/1 → 1/4 | note:52 ]",
|
||||||
"[ 0/1 → 1/1 | note:G4 ]",
|
"[ 1/4 → 1/2 | note:60 ]",
|
||||||
"[ 0/1 → 1/1 | note:C5 ]",
|
"[ 1/2 → 3/4 | note:64 ]",
|
||||||
"[ 1/1 → 2/1 | note:E4 ]",
|
"[ 3/4 → 1/1 | note:67 ]",
|
||||||
"[ 1/1 → 2/1 | note:A4 ]",
|
"[ 1/1 → 5/4 | note:57 ]",
|
||||||
"[ 1/1 → 2/1 | note:C5 ]",
|
"[ 5/4 → 3/2 | note:60 ]",
|
||||||
"[ 2/1 → 3/1 | note:F4 ]",
|
"[ 3/2 → 7/4 | note:64 ]",
|
||||||
"[ 2/1 → 3/1 | note:A4 ]",
|
"[ 7/4 → 2/1 | note:69 ]",
|
||||||
"[ 2/1 → 3/1 | note:C5 ]",
|
"[ 2/1 → 9/4 | note:53 ]",
|
||||||
"[ 3/1 → 4/1 | note:D4 ]",
|
"[ 9/4 → 5/2 | note:60 ]",
|
||||||
"[ 3/1 → 4/1 | note:G4 ]",
|
"[ 5/2 → 11/4 | note:65 ]",
|
||||||
"[ 3/1 → 4/1 | note:B4 ]",
|
"[ 11/4 → 3/1 | note:69 ]",
|
||||||
]
|
"[ 3/1 → 13/4 | note:55 ]",
|
||||||
`;
|
"[ 13/4 → 7/2 | note:62 ]",
|
||||||
|
"[ 7/2 → 15/4 | note:67 ]",
|
||||||
exports[`runs examples > example "voicing" example index 1 1`] = `
|
"[ 15/4 → 4/1 | note:71 ]",
|
||||||
[
|
|
||||||
"[ 0/1 → 1/8 | note:64 ]",
|
|
||||||
"[ 1/8 → 1/4 | note:67 ]",
|
|
||||||
"[ 1/4 → 3/8 | note:72 ]",
|
|
||||||
"[ 3/8 → 1/2 | note:76 ]",
|
|
||||||
"[ 1/2 → 5/8 | note:79 ]",
|
|
||||||
"[ 5/8 → 3/4 | note:84 ]",
|
|
||||||
"[ 3/4 → 7/8 | note:88 ]",
|
|
||||||
"[ 7/8 → 1/1 | note:91 ]",
|
|
||||||
"[ 1/1 → 9/8 | note:64 ]",
|
|
||||||
"[ 9/8 → 5/4 | note:69 ]",
|
|
||||||
"[ 5/4 → 11/8 | note:72 ]",
|
|
||||||
"[ 11/8 → 3/2 | note:76 ]",
|
|
||||||
"[ 3/2 → 13/8 | note:81 ]",
|
|
||||||
"[ 13/8 → 7/4 | note:84 ]",
|
|
||||||
"[ 7/4 → 15/8 | note:88 ]",
|
|
||||||
"[ 15/8 → 2/1 | note:93 ]",
|
|
||||||
"[ 2/1 → 17/8 | note:65 ]",
|
|
||||||
"[ 17/8 → 9/4 | note:69 ]",
|
|
||||||
"[ 9/4 → 19/8 | note:72 ]",
|
|
||||||
"[ 19/8 → 5/2 | note:77 ]",
|
|
||||||
"[ 5/2 → 21/8 | note:81 ]",
|
|
||||||
"[ 21/8 → 11/4 | note:84 ]",
|
|
||||||
"[ 11/4 → 23/8 | note:89 ]",
|
|
||||||
"[ 23/8 → 3/1 | note:93 ]",
|
|
||||||
"[ 3/1 → 25/8 | note:62 ]",
|
|
||||||
"[ 25/8 → 13/4 | note:67 ]",
|
|
||||||
"[ 13/4 → 27/8 | note:71 ]",
|
|
||||||
"[ 27/8 → 7/2 | note:74 ]",
|
|
||||||
"[ 7/2 → 29/8 | note:79 ]",
|
|
||||||
"[ 29/8 → 15/4 | note:83 ]",
|
|
||||||
"[ 15/4 → 31/8 | note:86 ]",
|
|
||||||
"[ 31/8 → 4/1 | note:91 ]",
|
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user