| 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 xscans.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 |
;the matrices can be found in /manual/examples |
| 16 |
|
| 17 |
instr 1 ; Plain scanned syntnesis |
| 18 |
|
| 19 |
a0 = 0 |
| 20 |
xscanu 1, .01, 6, 2, "128,8-cylinder.XmatrxT", 4, 5, 2, .1, .1, -.01, .1, .5, 0, 0, a0, 0, 0 |
| 21 |
a1 xscans .7, cpspch(p4), 7, 0, 1 |
| 22 |
outs a1, a1 |
| 23 |
endin |
| 24 |
|
| 25 |
|
| 26 |
instr 2 ; Scan synthesis with audio injection and dual scan paths |
| 27 |
; tap the mic or sing to inject audio into the resonators |
| 28 |
|
| 29 |
a0,aa ins |
| 30 |
a0 = a0/.8 |
| 31 |
xscanu 1, .01, 6, 2, "128,8-grid.XmatrxT", 14, 5, 2, .01, .05, -.05, .1, .5, 0, 0, a0, 0, 0 |
| 32 |
a1 xscans .5, cpspch(7.00), 7, 0, 1 |
| 33 |
a2 xscans .5, cpspch(7.001), 77, 0, 1 |
| 34 |
outs a1+a2,a1+a2 |
| 35 |
endin |
| 36 |
|
| 37 |
|
| 38 |
instr 3 ; Vibrating structure with audio injection |
| 39 |
; Tap the MIC - to inject audio into the resonators |
| 40 |
|
| 41 |
a0,aa ins |
| 42 |
a0 = a0/.8 |
| 43 |
xscanu 1, .01, 6, 2, "128-stringcircular.XmatrxT", 14, 5, 2, .01, .05, -.05, .25, .75, 0, 0, a0, 0, 1 |
| 44 |
endin |
| 45 |
|
| 46 |
|
| 47 |
instr 4 ; Modulated scanners |
| 48 |
|
| 49 |
i1 bexprnd 5 |
| 50 |
i2 bexprnd 1 |
| 51 |
ko oscil i1, i2, 9 |
| 52 |
ka1 oscili .5, .15*8, p7 |
| 53 |
ka2 oscili .5, .15*8, p8 |
| 54 |
kf oscili 1, .15, p4 |
| 55 |
kf = 2^(kf/12)*p6*440+ko |
| 56 |
a1 xscans p9*ka1, kf+i1, 777, 1, 1 |
| 57 |
a2 xscans p9*ka2, (kf+i1)*2.1, 77, 1, 1 |
| 58 |
outs a1+a2, a1+a2 |
| 59 |
endin |
| 60 |
|
| 61 |
</CsInstruments> |
| 62 |
<CsScore> |
| 63 |
; Initial condition |
| 64 |
f1 0 128 7 0 64 1 64 0 |
| 65 |
; Masses |
| 66 |
f2 0 128 -7 1 128 1 |
| 67 |
; Centering force |
| 68 |
f4 0 128 -7 0 128 2 |
| 69 |
f14 0 128 -7 2 64 0 64 2 |
| 70 |
; Damping |
| 71 |
f5 0 128 -7 1 128 1 |
| 72 |
; Initial velocity |
| 73 |
f6 0 128 -7 -.0 128 .0 |
| 74 |
; Trajectories |
| 75 |
f7 0 128 -5 .001 128 128 |
| 76 |
f777 0 128 -23 "128-stringcircular" ;?? |
| 77 |
f77 0 128 -23 "128-spiral-8,16,128,2,1over2.traj" |
| 78 |
; Sine |
| 79 |
f9 0 16384 10 1 |
| 80 |
|
| 81 |
; Pitch tables |
| 82 |
f100 0 1024 -7 +3 128 +3 128 -2 128 -2 128 +0 128 +0 128 -4 128 -4 128 +3 |
| 83 |
f101 0 1024 -7 -2 128 -2 128 -2 128 -2 128 -5 128 -5 128 -4 128 -4 128 -2 |
| 84 |
f102 0 1024 -7 +3 128 +3 128 +2 128 +2 128 +0 128 +0 128 +0 128 +0 128 +3 |
| 85 |
f103 0 1024 -7 +7 128 +7 128 +5 128 +5 128 +3 128 +3 128 +3 128 +3 128 +7 |
| 86 |
|
| 87 |
; Amplitude tables |
| 88 |
f200 0 1024 7 1 128 0 128 0 127 0 1 1 128 0 128 0 127 0 1 1 128 0 127 0 1 1 |
| 89 |
f201 0 1024 7 0 127 0 1 1 127 0 1 1 128 0 127 0 1 1 127 0 1 1 128 0 127 0 1 1 127 0 1 1 |
| 90 |
f202 0 1024 7 1 127 0 1 1 127 0 1 1 127 0 1 1 127 0 1 1 127 0 1 1 127 0 1 1 127 0 1 1 127 0 1 |
| 91 |
f203 0 1024 7 1 1024 0 |
| 92 |
|
| 93 |
;---------------------------------- |
| 94 |
|
| 95 |
; Note list |
| 96 |
i1 0 10 6.00 |
| 97 |
s |
| 98 |
i2 1 10 |
| 99 |
s |
| 100 |
i3 1 23 |
| 101 |
i4 1 23 101 1 .5 200 202 1.5 |
| 102 |
i4 . . 102 0 .5 200 201 1 |
| 103 |
i4 . . 103 0 .5 200 201 1 |
| 104 |
i4 . . 100 0 .25 200 200 2 |
| 105 |
e |
| 106 |
</CsScore> |
| 107 |
</CsoundSynthesizer> |
| 108 |
|