Debian Codegraph @

examples/gen44-2.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac --limiter=0.95 ;;;realtime audio out & and 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 gen44-2.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 ; by Menno Knevel 2024
17
18 instr 1 ; move the grain table
19
20 initial ftgenonce 1, 0, 1024, 10, 1 ; initial position = sine wave
21 idispl ftgenonce 2, 0, 1024, -7, .01, 1024, .01 ; displace
22 imass ftgenonce 3, 0, 1024, -7, 5, 1024, 5 ; masses
23 icent ftgenonce 4, 0, 1024, -7, .01, 1024, .1 ; centering
24 idamp ftgenonce 5, 0, 1024, -7, -.1, 1024, -.21 ; damping
25 itraj ftgenonce 6, 0, 1024, -7, 0, 1024, 1024 ; trajectory
26 iw ftgenonce 7, 0, 1024, 20, 2 ; Hanning window for GEN20
27
28 a0 = 0 ; no audio injection
29 kline line .07, p3, 0 ; simple envelope
30 ;scanu2 init, irate, ifndisplace, ifnmass, imatrix, ifncentr, ifndamp, kmass, kmtrxstiff, kcentr, kdamp, ileft, iright, kpos, kdisplace, ain, idisp, id
31 scanu2 1, .003, 2, 3, 100, 4, 5, 10, 6, 0.1, .9, .5, .1, 0, 0, a0, 0, -1
32 aL grain2 p4, p4, 2, 25, 1, 7
33 aR grain2 p4, p4, 2, 25, 1, 7
34 aL dcblock aL
35 aR dcblock aR
36 outs aL * kline, aR * kline
37
38 endin
39
40 </CsInstruments>
41 <CsScore>
42 f100 0 0 -44 "circularstring_1024.matrxT" ; text matrix, to be found in manual/examples
43
44 i1 0 20 466.16376098248423
45 e
46 </CsScore>
47 </CsoundSynthesizer>