From 510d32100f523a901d960013c50d481bf63d21df Mon Sep 17 00:00:00 2001 From: Richard Knight Date: Fri, 30 Dec 2022 20:43:17 +0000 Subject: fix permissions on reading and mempsname --- examples/memson-fltk.csd | 2 +- examples/memson-fltk2.csd | 1 + examples/memson-t2.csd | 4 ++-- examples/rawread.csd | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 examples/rawread.csd (limited to 'examples') diff --git a/examples/memson-fltk.csd b/examples/memson-fltk.csd index 44e80a8..301bdc8 100644 --- a/examples/memson-fltk.csd +++ b/examples/memson-fltk.csd @@ -18,7 +18,7 @@ FLrun instr 1 idata[] memps - ipid = idata[int(random(0, lenarray(idata)-1))] + ipid = 5945 Sname = sprintf("%s (%d)", mempsname(ipid), ipid) FLsetText Sname, gilabel a1 memson ipid, gkx, gky, 44100, 1 diff --git a/examples/memson-fltk2.csd b/examples/memson-fltk2.csd index a4beb8a..4dce09b 100644 --- a/examples/memson-fltk2.csd +++ b/examples/memson-fltk2.csd @@ -20,6 +20,7 @@ instr 1 idata[] memps ipid = idata[int(random(0, lenarray(idata)-1))] Sname = sprintf("%s (%d)", mempsname(ipid), ipid) +prints Sname FLsetText Sname, gilabel ifn mem2tab ipid, 1 aindex lphasor 1 diff --git a/examples/memson-t2.csd b/examples/memson-t2.csd index c732d1e..d62c37e 100644 --- a/examples/memson-t2.csd +++ b/examples/memson-t2.csd @@ -16,8 +16,8 @@ instr 1 print ipid kr1 line 0, p3, 1 kr2 line 0, p3, 1 - ;a1 memson2 ipid, 0.4, 0.5; kr2 - a1 memson ipid, 0;kr1 + a1 memson2 ipid, 0.4, 0.5; kr2 + ;a1 memson ipid, 0;kr1 a1 dcblock a1*0.1 outs a1, a1 endin diff --git a/examples/rawread.csd b/examples/rawread.csd new file mode 100644 index 0000000..005a558 --- /dev/null +++ b/examples/rawread.csd @@ -0,0 +1,35 @@ + + +-odac + + +sr = 44100 +kr = 4410 +nchnls = 2 +0dbfs = 1 +seed 0 + + +instr 1 + a1 rawread "/usr/bin/zip" + a1 *= 0.1 + outs a1, a1 +endin + +instr 2 + aL, aR rawread "/usr/bin/zip", 1 + outs aL*0.1, aR*0.1 +endin + +instr 3 + ifn rawreadtable "/usr/bin/zip" + a1 loscil 0.1, 1, ifn, 1 + + outs a1, a1 +endin + + + +i3 0 60 + + -- cgit v1.2.3