Document subdivisions

This commit is contained in:
2023-09-02 22:37:33 +03:00
parent b9e5a211b7
commit abb916a77c
3 changed files with 16 additions and 6 deletions

View File

@ -39,7 +39,7 @@
"tone": "^14.8.49",
"unique-names-generator": "^4.7.1",
"vite-plugin-markdown": "^2.1.0",
"zifferjs": "^0.0.18",
"zifferjs": "^0.0.19",
"zzfx": "^1.2.0"
}
}

View File

@ -23,6 +23,7 @@ The basic Ziffer notation is entirely written in JavaScript strings (_e.g_ <ic>"
| **Pitches** | <ic>0-9</ic> <ic>{10 11 21}</ic> | Numbers or escaped numbers in curly brackets |
| **Duration** | <ic>a b c</ic> to <ic>z</ic> | Each letter of the alphabet is a rhythm (see table) |
| **Duration** | <ic>0.25</ic> = <ic>q</ic>, <ic>0.5</ic> = <ic>h</ic> | Floating point numbers can also be used as durations |
| **Subdivision** | <ic>[1 [2 3]]</ic> | Durations can be subdivided using square brackets |
| **Octave** | <ic>^ _</ic> | <ic>^</ic> for octave up and <ic>_</ic> for octave down |
| **Accidentals** | <ic># b</ic> | Sharp and flats, just like with regular music notation :smile: |
| **Rest** | <ic>r</ic> | Rest / silences |
@ -30,7 +31,6 @@ The basic Ziffer notation is entirely written in JavaScript strings (_e.g_ <ic>"
**Note:** Some features are still unsupported. For full syntax see article about <a href="https://zenodo.org/record/7841945" target="_blank">Ziffers</a>.
${makeExample(
"Pitches from 0 to 9",
`
@ -91,6 +91,16 @@ z1('e 0:4 2:2 4:2 (0 4):2')
false
)}
${makeExample(
"Subdivided durations",
`
z1('w [0 [5 [3 7]]] h [0 4]')
.scale('major').sound('sine')
.fmi(usine(.5)).fmh(2).out()
`,
false
)}
## Algorithmic operations
Ziffers provides shorthands for **many** numeric and algorithimic operations such as evaluating random numbers and creating sequences using list operations:

View File

@ -1451,10 +1451,10 @@ yaml@^2.1.1:
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b"
integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==
zifferjs@^0.0.18:
version "0.0.18"
resolved "https://registry.yarnpkg.com/zifferjs/-/zifferjs-0.0.18.tgz#e8a5cb5cfef77c098899a12450380b04f0100841"
integrity sha512-qixh6tb6wpMx/iFM1uGeDQVi6oaURPwP553Gc75pgZLIvapoXnnJIn23f8fAEgxwTdI+EkqLEZZLa57sDxj0PA==
zifferjs@^0.0.19:
version "0.0.19"
resolved "https://registry.yarnpkg.com/zifferjs/-/zifferjs-0.0.19.tgz#a3e1fc04b12cef1f59a78f3d23229b072d9f0a60"
integrity sha512-mdrfac/ryDF1MEC1iMCV9KTj36AXNVsiDoYiDEA5ZCYFuHqfzS5s2aCh2iK6teyRKTIagE2IvZCrsTacB5GBBg==
zzfx@^1.2.0:
version "1.2.0"