that was long
This commit is contained in:
@ -1180,19 +1180,31 @@ The basic Ziffer notation is entirely written in JavaScript strings (_e.g_ <icod
|
|||||||
|
|
||||||
${makeExample(
|
${makeExample(
|
||||||
"Pitches from 0 to 9",
|
"Pitches from 0 to 9",
|
||||||
``, true)}
|
`
|
||||||
|
z1('s 0 1 2 3 4 5 6 7 8 9').sound('sine').release(0.1).sustain(0.25).out()
|
||||||
|
`, true)}
|
||||||
|
|
||||||
${makeExample(
|
${makeExample(
|
||||||
"Escaped pitches using curly brackets",
|
"Escaped pitches using curly brackets",
|
||||||
``, false)}
|
`
|
||||||
|
div(4) ? z1('s 0 {9} 0 {9 11}').sound('sine').release(0.1).sustain(0.25).out()
|
||||||
|
: z1('s 0 {11} 0 {11 13}').sound('sine').release(0.1).sustain(0.25).out()
|
||||||
|
`, false)}
|
||||||
|
|
||||||
${makeExample(
|
${makeExample(
|
||||||
"Durations using letters and floating point numbers",
|
"Durations using letters and floating point numbers",
|
||||||
``, false)}
|
`
|
||||||
|
div(8) ? z1('s 0 e 1 q 2 h 3 w 4').sound('sine').scale("locrian").out()
|
||||||
|
: z1('0.125 0 0.25 2').sound('sine').scale("locrian").out()
|
||||||
|
`, false)}
|
||||||
|
|
||||||
${makeExample(
|
${makeExample(
|
||||||
"Disco was invented thanks to Ziffers",
|
"Disco was invented thanks to Ziffers",
|
||||||
``, false)}
|
`
|
||||||
|
z1('e _ _ 0 ^ 0 _ 0 ^ 0').sound('jvbass').out()
|
||||||
|
mod(1)::snd('bd').out(); mod(2)::snd('sd').out()
|
||||||
|
mod(3) :: snd('cp').room(0.5).size(0.5).orbit(2).out()
|
||||||
|
`, false)}
|
||||||
|
|
||||||
${makeExample(
|
${makeExample(
|
||||||
"Accidentals and rests for nice melodies",
|
"Accidentals and rests for nice melodies",
|
||||||
@ -1201,48 +1213,50 @@ ${makeExample(
|
|||||||
|
|
||||||
## Algorithmic operations
|
## Algorithmic operations
|
||||||
|
|
||||||
Ziffers provides shorthands for many numeric and algorithimic operations such as evaluating random numbers and creating sequences using list operations:
|
Ziffers provides shorthands for **many** numeric and algorithimic operations such as evaluating random numbers and creating sequences using list operations:
|
||||||
|
|
||||||
* **List operations:** <icode>(3 2 1)+(2 5)</icode> Cartesian operation using + operator (All javascript operators supported).
|
* **List operations:** <icode>(3 2 1)+(2 5)</icode> Cartesian operation using + operator (All javascript operators supported).
|
||||||
* **Random numbers:** <icode>(4,6)</icode> Random number between 4 and 6
|
* **Random numbers:** <icode>(4,6)</icode> Random number between 4 and 6
|
||||||
|
|
||||||
## Keys and scales
|
## Keys and scales
|
||||||
|
|
||||||
Ziffers supports all the keys and scales. Keys can be defined by using <a href="https://en.wikipedia.org/wiki/Scientific_pitch_notation" target="_blank">scientific pitch notation</a>, for example 'F3'. Western style (1490 scales) can be with scale names named after greek modes and extended by William Zeitler (see full <a href="https://ianring.com/musictheory/scales/traditions/zeitler" target="_blank">list</a>):
|
Ziffers supports all the keys and scales. Keys can be defined by using [scientific pitch notation](https://en.wikipedia.org/wiki/Scientific_pitch_notation), for example <icode>F3</icode>. Western style (1490 scales) can be with scale names named after greek modes and extended by [William Zeitler](https://ianring.com/musictheory/scales/traditions/zeitler). You will never really run out of scales to play with using Ziffers. Here is a short list of some possible scales that you can play with:
|
||||||
|
|
||||||
* Lydian
|
| Scale name | Intervals |
|
||||||
* Mixolydian
|
|------------|------------------------|
|
||||||
* Aeolian
|
| Lydian | <icode>2221221</icode> |
|
||||||
* Locrian
|
| Mixolydian | <icode>2212212</icode> |
|
||||||
* Ionian
|
| Aeolian | <icode>2122122</icode> |
|
||||||
* Dorian
|
| Locrian | <icode>1221222</icode> |
|
||||||
* Phrygian
|
| Ionian | <icode>2212221</icode> |
|
||||||
* Soryllic
|
| Dorian | <icode>2122212</icode> |
|
||||||
* Modimic
|
| Phrygian | <icode>1222122</icode> |
|
||||||
* Ionalian
|
| Soryllic | <icode>11122122</icode>|
|
||||||
* ...
|
| Modimic | <icode>412122</icode> |
|
||||||
|
| Ionalian | <icode>1312122</icode> |
|
||||||
|
|
||||||
or by most traditional <a href="https://ianring.com/musictheory/scales/traditions/western" target="_blank">western names</a>:
|
<icode></icode>
|
||||||
|
|
||||||
* Major
|
You can also use more traditional <a href="https://ianring.com/musictheory/scales/traditions/western" target="_blank">western names</a>:
|
||||||
* Minor
|
|
||||||
* Minor pentatonic
|
|
||||||
* Major pentatonic
|
| Scale name | Intervals |
|
||||||
* Harmonic minor
|
|------------|------------------------|
|
||||||
* Harmonic major
|
| Major | <icode>2212221</icode> |
|
||||||
* Melodic minor
|
| Minor | <icode>2122122</icode> |
|
||||||
* Melodic major
|
| Minor pentatonic | <icode>32232</icode> |
|
||||||
* Whole
|
| Harmonic minor | <icode>2122131</icode>|
|
||||||
* Blues minor
|
| Harmonic major | <icode>2212131</icode>|
|
||||||
* Blues major
|
| Melodic minor | <icode>2122221</icode>|
|
||||||
* ...
|
| Melodic major | <icode>2212122</icode>|
|
||||||
|
| Whole | <icode>222222</icode> |
|
||||||
|
| Blues minor | <icode>321132</icode> |
|
||||||
|
| Blues major | <icode>211323</icode> |
|
||||||
|
|
||||||
Microtonal scales can be defined using <a href="https://www.huygens-fokker.org/scala/scl_format.html" target="_blank">Scala format</a> or by extended notation defined by Sevish <a href="https://sevish.com/scaleworkshop/" target="_blank">Scale workshop</a>, for example:
|
Microtonal scales can be defined using <a href="https://www.huygens-fokker.org/scala/scl_format.html" target="_blank">Scala format</a> or by extended notation defined by Sevish <a href="https://sevish.com/scaleworkshop/" target="_blank">Scale workshop</a>, for example:
|
||||||
|
|
||||||
**Young:** 106. 198. 306.2 400.1 502. 604. 697.9 806.1 898.1 1004.1 1102. 1200.
|
- **Young:** 106. 198. 306.2 400.1 502. 604. 697.9 806.1 898.1 1004.1 1102. 1200.
|
||||||
**Wendy carlos:** 17/16 9/8 6/5 5/4 4/3 11/8 3/2 13/8 5/3 7/4 15/8 2/1
|
- **Wendy carlos:** 17/16 9/8 6/5 5/4 4/3 11/8 3/2 13/8 5/3 7/4 15/8 2/1
|
||||||
|
|
||||||
See examples for how to use scales.
|
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@ -1288,7 +1302,6 @@ z1('0 3 2 4',{key: 'D3', scale: 'minor pentatonic'}).sound('sine').out()
|
|||||||
${makeExample(
|
${makeExample(
|
||||||
"Duration chars",
|
"Duration chars",
|
||||||
`
|
`
|
||||||
z1('s 0 e 1 q 2 h 3 w 4').sound('sine').scale("locrian").out()
|
|
||||||
`,
|
`,
|
||||||
true
|
true
|
||||||
)}
|
)}
|
||||||
@ -1322,17 +1335,6 @@ z1('q 0 3 {10 14} e 8 4 {5 10 12 14 7 0}').sound('sine')
|
|||||||
true
|
true
|
||||||
)}
|
)}
|
||||||
|
|
||||||
${makeExample(
|
|
||||||
"Scale arrays",
|
|
||||||
`
|
|
||||||
z1('q 0 6 3 2 e 3 6 q 3 6 s 8 4 2 1').sound('sine')
|
|
||||||
.fmi([1,2,4,8].pick())
|
|
||||||
.scale([2,1,1,2,2,4,3])
|
|
||||||
.out()
|
|
||||||
`,
|
|
||||||
true
|
|
||||||
)}
|
|
||||||
|
|
||||||
- Algorithmic operations
|
- Algorithmic operations
|
||||||
|
|
||||||
${makeExample(
|
${makeExample(
|
||||||
|
|||||||
Reference in New Issue
Block a user