folkarc:touch
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
folkarc:touch [2024/06/11 19:44] – discord | folkarc:touch [2024/09/15 19:11] (current) – discord | ||
---|---|---|---|
Line 150: | Line 150: | ||
} | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | If you have [[: | ||
+ | |||
+ | <file tcl> | ||
+ | # Supercollider touch demo | ||
+ | |||
+ | When /thing/ claims /thing2/ has touch number /i/ with x /x/ and y /y/ { | ||
+ | set freq [expr {int($Display:: | ||
+ | |||
+ | Wish Supercollider sound $thing2-touch-noise attr freq is $freq | ||
+ | | ||
+ | Wish $this is labelled "$freq Hz" | ||
+ | |||
+ | Wish Supercollider plays sound $thing2-touch-noise { | ||
+ | arg freq = 0; | ||
+ | var envgen; | ||
+ | envgen = EnvGen.kr(Env.adsr(sustainLevel: | ||
+ | Pan2.ar(SinOsc.ar(freq) * 0.5 * envgen, 1.0); | ||
+ | } | ||
} | } | ||
</ | </ | ||
folkarc/touch.1718135096.txt.gz · Last modified: 2024/06/11 19:44 by discord