| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac ;;;realtime audio out |
| 5 |
;-iadc ;;;uncomment -iadc if realtime audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o bob.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
sr = 44100 |
| 12 |
ksmps = 32 |
| 13 |
nchnls = 2 |
| 14 |
0dbfs = 1 |
| 15 |
|
| 16 |
ga1 init 0 |
| 17 |
ga2 init 0 |
| 18 |
|
| 19 |
seed 777 |
| 20 |
|
| 21 |
instr 7 |
| 22 |
a0 vco2 1, cpsmidinn(p4) ; a saw wave to be filtered |
| 23 |
k1 jspline 0.7, 0.7, 1/0.7; add some jitter to filter resonance |
| 24 |
kA linseg 0, p3/17, 1, (17-2)*p3/17, 1, p3/17, 0; overal amplitude envelope |
| 25 |
k7 linseg 70, p3/3, 700, p3/3, 700, p3/3, 70; filter cutoff envelope |
| 26 |
k77 expseg sqrt(7), p3/2, 7.7, p3/2, sqrt(7); filter resonance modulation |
| 27 |
a1 bob a0 * kA, k7 - k1 * 70, k77 + k1, 3; PD bob~ ported |
| 28 |
a1 /= 7; some normalization to avoid overload |
| 29 |
aL = p5 * a1; and then panning |
| 30 |
aR = a1 * (1 - p5) |
| 31 |
outs aL, aR |
| 32 |
|
| 33 |
ga1 += aL/7; AUX send |
| 34 |
ga2 += aR/7 |
| 35 |
endin |
| 36 |
|
| 37 |
instr 77 ; What a sound without some good reverb?? |
| 38 |
a1,a2 reverbsc ga1,ga2, 0.97+.1/7, 7777 |
| 39 |
outs a1, a2 |
| 40 |
ga1 = 0 |
| 41 |
ga2 = 0 |
| 42 |
endin |
| 43 |
</CsInstruments> |
| 44 |
<CsScore> |
| 45 |
i 7 0 30 70 0.7; Perfect 7th |
| 46 |
i 7 0 30 77 0.7 |
| 47 |
i 77 0 40 |
| 48 |
; In text editor try Find and Replace to substitute all 7 numbers for 3...8 ) |
| 49 |
; all 8s is a bit too high, all 3s is a bit too low, 4 sounds great! |
| 50 |
; Do such replacement in initial 7 file, otherwise avoid accidental changes in the header... |
| 51 |
|
| 52 |
; Tired of numerology? Try this: |
| 53 |
; i 7 0 30 60 0.6 |
| 54 |
; i 7 0 32 45 0.4 |
| 55 |
|
| 56 |
e |
| 57 |
</CsScore> |
| 58 |
</CsoundSynthesizer> |