| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
-odac --limiter=0.95 ;;;realtime audio out & limit loud sounds |
| 5 |
;-iadc ;;;uncomment -iadc if realtime audio input is needed too |
| 6 |
; For Non-realtime ouput leave only the line below: |
| 7 |
; -o xscanu.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 |
; Note Also that I am using quadratic interpolation on these. |
| 19 |
a0 = 0 |
| 20 |
xscanu 1, .01, 6, 2, "128,8-grid.XmatrxT", 4, 5, 2, .1, .1, -.01, .1, .5, 0, 0, a0, 0, 0 |
| 21 |
a1 xscans .5, cpspch(p4), 333, 0, p6 ; NOTE LEFT RIGHT TRAJECTORY (f333) IS CLEAN! |
| 22 |
a1 dcblock a1 |
| 23 |
outs a1, a1 |
| 24 |
endin |
| 25 |
|
| 26 |
|
| 27 |
instr 2 ; Scan synthesis with audio injection and dual scan paths |
| 28 |
|
| 29 |
a0 diskin2 "fox.wav",1,0,1 |
| 30 |
; a0,aa ins |
| 31 |
a0 = a0/.8 |
| 32 |
xscanu 1, .01, 6, 2, "128,8-torus.XmatrxT", 14, 5, 2, .01, .05, -.05, .1, .5, 0, 0, a0, 0, 0 |
| 33 |
a1 xscans .3, cpspch(7.00), 333, 0, 2 ; NOTE LEFT RIGHT TRAJECTORY (f333) IS CLEAN! |
| 34 |
a2 xscans .3, cpspch(6.00), 77, 0, 2 |
| 35 |
a1 dcblock a1 |
| 36 |
a2 dcblock a2 |
| 37 |
outs a1*.5,a2*.1 |
| 38 |
endin |
| 39 |
|
| 40 |
</CsInstruments> |
| 41 |
<CsScore> |
| 42 |
|
| 43 |
; Initial condition |
| 44 |
;f1 0 16 7 0 8 1 8 0 |
| 45 |
f1 0 128 7 0 64 1 64 0 |
| 46 |
|
| 47 |
; Masses |
| 48 |
f2 0 128 -7 1 128 1 |
| 49 |
|
| 50 |
; Centering force |
| 51 |
f4 0 128 -7 0 128 2 |
| 52 |
f14 0 128 -7 2 64 0 64 2 |
| 53 |
|
| 54 |
; Damping |
| 55 |
f5 0 128 -7 1 128 1 |
| 56 |
|
| 57 |
; Initial velocity |
| 58 |
f6 0 128 -7 -.0 128 .0 |
| 59 |
|
| 60 |
; Trajectories |
| 61 |
f7 0 128 -5 .001 128 128 |
| 62 |
f77 0 128 -23 "128-spiral-8,16,128,2,1over2.traj" |
| 63 |
f777 0 128 -23 "128,8-torus.XmatrxT" |
| 64 |
|
| 65 |
; Spring matrices |
| 66 |
f3 0 128 -23 "128-string.XmatrxT" |
| 67 |
f33 0 128 -23 "128-stringcircular.XmatrxT" |
| 68 |
f333 0 128 -23 "128-left_right.XmatrxT" |
| 69 |
f3333 0 128 -23 "128,8-torus.XmatrxT" |
| 70 |
f33333 0 128 -23 "128,8-cylinder.XmatrxT" |
| 71 |
f333333 0 128 -23 "128,8-grid.XmatrxT" |
| 72 |
|
| 73 |
; Sine |
| 74 |
f9 0 1024 10 1 |
| 75 |
|
| 76 |
; Pitch tables |
| 77 |
f100 0 1024 -7 +3 128 +3 128 -2 128 -2 128 +0 128 +0 128 -4 128 -4 128 +3 |
| 78 |
f101 0 1024 -7 -2 128 -2 128 -2 128 -2 128 -5 128 -5 128 -4 128 -4 128 -2 |
| 79 |
f102 0 1024 -7 +3 128 +3 128 +2 128 +2 128 +0 128 +0 128 +0 128 +0 128 +3 |
| 80 |
f103 0 1024 -7 +7 128 +7 128 +5 128 +5 128 +3 128 +3 128 +3 128 +3 128 +7 |
| 81 |
|
| 82 |
; Amplitude tables |
| 83 |
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 |
| 84 |
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 |
| 85 |
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 |
| 86 |
f203 0 1024 7 1 1024 0 |
| 87 |
;;f204 0 1024 7 1 512 0 511 0 1 1 |
| 88 |
|
| 89 |
;----------------------- |
| 90 |
|
| 91 |
; Note list |
| 92 |
i1 0 10 6.00 1 2 |
| 93 |
s |
| 94 |
i2 0 15 |
| 95 |
e |
| 96 |
</CsScore> |
| 97 |
</CsoundSynthesizer> |
| 98 |
|