two more examples

This commit is contained in:
2023-09-26 23:48:23 +02:00
parent a2e8b49f01
commit 36fbc17903

View File

@ -158,8 +158,7 @@ ${makeExample(
` `
z1('q Amin!2').key(["A2", "E2"].beat(4)) z1('q Amin!2').key(["A2", "E2"].beat(4))
.sound('sawtooth').cutoff(500) .sound('sawtooth').cutoff(500)
.lpadsr(2, 0, .5, 0, 0, 0).out() .lpadsr(2, 0, .5, 0, 0, 0).out()`
z2('east east east:2 east').sound().out()`
)} )}
${makeExample( ${makeExample(
@ -200,9 +199,10 @@ Ziffers provides shorthands for **many** numeric and algorithimic operations suc
${makeExample( ${makeExample(
"Element-wise operations for melodic generation", "Element-wise operations for melodic generation",
` `
z1("q 0 s (3 2 1)+(2 5) q 0 s (4 5 6)-(2 3)").sound('sine') z1("1/8 _ 0 (0 1 3)+(1 2) 0 (2 3 5)-(1 2)").sound('sine')
.scale('minor').fmi(2).fmh(2).room(0.5).size(0.5).sustain(0.1) .scale('pentatonic').fmi([0.25,0.5].beat(2)).fmh([2,4].beat(2))
.delay(0.5).delay(0.125).delayfb(0.25).out(); .room(0.9).size(0.9).sustain(0.1).delay(0.5).delay(0.125)
.delayfb(0.25).out();
`, `,
true true
)} )}
@ -212,10 +212,11 @@ z1("q 0 s (3 2 1)+(2 5) q 0 s (4 5 6)-(2 3)").sound('sine')
${makeExample( ${makeExample(
"Random numbers, true computer music at last!", "Random numbers, true computer music at last!",
` `
z1("s (0,8) 0 0 (0,5) 0 0").sound('sine') z1("s _ (0,8) 0 0 (0,5) 0 0").sound('sine')
.scale('minor').fmi(2).fmh(2).room(0.5) .adsr(0, .1, 0, 0).scale('minor')
.size(0.5).sustain(0.1) .delay(0.5) .fmdec(0.25).fmi(2).fmh([0.5, 0.25].beat(2))
.delay(0.125).delayfb(0.25).out(); .room(0.9).size(0.5).sustain(0.1) .delay(0.5)
.delay(0.125).delayfb(0.25).out();
beat(.5) :: snd(['kick', 'hat'].beat(.5)).out() beat(.5) :: snd(['kick', 'hat'].beat(.5)).out()
`, `,
true true