Debian Codegraph @

examples/sndloop.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 sndloop.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 0dbfs = 1
14 nchnls = 2
15
16 instr 1
17
18 itrig = p4
19 asig diskin2 "drumsMlp.wav", 1, 0, 1 ;get the signal in, loop it
20 ktrig line 0, itrig, 1 ;when to trigger signal = p4
21 kpitch line 1.2, p3, .5 ;vary pitch of recorded signal
22 aout,krec sndloop asig, kpitch, ktrig, .4, 0.05 ;rec starts at p4 sec, for .4 secs and 0.05 crossfade
23 printk2 krec ; prints the recording signal
24 outs aout, aout
25
26 endin
27
28 </CsInstruments>
29 <CsScore>
30
31 i1 0 5 .5 ;trigger in seconds (=p4)
32 i1 + 5 .8
33 i1 + 10 1.2
34
35 e
36 </CsScore>
37 </CsoundSynthesizer>