start fleshing out effects chapter

This commit is contained in:
Felix Roos 2023-05-28 12:42:24 +02:00
parent d2dffe3186
commit 1e9979ae18
2 changed files with 181 additions and 20 deletions

View File

@ -7,15 +7,175 @@ import { MiniRepl } from '../../docs/MiniRepl';
# First Effects
import Box from '@components/Box.astro';
We have sounds, we have notes, now let's look at effects!
**low-pass filter with lpf**
<MiniRepl
hideHeader
client:load
tune={`note("<[c2 c3]*4 [bb1 bb2]*4 [f2 f3]*4 [eb2 eb3]*4>/2")
.sound("sawtooth").lpf(800)`}
/>
<Box>
- Change lpf to 200. Notice how it gets muffled. Think of it as standing in front of the club with the door closed 🚪.
- Now let's open the door... change it to 8000. Notice how it gets sharper 🪩
</Box>
**automate the filter**
<MiniRepl
hideHeader
client:load
tune={`note("<[c2 c3]*4 [bb1 bb2]*4 [f2 f3]*4 [eb2 eb3]*4>/2")
.sound("sawtooth").lpf("200 1000")`}
/>
<Box>
- Try adding more values
- Notice how the pattern in lpf does not change the overall rhythm
</Box>
**vowel**
<MiniRepl hideHeader client:load tune={`sound("drum drum drum drum").vowel("a o")`} />
<MiniRepl
hideHeader
client:load
tune={`note("<[c3,g3,e4] [bb2,f3,d4] [a2,f3,c4] [bb2,g3,eb4]>/2")
.sound("sawtooth").vowel("<a e i o>/2")`}
/>
You can probably think of more vowels :)
<Box>
- Try adding more values
- Notice how the pattern in lpf does not change the overall rhythm
</Box>
**gain**
<MiniRepl hideHeader client:load tune={`sound("bd hh sn:1 hh sn:1 hh").gain("1 .5 .2")`} />
<MiniRepl
hideHeader
client:load
tune={`stack(
sound("hh*8").gain("[.25 1]*2"),
sound("bd*2,~ rim")
) `}
/>
<Box>
Rhythm is all about dynamics!
Remove the gain and notice how flat it sounds.
</Box>
**stacks within stacks**
Let's combine all of the above into a little tune:
<MiniRepl
hideHeader
client:load
tune={`stack(
stack(
sound("hh*8").gain("[.25 1]*2"),
sound("bd*2,~ rim")
),
note("<[c2 c3]*4 [bb1 bb2]*4 [f2 f3]*4 [eb2 eb3]*4>/2")
.sound("sawtooth").lpf("200 1000"),
note("<[c3,g3,e4] [bb2,f3,d4] [a2,f3,c4] [bb2,g3,eb4]>/2")
.sound("sawtooth").vowel("<a e i o>/2")
) `}
/>
<Box>
Pay attention to where the commas are and identify the individual parts of the stacks.
The 3 parts (drums, bassline, chords) are exactly as earlier, just stacked together.
</Box>
**fast and slow**
We can use `fast` and `slow` to change the tempo of a pattern outside of Mini-Notation:
<MiniRepl hideHeader client:load tune={`sound("bd*2,~ rim").slow(2)`} />
<Box>
Change the `slow` value. Try replacing it with `fast`.
What happens if you use a pattern like `"<1 [2 4]>"`?
</Box>
By the way, inside Mini-Notation, `fast` is `*` and slow is `/`.
<MiniRepl hideHeader client:load tune={`sound("[bd*2,~ rim]*<1 [2 4]>")`} />
**delay**
<MiniRepl
hideHeader
client:load
tune={`stack(
note("~ [<[d3,a3,f4]!2 [d3,bb3,g4]!2> ~]")
.sound("gm_electric_guitar_muted"),
sound("<bd rim>").bank("RolandTR707")
).delay(".5")`}
/>
<Box>
Try some `delay` values between 0 and 1. Btw, `.5` is short for `0.5`
What happens if you use `.delay(".8:.125")` ? Can you guess what the second number does?
What happens if you use `.delay(".8:.06:.8")` ? Can you guess what the third number does?
</Box>
**room**
<MiniRepl
hideHeader
client:load
tune={`n("<4 [3@3 4] [<2 0> ~@16] ~>/2")
.scale("D4:minor").sound("gm_accordion:2")
.room(2)`}
/>
<Box>
Try different values!
Add a delay too!
</Box>
**little dub tune**
<MiniRepl
hideHeader
client:load
tune={`stack(
note("~ [<[d3,a3,f4]!2 [d3,bb3,g4]!2> ~]")
.sound("gm_electric_guitar_muted"),
sound("<bd rim>").bank("RolandTR707"),
n("<4 [3@3 4] [<2 0> ~@16] ~>/2")
.scale("D4:minor").sound("gm_accordion:2")
.room(2).gain(.5)
).delay(.5)`}
/>
**control the gain with a sine wave**

View File

@ -190,9 +190,10 @@ It is quite common that there are many ways to express the same idea.
<MiniRepl
hideHeader
client:visible
tune={`sound(\`hh*2 oh,
bd*2, [~ casio],
[jvbass:0 jvbass:1] jvbass:1\`)`}
tune={`sound(\`bd*2, ~ cp,
~ ~ ~ oh, hh*4,
[~ perc:1*2]*2,
[~ jvbass]*2\`)`}
punchcard
/>
@ -201,25 +202,25 @@ bd*2, [~ casio],
Now we've learned the basics of the so called Mini-Notation, the rhythm language of Tidal.
This is what we've leared so far:
| Concept | Syntax | Example |
| ----------------- | ---------- | -------------------------------------------------------------------------------- |
| Sequence | space | <MiniRepl hideHeader client:visible tune={`sound("bd bd sn hh")`} /> |
| Sample Number | :x | <MiniRepl hideHeader client:visible tune={`sound("hh:0 hh:1 hh:2 hh:3")`} /> |
| Rests | ~ | <MiniRepl hideHeader client:visible tune={`sound("metal ~ jazz jazz:1")`} /> |
| Sub-Sequences | \[ \] | <MiniRepl hideHeader client:visible tune={`sound("bd wind [metal jazz] hh")`} /> |
| Sub-Sub-Sequences | \[ \[ \]\] | <MiniRepl hideHeader client:visible tune={`sound("bd [metal [jazz sn]]")`} /> |
| Speed up | \* | <MiniRepl hideHeader client:visible tune={`sound("bd sn*2 cp*3")`} /> |
| Parallel | , | <MiniRepl hideHeader client:visible tune={`sound("bd*2, hh*2 [hh oh]")`} /> |
| Concept | Syntax | Example |
| ----------------- | -------- | -------------------------------------------------------------------------------- |
| Sequence | space | <MiniRepl hideHeader client:visible tune={`sound("bd bd sn hh")`} /> |
| Sample Number | :x | <MiniRepl hideHeader client:visible tune={`sound("hh:0 hh:1 hh:2 hh:3")`} /> |
| Rests | ~ | <MiniRepl hideHeader client:visible tune={`sound("metal ~ jazz jazz:1")`} /> |
| Sub-Sequences | \[\] | <MiniRepl hideHeader client:visible tune={`sound("bd wind [metal jazz] hh")`} /> |
| Sub-Sub-Sequences | \[\[\]\] | <MiniRepl hideHeader client:visible tune={`sound("bd [metal [jazz sn]]")`} /> |
| Speed up | \* | <MiniRepl hideHeader client:visible tune={`sound("bd sn*2 cp*3")`} /> |
| Parallel | , | <MiniRepl hideHeader client:visible tune={`sound("bd*2, hh*2 [hh oh]")`} /> |
## Examples
**Basic rock beat**
<MiniRepl hideHeader client:visible tune={`sound("bd sd, hh*4").bank('RolandTR505').cpm(100/2)`} punchcard />
<MiniRepl hideHeader client:visible tune={`sound("bd sd, hh*4").bank("RolandTR505").cpm(100/2)`} punchcard />
**Classic house**
<MiniRepl hideHeader client:visible tune={`sound("bd*2, ~ cp, [~ hh]*2").bank('RolandTR909')`} punchcard />
<MiniRepl hideHeader client:visible tune={`sound("bd*2, ~ cp, [~ hh]*2").bank("RolandTR909")`} punchcard />
<Box>
@ -230,15 +231,15 @@ Certain drum patterns are reused across genres.
We Will Rock you
<MiniRepl hideHeader client:visible tune={`sound("bd*2 cp").bank('RolandTR707').cpm(81/2)`} punchcard />
<MiniRepl hideHeader client:visible tune={`sound("bd*2 cp").bank("RolandTR707").cpm(81/2)`} punchcard />
**Yellow Magic Orchestra - Firecracker**
<MiniRepl
hideHeader
client:visible
tune={`sound(\`bd sd, ~@3 hh ~ hh ~ ~, ~ perc:1*2 ~ perc:1\`)
.bank('RolandCompurhythm1000')`}
tune={`sound("bd sd, ~ ~ ~ hh ~ hh ~ ~, ~ perc ~ perc:1*2")
.bank("RolandCompurhythm1000")`}
punchcard
/>