better sounding examples on front page

This commit is contained in:
2023-08-27 22:40:29 +02:00
parent 9792d4458e
commit f84141c1e8

View File

@ -82,11 +82,15 @@ Welcome to the Topos documentation. These pages are offering you an introduction
${makeExample( ${makeExample(
"Welcome! Eval to get started", ` "Welcome! Eval to get started", `
mod([1/4,1/8,1/16].div(8)):: sound('sine') mod([1/4,1/8,1/16].div(8)):: sound('sine')
.freq([100,50].div(16) + 50 * ($(1)%10)) .freq([100,50].div(16) + 50 * ($(1)%10))
.gain(0.5).room(0.9).size(0.9) .gain(0.5).room(0.9).size(0.9)
.sustain(0.1).out() .sustain(0.1).out()
mod(1) :: sound('kick').out()`, mod(1) :: sound('kick').out()
mod(2) :: sound('dr').n(5).out()
div(3) :: mod([.25,.5].div(.5)) :: sound('dr')
.n([8,9].pick()).gain([.8,.5,.25,.1,.0].div(.25)).out()`,
true true
)} )}
@ -129,37 +133,33 @@ Press ${key_shortcut(
${makeExample( ${makeExample(
"Drums and arpeggios", "Drums and arpeggios",
` `
bpm(80) bpm(110)
mod(0.25) && sound('sawtooth') mod(0.125) && sound('sawtooth')
.note(seqbar( .note([60, 62, 63, 67, 70].div(.125) +
[60, 67, 63].pick() - 12, [60, 67, 63].pick() - 12, [-12,0,12].beat() + [0, 0, 5, 7].bar())
[60, 67, 63].pick() - 12 + 5, [60, 67, 63].pick() - 12 + 5, .sustain(0.1).fmi(0.25).fmh(2).room(0.9)
[60, 67, 63].pick() - 12 + 7, [60, 67, 63].pick() - 12 + 7) + (sometimes() ? 24 : 12) .gain(0.75).cutoff(500 + usine(8) * [500, 1000, 2000].bar())
) .delay(0.5).delayt(0.25).delayfb(0.25)
.sustain(0.1).fmi(8).fmh(4).room(0.9)
.gain(0.75).cutoff(500 + usine(8) * 10000)
.delay(0.5).delaytime(bpm() / 60 / 4 / 3)
.delayfeedback(0.25)
.out(); .out();
mod(1) && snd('kick').out(); mod(1) && snd('kick').out();
mod(2) && snd('snare').out(); mod(2) && snd('snare').out();
mod(.5) && snd('hat').out(); mod(.5) && snd('hat').out();`,
`,
true true
)} )}
${makeExample( ${makeExample(
"Resonant madness", "Resonant madness",
`mod(.5)::snd('synth2') `
.freq([50,50*1.25,50*1.5,50*1.75].div(8) / 2) mod(.25)::snd('arpy')
.cutoff(usine(.5) * 5000).resonance(15).end(0.8).room(0.9).size(0.9).n(7).out(); .note(30 + [0,3,7,10].beat())
mod(.25)::snd('synth2') .cutoff(usine(.5) * 5000).resonance(10).gain(0.3)
.freq([50,50*1.25,50*1.5,50*1.75].div(.5)) .end(0.8).room(0.9).size(0.9).n(0).out();
.cutoff(usine(.5) * 5000).resonance(15) mod([.25,.125].div(2))::snd('arpy')
.end(0.2).room(0.9).size(0.9).n(14).out() .note(30 + [0,3,7,10].beat())
mod(1)::snd('kick').out() .cutoff(usine(.5) * 5000).resonance(20).gain(0.3)
mod(2)::snd('snare').shape(0.5).out() .end(0.8).room(0.9).size(0.9).n(3).out();
mod(.75)::snd('hat').shape(0.4).out()`, mod(.5) :: snd('arpy').note(
[30, 33, 35].repeatAll(4).div(1) - [12,0].div(0.5)).out()`,
false false
)} )}
`; `;