aboutsummaryrefslogtreecommitdiff
path: root/examples
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
downloadcsound-bitbitch-master.tar.gz
csound-bitbitch-master.tar.bz2
csound-bitbitch-master.zip
initialHEADmaster
Diffstat (limited to 'examples')
-rw-r--r--examples/all.csd118
-rw-r--r--examples/bitch_average.csd38
-rw-r--r--examples/test.csd35
-rw-r--r--examples/test2.csd27
4 files changed, 218 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
diff --git a/examples/bitch_average.csd b/examples/bitch_average.csd
new file mode 100644
index 0000000..1ade270
--- /dev/null
+++ b/examples/bitch_average.csd
@@ -0,0 +1,38 @@
+<CsoundSynthesizer>
+<CsOptions>
+-odac
+;-o/tmp/out/4.wav
+</CsOptions>
+<CsInstruments>
+
+sr = 48000
+kr = 48000
+nchnls = 2
+0dbfs = 1
+
+instr 1
+ Sfile = "/store/Store/Documents/Audio/Audio/Random/2021/Sonics Tuned Pieces/Guitar - Plectrum Light Chorus/86.0.wav"
+ ;Sfile = "/store/Store/Documents/Audio/Audio/Random/2021/Sonics Tuned Pieces/HurdyGurdy/61.0.wav"
+ ;Sfile = "/tmp/t.wav"
+ aL, aR diskin Sfile, 1
+ aL *= 0.6
+ aR *= 0.6
+ p3 = filelen(Sfile) + 2
+ ibase = 1600
+ aL bitchpeaker aL, ibase - 2
+ aR bitchpeaker aR, ibase + 2
+ aL bitchwreck aL, 0.1, abs:k(oscil:k(2, 2.9))
+ aR bitchwreck aR, 0.1, abs:k(oscil:k(2, 1.1))
+ outs aL, aR
+
+endin
+
+</CsInstruments>
+; ==============================================
+<CsScore>
+i1 0 60
+
+
+</CsScore>
+</CsoundSynthesizer>
+
diff --git a/examples/test.csd b/examples/test.csd
new file mode 100644
index 0000000..bcd1da5
--- /dev/null
+++ b/examples/test.csd
@@ -0,0 +1,35 @@
+<CsoundSynthesizer>
+<CsOptions>
+-odac
+</CsOptions>
+<CsInstruments>
+sr = 44100
+kr = 4410
+nchnls = 2
+0dbfs = 1
+seed 0
+
+
+instr 1
+ ipan = p4
+ 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
+ a2 bitchglitch a1, oscil:k(0.1, random:k(25, 35)), abs(oscil:k(2, random:k(0.1, 0.5))) ;bitchpeaker a1, 2048
+ a3 bitchwreck a2, 1024, abs(oscil:k(2, random:k(0.2, 0.8)))
+ a5 bitchwreck a3, 1024, abs(oscil:k(2, random:k(2, 6)))
+ ;a6 waveset a5, abs(oscil:k(20, random:k(0.1, 0.5)))
+ outs a5*ipan, a5*(1-ipan)
+endin
+
+
+
+</CsInstruments>
+<CsScore>
+i1 0 60 0.75
+i1 0 60 0.25
+
+</CsScore>
+</CsoundSynthesizer>
diff --git a/examples/test2.csd b/examples/test2.csd
new file mode 100644
index 0000000..9a20e58
--- /dev/null
+++ b/examples/test2.csd
@@ -0,0 +1,27 @@
+<CsoundSynthesizer>
+<CsOptions>
+-odac
+</CsOptions>
+<CsInstruments>
+sr = 44100
+kr = 4410
+nchnls = 2
+0dbfs = 1
+seed 0
+
+
+instr 1
+ Sfile = "/store/Store/Documents/Audio/Audio/Random/2021/Sonics Tuned Pieces/Guitar - Plectrum Light Chorus/86.0.wav"
+ a1, a_ diskin Sfile, 0.5
+ a2 bitchpeaker a1, 2048
+ outs a2, a2
+endin
+
+
+
+</CsInstruments>
+<CsScore>
+i1 0 60
+
+</CsScore>
+</CsoundSynthesizer>