diff options
Diffstat (limited to 'BUG4/BUG4.csd')
-rw-r--r-- | BUG4/BUG4.csd | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/BUG4/BUG4.csd b/BUG4/BUG4.csd new file mode 100644 index 0000000..fbeefa3 --- /dev/null +++ b/BUG4/BUG4.csd @@ -0,0 +1,128 @@ +<CsoundSynthesizer> +<CsOptions> +-odac +</CsOptions> +<CsInstruments> +/* + Debugger - Unfixed Bugs : BUG #4 + + http://git.1bpm.net/csd-unfixedbugs1/about/ + + By Richard Knight 2021 + http://1bpm.net + q@1bpm.net + +*/ + +sr = 44100 +ksmps = 10 +nchnls = 2 +0dbfs = 1 +seed 0 + +gitempo = 118 +gkmastergain init 1 ; master gain +gkpump = 0 ; kick ducking control +gkreverse init 0 ; global reverse + +#include "wavetables.udo" ; general waveforms +#include "bussing.udo" ; global audio bussing +#include "instruments.udo" ; sound generators + + +instr global_delay1 + aL, aR bus_read "delay1" + ifreq1 = (118 / 60) / 2 + kfdbkL = abs(oscil(0.6, 1.63)) + kfdbkR = abs(oscil(0.6, 1.67)) + + atimeL = abs(oscil(0.3, ifreq1)) + atimeR = abs(oscil(0.3, ifreq1)) + + aLdlr delayr 1 + aLdel deltapi atimeL + aLdel butterhp aLdel, 130 + delayw aL + (aLdel * kfdbkL) + + aRdlr delayr 1 + aRdel deltapi atimeR + aRdel butterhp aRdel, 130 + delayw aR + (aRdel * kfdbkR) + + + bus_mix("master", aLdel, aRdel) +endin + +instr global_delay2 + aL, aR bus_read "delay2" + aLdlr delayr 0.2 + kdeltime = abs(oscil(0.02, 0.04)) + 0.01 + aLdel deltapi kdeltime + 0.002 + delayw aL + (aLdel * 0.7) + aRdlr delayr 0.2 + aRdel deltapi kdeltime + 0.001 + delayw aR + (aRdel * 0.7) + bus_mix("master", aLdel, aRdel) +endin + +/* + Master audio output +*/ +instr global_master + igain = 0.4 + aL, aR bus_read "master" + ;aL limit aL*0.8, 0, 1 + ;aR limit aR*0.8, 0, 1 + outs aL*gkmastergain*igain, aR*gkmastergain*igain +endin + +instr seq + event_i "i", "global_master", 0, p3 + event_i "i", "global_delay1", 0, p3 + event_i "i", "global_delay2", 0, p3 + kbeat metro (gitempo / 60) * 4 + kpos init 0 + if (kbeat == 1) then + if (kpos % 3 == 0) then + event "i", "play_rim", 0, 1 + endif + + if ((kpos+1) % 2 == 0 && random:k(0, 1) > 0.8) then + event "i", "play_303", 0, 0.01, 106, 106, 90, 1 + endif + + km8m init 0 + if ((kpos+1) % 8 == 0) then + kstart = (km8m == 0) ? 40 : 45 + kend = (km8m == 0) ? 43 : 38 + event "i", "play_303", 0, 0.3, kstart, kend, 40, 0 + km8m = 1- km8m + endif + + + if (kpos % 9 == 0) then + ;event "i", "play_blip", 0, 0.01 + endif + + if (kpos % 4 == 0) then + event "i", "play_kick", 0, 0.2, 0 + endif + + if ((kpos+2) % 16 == 0) then + event "i", "play_kick", 0, 0.4, 1 + endif + + if (kpos % 8 == 0) then + event "i", "play_clap", 0, 0.02 + endif + + kpos += 1 + endif +endin + +</CsInstruments> +<CsScore> +i"seq" 0 400 + +</CsScore> +</CsoundSynthesizer>
\ No newline at end of file |