From 43aa2247f13df1ce7aa226d870f1cf95b319c207 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Tue, 29 Nov 2022 00:05:36 +0100 Subject: [PATCH] baasic csound output --- packages/csound/sounds.csd | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 packages/csound/sounds.csd diff --git a/packages/csound/sounds.csd b/packages/csound/sounds.csd new file mode 100644 index 00000000..8ea6a4b6 --- /dev/null +++ b/packages/csound/sounds.csd @@ -0,0 +1,41 @@ +;; based on https://kunstmusik.github.io/icsc2022-csound-web/tutorial2-interacting-with-csound/ + + +-o dac --port=10000 + + +sr=48000x +ksmps=64 +nchnls=2 +0dbfs=1 + +instr 1 + ioct = octcps(p4) + kpwm = oscili(.1, 5) + asig = vco2(p5, p4, 4, .5 + kpwm) + asig += vco2(p5, p4 * 2) + + idepth = 3 + acut = transegr:a(0, .005, 0, idepth, .06, -4.2, 0.001, .01, -4.2, 0) + asig = zdf_2pole(asig, cpsoct(ioct + acut), 0.125) + + asig *= linsegr:a(1, p3, 1, .125, 0) + + out(asig, asig) + +endin + +opcode next_time, i, i + inext xin + + itime = times:i() + iticks = round(itime / inext) + iticks += 1 + + iout = (iticks * inext) - itime + xout iout +endop + + + + \ No newline at end of file