tutorial updates

This commit is contained in:
Jack Armitage 2022-12-25 16:21:18 +00:00
parent 823115c4ec
commit 858f4f74b3
14 changed files with 744 additions and 390 deletions

View file

@ -0,0 +1,41 @@
---
title: Synths
description: Strudel Tutorial - Synths
layout: ../../layouts/MainLayout.astro
---
import { MiniRepl } from '../../docs/MiniRepl';
import { JsDoc } from '../../docs/JsDoc';
# Synths
For now, [samples](/learn/samples) are the main way to play with Strudel.
In future, more powerful synthesis capabilities will be added.
If in the meantime you want to dive deeper into audio synthesis with Tidal, you will need to [install SuperCollider and SuperDirt](https://tidalcycles.org/docs/).
## Playing synths with `s`
We can change the sound, using the `s` function:
<MiniRepl client:idle tune={`note("c2 <eb2 <g2 g1>>").s('sawtooth')`} />
Here, we are wrapping our notes inside `note` and set the sound using `s`, connected by a dot.
Those functions are only 2 of many ways to alter the properties, or _params_ of a sound.
The power of patterns allows us to sequence any _param_ independently:
<MiniRepl client:idle tune={`note("c2 <eb2 <g2 g1>>").s("<sawtooth square triangle>")`} />
Now we not only pattern the notes, but the sound as well!
`sawtooth` `square` and `triangle` are the basic waveforms available in `s`.
## Ampltude Envelope
You can control the envelope of a synth using the `attack`, `decay`, `sustain` and `release` functions:
<MiniRepl
client:idle tune={`note("c2 <eb2 <g2 g1>>").s('sawtooth')
.attack(.1).decay(.1).sustain(.2).release(.1)`}
/>
<br/>