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 -Mhw:1,0,0 ; Required settings for WebAudio: sr = 48000 ksmps = 128 nchnls = 2 nchnls_i = 1 gicnt cntCreate 1 ; a toggle gicntNote cntCreate 1 ; ignore note-off message to turn MIDI notes into toggles instr 1 kkey sensekey inote notnum if (kkey == 97) then k1 count gicnt if k1==0 then event "i", 2, 0, -1 else event "d", 2, 0, -1 endif endif print inote if (inote == 60) then i2 count_i gicntNote print i2 if i2==0 then event_i "i", 3, 0, -1 else event_i "d", 3, 0, -1 endif endif endin instr 2 asig oscil 10000, 440 out asig endin instr 3 asig oscil 5000, 880 out asig endin i1 0 z e