aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorRichard <q@1bpm.net>2025-03-09 22:33:07 +0000
committerRichard <q@1bpm.net>2025-03-09 22:33:07 +0000
commite174c759182e11f85e221eff8684088eebd563a4 (patch)
tree70155a2ec6c9fbf46c821ebe66ab63c0f17fbd8d /examples
downloadcsound-shout-e174c759182e11f85e221eff8684088eebd563a4.tar.gz
csound-shout-e174c759182e11f85e221eff8684088eebd563a4.tar.bz2
csound-shout-e174c759182e11f85e221eff8684088eebd563a4.zip
initial
Diffstat (limited to 'examples')
-rw-r--r--examples/example.csd28
-rw-r--r--examples/example2.csd37
2 files changed, 65 insertions, 0 deletions
diff --git a/examples/example.csd b/examples/example.csd
new file mode 100644
index 0000000..eebcf51
--- /dev/null
+++ b/examples/example.csd
@@ -0,0 +1,28 @@
+<CsoundSynthesizer>
+<CsOptions>
+-odac
+</CsOptions>
+<CsInstruments>
+sr = 48000
+ksmps = 64
+nchnls = 2
+0dbfs = 1
+
+instr run
+ ishout shoutinit "10.0.0.1", 8000, "", "stream_my_butt", "/csound.mp3"
+ shoutseturl ishout, "https://csound.1bpm.net"
+ shoutsetgenre ishout, "Csound music"
+ shoutsetdescription ishout, "Live streaming from within Csound"
+ shoutsetname ishout, "Csound stream"
+ shoutopen ishout
+ shoutsetmeta ishout, "song", "Random"
+ a1 = oscil(0.9, abs:k(oscil:k(220, 1)) + 220)
+ shoutsend ishout, a1, a1
+endin
+
+</CsInstruments>
+<CsScore>
+i"run" 0 60
+</CsScore>
+</CsoundSynthesizer>
+
diff --git a/examples/example2.csd b/examples/example2.csd
new file mode 100644
index 0000000..0d1314e
--- /dev/null
+++ b/examples/example2.csd
@@ -0,0 +1,37 @@
+<CsoundSynthesizer>
+<CsOptions>
+-odac
+</CsOptions>
+<CsInstruments>
+sr = 44100
+ksmps = 64
+nchnls = 2
+0dbfs = 1
+
+gifnhello = -1
+gishout init -1
+
+instr oscil
+ a1 = oscil(0.9, abs:k(oscil:k(220, 1)) + 220)
+ shoutsend gishout, a1, a1
+ schedule "hello", p3, 5
+endin
+
+instr hello
+ a1 loscil 1, 1, gifnhello, 1
+ shoutsend gishout, a1, a1
+ schedule "oscil", p3, 5
+endin
+
+instr run
+ gishout shoutopen "10.0.0.1", 8000, "", "stream_my_butt", "/csound.mp3"
+ gifnhello ftts "hello from sea sound", 440
+ schedule "hello", 0, 5
+endin
+
+</CsInstruments>
+<CsScore>
+i"run" 0 36000
+</CsScore>
+</CsoundSynthesizer>
+