This commit is contained in:
amiika
2023-11-17 14:47:47 +00:00
parent 1040ca455f
commit 1e47159b42
6 changed files with 8 additions and 8 deletions

Binary file not shown.

View File

@ -414,7 +414,7 @@ Method chains become fun if you add just a little bit of complexity to them. You
## Registering a chain
You can use the <ic>register()</ic> function to... register a chain that you would like to re-use later on.
You can use the <ic>register(...args)</ic> function to... register a chain that you would like to re-use later on.
${e("Re-creating a classic Tidal function",`
// Playing with extreme panning and playback rate
@ -424,21 +424,21 @@ register('juxrev', n=>n.pan([0, 1]).speed([1, -1]))
beat(1)::sound('fhh').juxrev().out()
`,!0)}
This is an extremely powerful construct. For example, you can use it to create synthesizer presets!
This is an extremely powerful construct. For example, you can use it to create synthesizer presets and reuse them later on. You can also define parameters for your registered functions. For example:
${e("Re-creating a classic Tidal function",`
// Registering a specific synth architecture
register('sub', n=>n.ad(0, .25)
.fmi(4).pan([0, 1])
register('sub', (n,x=4,y=80)=>n.ad(0, .25)
.fmi(x).pan([0, 1])
.delay(0.5).delayt(1/8).delayfb(1/3)
.lpf(25+usine(1/3)*80)
.lpf(25+usine(1/3)*y)
.lpad(4, 0, .25)
)
// Using it with an arpeggio
rhythm(.25, [6, 8].beat(), 12)::sound('sine')
.note([0, 2, 4, 5].scale('minor', 50).beat(0.5))
.sub().out()`,!0)}
.sub(8).out()`,!0)}
## Conditional chaining

BIN
assets/index-90c7e125.js.gz Normal file

Binary file not shown.