De plugin met Csound is ook gelukt:
En verder de bijlage. Let op dat Csound/Cabbage plugins enkel werken als je ook Csound of Cabbage geïnstalleerd hebt!
Code:
<Cabbage>
form caption("Distortion") size(200, 580), guiMode("queue") pluginId("def1")
rslider bounds(50, 20, 100, 100), channel("A+"), range(-5, 5, 0, 1, 0.01), text("A+") textColour(0, 0, 0, 255)
rslider bounds(50, 130, 100, 100), channel("L+"), range(0, 10, 5, 1, 0.01), text("L+") textColour(0, 0, 0, 255)
rslider bounds(50, 240, 100, 100), channel("A") , range(0, 10, 5, 1, 0.01), text("A") textColour(0, 0, 0, 255)
rslider bounds(50, 350, 100, 100), channel("L-"), range(0, 10, 5, 1, 0.01), text("L-") textColour(0, 0, 0, 255)
rslider bounds(50, 460, 100, 100), channel("A-"), range(-5, 5, 0, 1, 0.01), text("A-") textColour(0, 0, 0, 255)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d
</CsOptions>
<CsInstruments>
ksmps = 32
nchnls = 2
0dbfs = 1
instr 1
kA_plus cabbageGetValue "A+"
kL_plus cabbageGetValue "L+"
kA cabbageGetValue "A"
kL_min cabbageGetValue "L-"
kA_min cabbageGetValue "A-"
kA_plus port kA_plus, 0.1
kL_plus port kL_plus, 0.1
kA port kA, 0.1
kL_min port kL_min, 0.1
kA_min port kA_min, 0.1
a1 inch 1
a2 inch 2
aNul = 0
aR_plus1 max ( a1 + (kL_plus - 5)) , aNul
aR_min1 max (-a1 + (kL_min - 5)) , aNul
aR_plus2 max ( a2 + (kL_plus - 5)) , aNul
aR_min2 max (-a2 + (kL_min - 5)) , aNul
aAmp1 = 2*(5-kA)*a1
aDist_plus1 = 2.5*kA_plus*aR_plus1
aDist_min1 = -1.4*kA_min *aR_min1
aAmp2 = 2*(5-kA)*a2
aDist_plus2 = 2.5*kA_plus*aR_plus2
aDist_min2 = -1.4*kA_min *aR_min2
aOut1 = aAmp1 + aDist_plus1 + aDist_min1
aOut2 = aAmp2 + aDist_plus2 + aDist_min2
aOut1 dcblock2 aOut1
aOut2 dcblock2 aOut2
aOut1 limit aOut1, -0.1, +0.1
aOut2 limit aOut2, -0.1, +0.1
outs aOut1, aOut2
endin
</CsInstruments>
<CsScore>
f0 z
i1 0 [60*60*24*7]
</CsScore>
</CsoundSynthesizer>
En verder de bijlage. Let op dat Csound/Cabbage plugins enkel werken als je ook Csound of Cabbage geïnstalleerd hebt!
