aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorRichard Knight <q@1bpm.net>2022-12-30 20:43:17 +0000
committerRichard Knight <q@1bpm.net>2022-12-30 20:43:17 +0000
commit510d32100f523a901d960013c50d481bf63d21df (patch)
treec6a5a782b8b2c320e487776a02a7e70b221ad914 /examples
parent4f73db87c653ccffcb3cddddaf003b9d09546122 (diff)
downloadcsound-datacore-510d32100f523a901d960013c50d481bf63d21df.tar.gz
csound-datacore-510d32100f523a901d960013c50d481bf63d21df.tar.bz2
csound-datacore-510d32100f523a901d960013c50d481bf63d21df.zip
fix permissions on reading and mempsname
Diffstat (limited to 'examples')
-rw-r--r--examples/memson-fltk.csd2
-rw-r--r--examples/memson-fltk2.csd1
-rw-r--r--examples/memson-t2.csd4
-rw-r--r--examples/rawread.csd35
4 files changed, 39 insertions, 3 deletions
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 @@
+<CsoundSynthesizer>
+<CsOptions>
+-odac
+</CsOptions>
+<CsInstruments>
+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
+
+</CsInstruments>
+<CsScore>
+i3 0 60
+</CsScore>
+</CsoundSynthesizer>