From f4937c373986d8e5f5c010574c103d08958eb897 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Thu, 31 Aug 2023 15:57:29 +0200 Subject: [PATCH] document important feature --- src/documentation/synths.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/documentation/synths.ts b/src/documentation/synths.ts index aea23be..eb93406 100644 --- a/src/documentation/synths.ts +++ b/src/documentation/synths.ts @@ -188,7 +188,16 @@ mod(.25) :: sound('z_tan') `, true )} -${makeExample("Funny Gameboy Tune", ``, false)} +${makeExample( + "What is happening to me?", + ` +mod(1) :: snd('zzfx').zzfx([ + [4.77,,25,,.15,.2,3,.21,,2.4,,,,,,,.23,.35], + [1.12,,97,.11,.16,.01,4,.77,,,30,.17,,,-1.9,,.01,.67,.2] + ].beat()).out() +`, + false +)} ${makeExample( "Les voitures dans le futur", ` @@ -202,6 +211,16 @@ mod(1) :: sound(['z_triangle', 'z_sine'].pick()) false )} +Note that you can also design sounds [on this website](https://killedbyapixel.github.io/ZzFX/) and copy the generated code in Topos. To do so, please use the zzfx method with the generated array: +${makeExample( + "Designing a sound on the ZzFX website", + ` + +mod(2) :: sound('zzfx').zzfx([3.62,,452,.16,.1,.21,,2.5,,,403,.05,.29,,,,.17,.34,.22,.68]).out() +`, + true +)} + # Speech synthesis Topos can also speak using the [Web Speech API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API). Speech synthesis can be used in two ways: