From 91b1344bbc18f81ed2681c5684af3fee37556517 Mon Sep 17 00:00:00 2001 From: severak Date: Tue, 29 Oct 2019 11:57:04 +0100 Subject: [PATCH] Commented MIDI delay. --- commented_cabbage/MIDI_Delay.csd | 83 ++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 commented_cabbage/MIDI_Delay.csd diff --git a/commented_cabbage/MIDI_Delay.csd b/commented_cabbage/MIDI_Delay.csd new file mode 100644 index 0000000..f2a1518 --- /dev/null +++ b/commented_cabbage/MIDI_Delay.csd @@ -0,0 +1,83 @@ +; MIDI_Delay.csd +; Written by Iain McCurdy, 2015 + +; comments added by Severak, 2019 + +; Time - delay time (initial delay time if 'Warp' is anything other than '1' +; Warp - warp ratio of the delay time - each delay iteration will have its delay time multiplied by this value +; Repeats - number of repeats/echoes. Bear in mind that having many repeats will put greater polyphony strain on subsequent synths responding to the MIDI. +; Decay - velocity decay of subsequent delays. Each subsequent velocity of each delay iteration is multipled by this value. +; Arpeggio - note number increase (additive) of each subsequent delay iteration. + + +form caption("MIDI Delay"), size(300,100), pluginid("MiDl") style("legacy") +rslider bounds(0,5,60,60), channel("DelTim"), range(0.01,2,0.2,0.5,0.01), text("Time") +rslider bounds(60,5,60,60), channel("warp"), range(0.5,2,1,0.5,0.01), text("Warp") +rslider bounds(120,5,60,60), channel("rpts"), range(1,50,7,1,1), text("Repeats") +rslider bounds(180,5,60,60), channel("decay"), range(0,1,0.3,1,0.01), text("Decay") +rslider bounds(240,5,60,60), channel("arp"), range(-12,12,0,1,1), text("Arpeggio") +;checkbox bounds(310,15,90,15), channel("mono"), text("No Overlaps") + + + + + + +-dm0 -+rtmidi=null -Q0 -M0 --midi-key=4 --midi-velocity=5 -n + + + + +;sr is set by the host +ksmps = 16 +nchnls = 2 +0dbfs = 1 + +opcode MIDI_Delay_Layer,0,kkkkiiiiii + kstatus,kchan,kdata1,kdata2,iDelTim,iwarp,idecay,iarp,icount,irpts xin + ; delays those signals by iDelTim: + kstatus2 delayk kstatus,iDelTim + kchan2 delayk kchan,iDelTim + kdata1_2 delayk kdata1,iDelTim + kdata2_2 delayk kdata2,iDelTim + if changed(kstatus2)==1 then + ; midout if delayed signal changed + midiout kstatus2, kchan2, limit(kdata1_2+iarp,0,127), kdata2_2*idecay + endif + if icount + + +i 1 0 [3600*24*7] + + +