This should play if your Web browser has WebAssembly enabled (most do). Most examples will play unless they need to load files. The first time you click Play, Csound will spend a few seconds loading, then play. You can edit this code and replay it.
; Select audio/midi flags here according to platform -odac ;;;realtime audio out ;-iadc ;;;uncomment -iadc if RT audio input is needed too ; For Non-realtime ouput leave only the line below: ; -o loop_gt.wav -W ;;; for file output any platform ; By Stefano Cucchi - 2021 ; Required settings for WebAudio: sr = 48000 ksmps = 128 nchnls = 2 nchnls_i = 1 ; sr = 44100 ; ksmps = 32 ; nchnls = 2 0dbfs = 1 gisaw ftgen 3, 0, 16384, 10, 0, .2, 0, .4, 0, .6, 0, .8, 0, 1, 0, .8, 0, .6, 0, .4, 0,.2 instr 1 ;master instrument indxFreq = p5 loop: ifreq = p4 + indxFreq print ifreq iamp = 0.5/((p5-p7)/p6) event_i "i", 10, 0, p3, iamp, ifreq loop_gt indxFreq, p6, p7, loop endin instr 10 asig oscili p4, p5, gisaw asig butterhp asig, 50 kdeclick linseg 0, 0.1, 1, p3-0.2, 1, 0.1, 0 outs asig * kdeclick, asig * kdeclick endin i1 0 2 200 10 3 1 i1 2 2 200 4 0.3 1 i1 4 2 200 55 7 1 i1 6 2 200 3 0.2 1 e