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.
-o dac ; Required settings for WebAudio: sr = 48000 ksmps = 128 nchnls = 2 nchnls_i = 1 instr 1 kwhen init 0 kmetro metro 1 kwhen += kmetro OSCsend kwhen, "127.0.0.1",7771, "/foo/bar", "f", kwhen endin instr 2 Smess[] init 3 top: Smess,ka OSCraw 7771 kn = 0 while kn < ka do printf ": %s ", kn+1, Smess[kn] kn += 1 od printf "%d items\n", ka, kn if ka > 0 kgoto top endin i1 0 10 i2 0 10