Debian Codegraph @

examples/scanu2-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 scanu2-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 ; play with k-rate parameters
19
20 a0 init 0
21 irate = .2
22
23 kmass line 10, p3, 1
24 kstiff line .30, p3, .7
25 kcenter line .3, p3, .01
26 kdamp line -.01, p3, -.1
27 kdisplace line 0, p3, 1
28
29 scanu2 1, irate, 6, 2, 3, 4, 5, kmass, kstiff, kcenter, kdamp, .1, .7, 1, kdisplace, a0, 1, 5
30 asig scans ampdbfs(p4), cpspch(p5), 7, 5
31 asig dcblock2 asig
32 asigL, asigR reverbsc asig, asig, .6, 10000, sr, .5, 1 ; add some reverb
33 outs asigL+asig, asigR+asig
34 endin
35
36 </CsInstruments>
37 <CsScore>
38 ; Initial displacement condition
39 f1 0 1024 10 1 ; sine
40 f2 0 1024 -7 1 1024 1 ; Masses
41 ; Spring text matrix
42 f3 0 0 -44 "circularstring_1024.matrxT" ; text matrix, to be found in manual/examples
43 f4 0 1024 -7 1 1024 1 ; uniform initial centering
44 f5 0 1024 -7 1 1024 1 ; uniform damping
45 ; Initial displacement - (displacement, vel, and acceleration
46 ; Acceleration is from stiffness matrix pos effect - increases acceleration
47 f6 0 1024 -7 .01 1024 .01 ; uniform initial velocity-displacement
48 f7 0 1024 -5 .001 1024 1024 ; Trajectory
49
50 i1 0.0 6.5 -6 7.00
51 i1 6.5 6.5 -9 7.07 ; 2 notes
52 i1 6.5 6.5 -9 7.04
53 e
54 </CsScore>
55 </CsoundSynthesizer>