aboutsummaryrefslogtreecommitdiff
path: root/examples/all.csd
diff options
context:
space:
mode:
authorRichard Knight <q@1bpm.net>2025-06-20 18:33:18 +0100
committerRichard Knight <q@1bpm.net>2025-06-20 18:33:18 +0100
commit5d31136bd3be537866dc867d2c2bc094e3222dde (patch)
tree5ff06fe8f055203bbc3918adef9e24a10a69452b /examples/all.csd
downloadcsound-bitbitch-master.tar.gz
csound-bitbitch-master.tar.bz2
csound-bitbitch-master.zip
initialHEADmaster
Diffstat (limited to 'examples/all.csd')
-rw-r--r--examples/all.csd118
1 files changed, 118 insertions, 0 deletions
diff --git a/examples/all.csd b/examples/all.csd
new file mode 100644
index 0000000..a9b9d53
--- /dev/null
+++ b/examples/all.csd
@@ -0,0 +1,118 @@
+<CsoundSynthesizer>
+<CsOptions>
+-odac
+</CsOptions>
+<CsInstruments>
+sr = 44100
+kr = 4410
+nchnls = 2
+0dbfs = 1
+seed 0
+
+opcode example_source, a, 0
+ asig oscil 0.1, abs(oscil(220, 0.7)) + 220
+ xout asig
+endop
+
+/*
+ kdensity = random:k(random:k(0, 1), random:k(0.1, 0.9))
+ krepeattrig = abs(oscil(1.5, random:k(3, 14)))
+ kbufread = abs(oscil(1, random:k(7, 13)))
+ kbufmode = int(random:k(0, 2))
+ a1 bitchrandom 1, kdensity, krepeattrig, kbufread, kbufmode
+*/
+
+opcode example_bitchrandom, a, 0
+ kamp init 0.1
+ kdensity init 1
+ krepeattrig = abs(oscil(2, 0.4))
+ kbufread = abs(oscil(1, random:k(7, 13)))
+ kbufmode init 1
+ ibufsize = 4410
+ aout bitchrandom kamp, kdensity, krepeattrig, kbufread, kbufmode ; [, ibufsize]
+ xout aout
+endop
+
+opcode example_bitchglitch, a, a
+ ain xin
+ kread init 0
+ kmetro metro 1
+ if (kmetro == 1) then
+ kread = 1 - kread
+ endif
+ ksizeratio = abs(oscil(0.5, 2)) + 0.01
+ aout bitchglitch ain, kread, ksizeratio
+ xout aout
+endop
+
+instr bitchrandom
+ aout = example_bitchrandom()
+ outs aout, aout
+endin
+
+instr bitchglitch
+ ain = example_source()
+ aout = example_bitchglitch(ain)
+ outs aout, aout
+endin
+
+instr bitchwreck
+ ibuffersize = 1
+ ain = example_source()
+ kwrite init 0
+ kmetro metro abs:k(oscil:k(10, 0.7)) + 2
+ if (kmetro == 1) then
+ kwrite = 1 - kwrite
+ endif
+ aout bitchwreck ain, ibuffersize, kwrite
+ outs aout, aout
+endin
+
+instr bitchpan
+ ain = example_source()
+ ksamples = abs(oscil(20, 0.1)) + 1
+ aL, aR bitchpan ain, ksamples
+ outs aL, aR
+endin
+
+instr bitchaverage
+ ain = example_source()
+ kratio = abs(oscil(1, 0.5))
+ aout bitchaverage ain, kratio, 1024
+ outs aout, aout
+endin
+
+instr bitchpeaker
+ ain = example_source()
+ kbufferratio = abs(oscil(1, abs(oscil(20, 0.2))))
+ kconsiderationratio = abs(oscil(0.7, 0.9))
+ aout bitchpeaker ain, kbufferratio, kconsiderationratio, 128, 512
+ outs aout, aout
+endin
+
+instr bitchall
+ asig = example_bitchrandom()
+
+ asig = example_bitchglitch(asig)
+
+ kbufferratio = abs(oscil(1, abs(oscil(20, 0.2))))
+ kconsiderationratio = abs(oscil(0.7, 0.9))
+
+ asig bitchaverage asig, abs:k(oscil:k(1, 1)), 128
+
+ asig bitchpeaker asig, kbufferratio, kconsiderationratio, 128, 512
+
+ aL, aR bitchpan asig, abs:k(oscil:k(abs:k(oscil:k(500, 0.2)) + 40, 1.05)) + 1
+ outs aL, aR
+endin
+</CsInstruments>
+<CsScore>
+;i"bitchrandom" 0 10
+;i"bitchglitch" 0 10
+;i"bitchwreck" 0 10
+;i"bitchpan" 0 10
+;i"bitchaverage" 0 10
+;i"bitchpeaker" 0 10
+i"bitchall" 0 10
+</CsScore>
+</CsoundSynthesizer> \ No newline at end of file