Debian Codegraph @

examples/gen44.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.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 1
14 0dbfs = 1
15
16 instr scan
17
18 a0 init 0
19
20 irate = .01
21
22 kmass line 2,p3,5
23 kstiff line 30,p3,45
24 kcenter line .08,p3,.01
25 kdamp line .01,p3,.08
26 kpos line 0,p3,16
27 kdisplace line 0,p3,.5
28
29 ;scanu2 init,irate,ifndisplace,ifnmass,ifnmatrix,ifncentr,ifndamp,kmass,kmtrxstiff,
30 ; kcentr, kdamp, ileft, iright, kpos, kdisplace, ain, idisp, id
31 scanu2 -1, irate, 6, 2, 3, 4, 5, kmass, kstiff, kcenter, kdamp, .2, .7, kpos, kdisplace, a0, 1, 2
32
33 ;ar scans kamp, kfreq, ifntraj, id
34 a1 scans ampdbfs(p4), cpspch(p5), 7, 2
35 a1 dcblock2 a1
36 out a1
37 endin
38
39 </CsInstruments>
40 <CsScore>
41 ; Initial displacement condition
42 f1 0 16 10 1 ; sine hammer
43 f2 0 16 -7 1 16 1 ; Masses
44 f3 0 0 -44 "string_with_extras-16.matrxT" ; Spring matrices
45 f4 0 16 -7 1 16 1 ; Centering force, uniform initial centering
46 f5 0 16 -7 1 16 1 ; Damping, uniform damping
47 ; Initial displacement - (displacement, vel, and acceleration
48 ; Acceleration is from stiffness matrix pos effect - increases acceleration
49 f6 0 16 -7 .01 16 .01 ; uniform initial velocity-displacement
50 f7 0 16 -5 .001 16 16 ; Trajectories
51
52 i"scan" 0 2 -6 7.00
53 i"scan" 2 2 -6 5.00
54 i"scan" 4 2 -6 6.00
55 i"scan" 6 2 -6 8.00
56 i"scan" 8 2 -6 10.00
57
58 e
59 </CsScore>
60 </CsoundSynthesizer>