~ubuntu-branches/ubuntu/trusty/csound-manual/trusty-proposed

« back to all changes in this revision

Viewing changes to examples/locsend_stereo.csd

  • Committer: Bazaar Package Importer
  • Author(s): Felipe Sateler
  • Date: 2011-08-01 22:21:58 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110801222158-90kslkp5ujci2f5d
Tags: 1:5.13~dfsg-1
* New upstream release
 - Add Menno Knevel to the copyright file
 - Refresh patch 2000-stripped-opcodes.diff
 - Update copyright hints file
* Update Vcs-* headers
* Bump Standards-Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<CsoundSynthesizer>
 
2
<CsOptions>
 
3
; Select audio/midi flags here according to platform
 
4
; Audio out   Audio in    No messages
 
5
-odac           -iadc     -d     ;;;RT audio I/O
 
6
; For Non-realtime ouput leave only the line below:
 
7
; -o locsend_stereo.wav -W ;;; for file output any platform
 
8
</CsOptions>
 
9
<CsInstruments>
 
10
 
 
11
; Initialize the global variables.
 
12
sr = 44100
 
13
kr = 4410
 
14
ksmps = 10
 
15
nchnls = 2
 
16
 
 
17
ga1     init    0
 
18
ga2     init    0
 
19
; Instrument #1
 
20
instr 1
 
21
  ; Use the "beats.wav" audio file.
 
22
aout            diskin2 "beats.wav", 1, 0, 1
 
23
kdegree line 0, p3, 180
 
24
kdistance       line 1, p3 , 30
 
25
a1, a2          locsig aout, kdegree, kdistance, .1
 
26
ar1, ar2        locsend
 
27
ga1     =       ga1+ar1
 
28
ga2     =       ga2+ar2
 
29
 
 
30
 
 
31
  outs a1, a2
 
32
endin
 
33
 
 
34
instr 99 ; reverb instrument
 
35
a1      reverb2 ga1, 2.5, .5
 
36
a2      reverb2 ga2, 2.5, .5
 
37
        outs    a1, a2
 
38
ga1=0
 
39
ga2=0
 
40
endin
 
41
</CsInstruments>
 
42
<CsScore>
 
43
 
 
44
; Table #1, a sine wave.
 
45
f 1 0 16384 10 1
 
46
 
 
47
; Play Instrument #1 for five seconds.
 
48
i 1 0 2
 
49
i99 0 5
 
50
e
 
51
 
 
52
 
 
53
</CsScore>
 
54
</CsoundSynthesizer>