Debian Codegraph @

examples/hrtfmove.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select flags here
4 ; realtime audio out
5 -o dac
6 ; For Non-realtime ouput leave only the line below:
7 ;-o hrtf.wav
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 kr = 4410
13 ksmps = 10
14 nchnls = 2
15
16 gasrc init 0
17
18 instr 1 ;a plucked string
19
20 kamp = p4
21 kcps = cpspch(p5)
22 icps = cpspch(p5)
23
24 a1 pluck kamp, kcps, icps, 0, 1
25
26 gasrc = a1
27
28 endin
29
30 instr 10 ;uses output from instr1 as source
31
32 kaz linseg 0, p3, 720 ;2 full rotations
33
34 aleft,aright hrtfmove gasrc, kaz,0, "hrtf-44100-left.dat","hrtf-44100-right.dat"
35
36 outs aleft, aright
37
38 endin
39
40 </CsInstruments>
41 <CsScore>
42
43 ; Play Instrument 1: a simple arpeggio
44 i1 0 .2 15000 8.00
45 i1 + .2 15000 8.04
46 i1 + .2 15000 8.07
47 i1 + .2 15000 8.11
48 i1 + .2 15000 9.02
49 i1 + 1.5 15000 8.11
50 i1 + 1.5 15000 8.07
51 i1 + 1.5 15000 8.04
52 i1 + 1.5 15000 8.00
53 i1 + 1.5 15000 7.09
54 i1 + 1.5 15000 8.00
55
56 ; Play Instrument 10 for 10 seconds.
57 i10 0 10
58
59 </CsScore>
60 </CsoundSynthesizer>