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.
-odac ; Required settings for WebAudio: sr = 48000 ksmps = 128 nchnls = 2 nchnls_i = 1 0dbfs = 1 instr 1 gkamp = p4 gkfr = p5 gkgate = 1 gkatt = p6 gkdec = p7 gksus = p8 gkrel = p9 endin instr 2 a1 oscili gkamp,gkfr a2 gtad; sr a1,gkatt,gkdec,gksus,gkrel,gkgate out a2 gkgate = 0; endin i1 0 1 1 440 0.1 0.1 0.5 0.1 i1 1.2 1 1 660 0.01 0.1 0.2 0.3 i1 2.5 1 1 550 0.01 0.1 0.7 1 i2 0 5