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

« back to all changes in this revision

Viewing changes to examples/cross2.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
1
<CsoundSynthesizer>
2
2
<CsOptions>
3
3
; Select audio/midi flags here according to platform
4
 
; Audio out   Audio in    No messages
5
 
-odac           -iadc     -d     ;;;RT audio I/O
 
4
-odac     ;;;RT audio out
 
5
;-iadc    ;;;uncomment -iadc if RT audio input is needed too
6
6
; For Non-realtime ouput leave only the line below:
7
7
; -o cross2.wav -W ;;; for file output any platform
8
8
</CsOptions>
9
9
<CsInstruments>
10
 
 
11
 
; Initialize the global variables.
 
10
; after example from Kevin Conder
12
11
sr = 44100
13
 
kr = 4410
14
 
ksmps = 10
15
 
nchnls = 1
16
 
 
17
 
; Instrument #1 - Play an audio file.
18
 
instr 1
19
 
  ; Use the "beats.wav" audio file.
20
 
  aout soundin "beats.wav"
21
 
  out aout
 
12
ksmps = 32
 
13
nchnls = 2
 
14
0dbfs = 1
 
15
 
 
16
instr 1 ;play audio file
 
17
 
 
18
aout soundin "fox.wav"
 
19
     outs aout, aout
22
20
endin
23
21
 
24
 
; Instrument #2 - Cross-synthesize!
25
 
instr 2
26
 
  ; Use the "ahh" sound stored in Table #1.
27
 
  ain1 loscil 30000, 1, 1, 1
28
 
  ; Use the "beats.wav" audio file.
29
 
  ain2 soundin "beats.wav"
 
22
instr 2 ;cross-synthesize
 
23
 
 
24
icps = p4
 
25
ifn  = p5               ; Use the "ahh.aiff" sound and "eee.aiff"
 
26
ain1 oscil 0.6, p4, ifn
 
27
ain2 soundin "fox.wav"  ; Use the "fox.wav" as modulator
30
28
 
31
29
  isize = 4096
32
30
  ioverlap = 2
33
 
  iwin = 2
 
31
  iwin = 3
34
32
  kbias init 1
35
33
 
36
 
  aout cross2 ain1, ain2, isize, ioverlap, iwin, kbias
37
 
 
38
 
  out aout
 
34
aout cross2 ain1, ain2, isize, ioverlap, iwin, kbias
 
35
     outs aout, aout
39
36
endin
40
37
 
41
 
 
42
38
</CsInstruments>
43
39
<CsScore>
44
 
 
45
 
; Table #1: An audio file.
 
40
;audio files
46
41
f 1 0 128 1 "ahh.aiff" 0 4 0
47
 
; Table #2: A windowing function.
48
 
f 2 0 2048 20 2
49
 
 
50
 
; Play Instrument #1 for 2 seconds.
51
 
i 1 0 2
52
 
; Play Instrument #2 for 2 seconds.
53
 
i 2 2 2
 
42
f 2 0 128 1 "eee.aiff" 0 4 0
 
43
 
 
44
f 3 0 2048 20 2 ;windowing function
 
45
 
 
46
i 1 0 3
 
47
 
 
48
i 2 3 3  50     1 ;"eee.aiff"
 
49
i 2 + 3  50     2 ;"ahh.aiff"
 
50
i 2 + 3  100    1 ;"eee.aiff"
 
51
i 2 + 3  100    2 ;"ahh.aiff"
 
52
i 2 + 3  250    1 ;"eee.aiff"
 
53
i 2 + 3  250    2 ;"ahh.aiff"
 
54
i 2 + 3  20     1 ;"eee.aiff"
 
55
i 2 + 3  20     2 ;"ahh.aiff"
54
56
e
55
57
 
56
 
 
57
58
</CsScore>
58
 
</CsoundSynthesizer>
 
59
</CsoundSynthesizer>
 
 
b'\\ No newline at end of file'