| 1 |
; Csound Haiku V |
| 2 |
; Iain McCurdy 2011 |
| 3 |
; small code modifcations by joachim heintz 2024 |
| 4 |
|
| 5 |
<CsoundSynthesizer> |
| 6 |
<CsOptions> |
| 7 |
-odac -dm0 |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
sr = 44100 |
| 11 |
ksmps = 32 |
| 12 |
nchnls = 2 |
| 13 |
0dbfs = 1 |
| 14 |
seed 0 |
| 15 |
|
| 16 |
gasendL init 0 |
| 17 |
gasendR init 0 |
| 18 |
|
| 19 |
instr trigger_6_notes_and_plucks |
| 20 |
inotes[] = fillarray(40,45,50,55,59,64) |
| 21 |
indx = 0 |
| 22 |
while (indx < lenarray(inotes)) do |
| 23 |
schedule("string",0,1,inotes[indx]) |
| 24 |
indx += 1 |
| 25 |
od |
| 26 |
if (metro(rspline:k(0.005,0.15,0.1,0.2)) == 1) then |
| 27 |
schedulek("pluck",0,2) |
| 28 |
endif |
| 29 |
endin |
| 30 |
schedule("trigger_6_notes_and_plucks",0,-1) |
| 31 |
|
| 32 |
instr pluck |
| 33 |
aenv = expseg:a(0.0001,0.02,1,0.2,0.0001,1,0.0001) |
| 34 |
apluck = pinkish(aenv) |
| 35 |
koct = randomi:k(5,10,2,3) |
| 36 |
gapluck = butlp(apluck,cpsoct(koct)) |
| 37 |
endin |
| 38 |
|
| 39 |
instr string |
| 40 |
p3 = 3600*24*7 // :) |
| 41 |
adlt = rspline(50,250,0.03,0.06) |
| 42 |
apluck = vdelay3(gapluck,adlt,500) |
| 43 |
adtn = jspline(15,0.002,0.02) |
| 44 |
astring = wguide1(apluck,mtof:i(p4)*semitone(adtn),5000,0.9995) |
| 45 |
astring = dcblock(astring) |
| 46 |
kpan = rspline:k(0,1,0.1,0.2) |
| 47 |
astrL,astrR pan2 astring,kpan |
| 48 |
out(astrL,astrR) |
| 49 |
gasendL += astrL*0.6 |
| 50 |
gasendR += astrR*0.6 |
| 51 |
endin |
| 52 |
|
| 53 |
instr reverb |
| 54 |
aL,aR reverbsc gasendL,gasendR,0.85,10000 |
| 55 |
out(aL,aR) |
| 56 |
clear(gasendL,gasendR) |
| 57 |
endin |
| 58 |
schedule("reverb",0,-1) |
| 59 |
|
| 60 |
</CsInstruments> |
| 61 |
<CsScore> |
| 62 |
e 3600 |
| 63 |
</CsScore> |
| 64 |
</CsoundSynthesizer> |
| 65 |
<bsbPanel> |
| 66 |
<label>Widgets</label> |
| 67 |
<objectName/> |
| 68 |
<x>100</x> |
| 69 |
<y>100</y> |
| 70 |
<width>320</width> |
| 71 |
<height>240</height> |
| 72 |
<visible>true</visible> |
| 73 |
<uuid/> |
| 74 |
<bgcolor mode="background"> |
| 75 |
<r>240</r> |
| 76 |
<g>240</g> |
| 77 |
<b>240</b> |
| 78 |
</bgcolor> |
| 79 |
</bsbPanel> |
| 80 |
<bsbPresets> |
| 81 |
</bsbPresets> |