190 lines
No EOL
3.8 KiB
Text
190 lines
No EOL
3.8 KiB
Text
<Box>
|
|
|
|
1. press play button to start
|
|
2. change `house` to `casio`
|
|
3. press refresh button to update
|
|
4. press stop button to stop
|
|
|
|
</Box>
|
|
|
|
**Change tempo**
|
|
|
|
<MiniRepl
|
|
client:load
|
|
tune={`setcps(.5)
|
|
sound("bd bd hh bd sn bd hh bd")`}
|
|
punchcard
|
|
/>
|
|
|
|
adding your own samples
|
|
|
|
<MiniRepl
|
|
client:visible
|
|
tune={`sound(\`
|
|
[~ ~ oh ~ ] [~ ~ ~ ~ ] [~ ~ ~ ~ ] [~ ~ ~ ~ ],
|
|
[hh hh ~ ~ ] [hh ~ hh ~ ] [hh ~ hh ~ ] [hh ~ hh ~ ],
|
|
[~ ~ ~ ~ ] [cp ~ ~ ~ ] [~ ~ ~ ~ ] [cp ~ ~ ~ ],
|
|
[bd ~ ~ ~ ] [~ ~ ~ bd] [~ ~ bd ~ ] [~ ~ ~ bd ]
|
|
\`).slow(3)`}
|
|
punchcard
|
|
/>
|
|
|
|
<MiniRepl
|
|
client:visible
|
|
tune={`sound(\`
|
|
[~ ~ ~ ~ ] [~ ~ ~ ~ ] [~ ~ ~ ~ ] [~ ~ oh:1 ~ ],
|
|
[hh hh hh hh] [hh hh hh hh] [hh hh hh hh] [hh hh ~ ~ ],
|
|
[~ ~ ~ ~ ] [cp ~ ~ ~ ] [~ ~ ~ ~ ] [~ cp ~ ~ ],
|
|
[bd bd ~ ~ ] [~ ~ bd ~ ] [bd bd ~ bd ] [~ ~ ~ ~ ]
|
|
\`).bank("<RolandTR808 AkaiMPC60>").slow(3)`}
|
|
punchcard
|
|
/>
|
|
|
|
n(run(8)).sound("east")
|
|
|
|
Shorter variant:
|
|
|
|
<MiniRepl
|
|
hideHeader
|
|
client:visible
|
|
tune={`sound(\`
|
|
[~ ~ oh ~ ] ~ ~ ~,
|
|
[hh*2 ~] hh*2 hh*2 hh*2,
|
|
[~ cp]*2,
|
|
bd [~ ~ ~ bd] [~ bd] [~ ~ ~ bd]
|
|
\`).cpm(90/4)`}
|
|
/>
|
|
|
|
polyrythms & polymeters
|
|
|
|
-- This can make for flexible time signatures:
|
|
|
|
d1 $ sound "[bd bd sn:5] [bd sn:3]"
|
|
|
|
-- You can put subsequences inside subsequences:
|
|
d1 $ sound "[[bd bd] bd sn:5] [bd sn:3]"
|
|
|
|
-- Keep going..
|
|
d1 $ sound "[[bd [bd bd bd bd]] bd sn:5] [bd sn:3]"
|
|
|
|
-- \* Polymetric / polyrhythmic sequences
|
|
|
|
-- Play two subsequences at once by separating with a comma:
|
|
|
|
d1 $ sound "[voodoo voodoo:3, arpy arpy:4 arpy:2]"
|
|
|
|
-- compare how [,] and {,} work:
|
|
|
|
d1 $ sound "[voodoo voodoo:3, arpy arpy:4 arpy:2]"
|
|
|
|
d1 $ sound "{voodoo voodoo:3, arpy arpy:4 arpy:2}"
|
|
|
|
d1 $ sound "[drum bd hh bd, can can:2 can:3 can:4 can:2]"
|
|
|
|
d1 $ sound "{drum bd hh bd, can can:2 can:3 can:4 can:2}"
|
|
|
|
d1 $ sound "[bd sn, can:2 can:3 can:1, arpy arpy:1 arpy:2 arpy:3 arpy:5]"
|
|
|
|
d1 $ sound "{bd sn, can:2 can:3 can:1, arpy arpy:1 arpy:2 arpy:3 arpy:5}"
|
|
|
|
**Play X per cycle with \{ \}**
|
|
|
|
<MiniRepl
|
|
hideHeader
|
|
client:visible
|
|
tune={`note(\`{
|
|
[~ 60] 63 [60 63] [~ 63]
|
|
[~ 60] 62 [60 62] [~ 62]
|
|
[~ 60] 65 [60 65] [~ 65]
|
|
[~ 60] 63 [60 63] [~ 63]
|
|
}%2\`).sound("gm_xylophone")`}
|
|
punchcard
|
|
/>
|
|
|
|
<Box>
|
|
|
|
Try different numbers after `%`
|
|
|
|
`{ ... }%1` is the same as `< ... >`
|
|
|
|
</Box>
|
|
|
|
## Bracket Recap
|
|
|
|
- `[]` squeezes contents to 1 cycle
|
|
- `<>` plays one item per cycle
|
|
- `{}%x` plays x items per cycle
|
|
|
|
<MiniRepl
|
|
hideHeader
|
|
client:visible
|
|
tune={`note("[0 12]*2".add("<36 34 41 39>/2"))
|
|
.sound("gm_synth_bass_1")`}
|
|
/>
|
|
|
|
vertical
|
|
|
|
<MiniRepl
|
|
hideHeader
|
|
client:visible
|
|
tune={`n(\`<
|
|
<[0,7] [-1,6] [-1,6] [-1,6]>
|
|
< 4 4 4 3>
|
|
<[2,7] [2,6] [1,6] [1,6]>
|
|
< 4 4 4 3>
|
|
>*2\`)
|
|
.scale("<E:minor>/4")
|
|
.sound("piano")`}
|
|
/>
|
|
|
|
horizontal
|
|
|
|
<MiniRepl
|
|
hideHeader
|
|
client:visible
|
|
tune={`
|
|
n(\`<
|
|
[0,7] 4 [2,7] 4
|
|
[-1,6] 4 [2,6] 4
|
|
[-1,6] 4 [1,6] 4
|
|
[-1,6] 3 [1,6] 3
|
|
>*2\`)
|
|
.scale("<E:minor>/4")
|
|
.sound("piano")`}
|
|
/>
|
|
|
|
# dinge die es im alten tutorial gab, die jetzt noch nicht im workshop sind
|
|
|
|
## `freq`
|
|
|
|
To get maximum freedom, you can also use `freq` to directly control the frequency:
|
|
|
|
<MiniRepl client:idle tune={`freq("220 275 330 440")`} />
|
|
|
|
## Hearing and frequency
|
|
|
|
In the above example, we play A3 (220Hz), C#4 natural (275Hz), E4 (330Hz) and A4 (440Hz), mirroring our previous examples.
|
|
|
|
But can you hear the difference between these individual frequencies?
|
|
|
|
<MiniRepl client:idle tune={`freq("220 221 223 224")`} />
|
|
|
|
How about these?
|
|
|
|
<MiniRepl client:idle tune={`freq("2020 2021 2023 2024")`} />
|
|
|
|
The higher we go up...
|
|
|
|
<MiniRepl client:idle tune={`freq("5020 5021 5023 5024")`} />
|
|
|
|
The less distance we can hear between the frequencies!
|
|
|
|
<MiniRepl client:idle tune={`freq("10020 10021 10023 10024")`} />
|
|
|
|
Why is this? [Human hearing operates logarithmically](https://www.audiocheck.net/soundtests_nonlinear.php).
|
|
|
|
## coding syntax
|
|
|
|
## getting-started
|
|
|
|
## sounds |