Debian Codegraph @

examples/lorisplay.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;realtime audio out
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o lorisplay.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 ; clarinet.sdif can be found in /manual/examples
16
17 ; Play the partials in clarinet.sdif from 0 to 3 sec with 1 ms fadetime
18 ; and no frequency , amplitude, or bandwidth modification.
19
20 instr 1
21
22 ktime linseg 0, p3, 3.0 ; linear time function from 0 to 3 seconds
23 lorisread ktime, "clarinet.sdif", 1, 1, 1, 1, .001
24 kfrq = p4 ; pitch shifting
25 asig lorisplay 1, kfrq, 1, 1
26 outs asig, asig
27 endin
28
29 ; Play the partials in clarinet.sdif from 0 to 3 sec with 1 ms fadetime
30 ; adding tuning and vibrato, increasing the "breathiness" (noisiness) and overall
31 ; amplitude, and adding a highpass filter.
32
33 instr 2
34
35 ktime linseg 0, p3, 3.0 ; linear time function from 0 to 3 seconds
36 ; compute frequency scale for tuning
37
38 ifscale = cpspch(p4)/cpspch(8.08) ; (original pitch was G#4)
39 ; make a vibrato envelope
40 kvenv linseg 0, p3/6, 0, p3/6, .02, p3/3, .02, p3/6, 0, p3/6, 0
41 kvib oscil kvenv, 4, 1 ; table 1, sinusoid
42 kbwenv linseg 1, p3/6, 1, p3/6, 100, 2*p3/3, 100 ;lots of noise
43 lorisread ktime, "clarinet.sdif", 1, 1, 1, 1, .001
44 a1 lorisplay 1, ifscale+kvib, 2, kbwenv
45 asig atone a1, 1000 ; highpass filter, cutoff 1000 Hz
46 outs asig, asig
47 endin
48
49 </CsInstruments>
50 <CsScore>
51 ; a sinusoid
52 f 1 0 4096 10 1
53
54 i 1 0 3 1.2 ; shifted up
55 i 1 + 1 1.5
56 i 1 + 6 .5 ; shifted down
57 s
58
59 ; strt dur ptch
60 i 2 1 3 8.08
61 i 2 3.5 1 8.04
62 i 2 4 6 8.00
63 i 2 4 6 8.07
64 e
65
66 </CsScore>
67 </CsoundSynthesizer>