Debian Codegraph @

examples/pitch.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 real audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o pitch.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 2022
17
18 instr 1 ;clean audio
19
20 asig soundin p4
21 outs asig, asig
22 endin
23
24 instr 2 ;use pitch
25
26 iupdte = 0.001 ;high definition
27 ilo = 6
28 ihi = 10
29 idbthresh = 10
30 ifrqs = 12
31 iconf = 10
32 istrt = 8
33
34 Sfile = p4
35 asig soundin Sfile
36
37 koct, kamp pitch asig, iupdte, ilo, ihi, idbthresh, ifrqs, iconf, istrt
38 kamp = kamp*.00004 ;lower volume
39 kcps = cpsoct(koct)
40 asig poscil kamp, kcps, 1 ;re-synthesize with sawtooth
41 printf "now %s is used...\n\n", 1, Sfile
42 outs asig, asig
43
44 endin
45 </CsInstruments>
46 <CsScore>
47 f1 0 16384 10 1 0.5 0.3 0.25 0.2 0.167 0.14 0.125 .111 ;sawtooth
48
49 i 1 0 3 "fox.wav"
50 i 2 3 3 "fox.wav"
51 i 1 6 4 "singFemale.aif"
52 i 2 10 4 "singFemale.aif"
53 i 1 15 2 "drumsMlp.wav"
54 i 2 17 2 "drumsMlp.wav"
55 e
56 </CsScore>
57 </CsoundSynthesizer>