summaryrefslogtreecommitdiff
path: root/examples/sndloop.csd
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sndloop.csd')
-rw-r--r--[-rwxr-xr-x]examples/sndloop.csd36
1 files changed, 18 insertions, 18 deletions
diff --git a/examples/sndloop.csd b/examples/sndloop.csd
index d3cf257..6c8c1d5 100755..100644
--- a/examples/sndloop.csd
+++ b/examples/sndloop.csd
@@ -1,37 +1,37 @@
<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-; Audio out Audio in
--odac -iadc ;;;RT audio I/O
+-odac ;;;realtime audio out
+;-iadc ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
-; -o sndloop.wav -W -t60 ;;; for file output any platform
+; -o sndloop.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
-; Initialize the global variables.
-sr = 44100
-kr = 4410
-ksmps = 10
-nchnls = 1
+sr = 44100
+ksmps = 32
+0dbfs = 1
+nchnls = 2
-; Instrument #1.
instr 1
-ifade = p4
-asig diskin2 "beats.wav", 1 ; get the signal in
-ktrig line 0, 1, 1 ; trigger signal
-aout,krec sndloop asig, .8, ktrig, .4, ifade ; rec starts at 1 sec, for 4 secs 0.05 crossfade
- printk 1, krec ; prints the recording signal
- out aout
+
+itrig = p4
+asig diskin2 "beats.wav", 1, 0, 1 ;get the signal in, loop it
+ktrig line 0, itrig, 1 ;when to trigger signal = p4
+kpitch line 1.2, p3, .5 ;vary pitch of recorded signal
+aout,krec sndloop asig, kpitch, ktrig, .4, 0.05 ;rec starts at p4 sec, for .4 secs and 0.05 crossfade
+ printk2 krec ; prints the recording signal
+ outs aout, aout
endin
</CsInstruments>
<CsScore>
-i1 0 3.5 .05
-i1 + 3.5 .25
+i1 0 5 .5 ;trigger in seconds (=p4)
+i1 + 5 .8
+i1 + 10 1.2
e
-
</CsScore>
</CsoundSynthesizer>