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.
; Required settings for WebAudio: sr = 48000 ksmps = 128 nchnls = 2 nchnls_i = 1 ; Example file ftslice /* ftslice: Copy slice from source table to destination table Syntax: ftslice ifnsource, ifndest, kstart=0, kend=0, kstep=1 ifnsource: source table ifndest: destination table kstart: the index to start copying from kend: the end index to stop copying. This is NOT inclusive. 0=end of table kstep: how many elements to skip See also: tablecopy, tableicopy, tab2array */ instr 1 ifn ftgentmp 0, 0, -13, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 idest ftgentmp 0, 0, -11, -2, 0 ; empty table of size 11 ; copy only even elements ftslice ifn, idest, 0, 0, 2 ftprint idest ; copy too many elements - only the elements which fit in the dest table ; are copyed ftslice ifn, idest ftprint idest turnoff endin i 1 0 0.1