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

« back to all changes in this revision

Viewing changes to examples/chanctrl.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   No messages  MIDI in
 
5
-odac            -d         -M0  ;;;RT audio I/O with MIDI in
 
6
;-iadc    ;;;uncomment -iadc if RT audio input is needed too
 
7
; For Non-realtime ouput leave only the line below:
 
8
; -o chanctrl.wav -W ;;; for file output any platform
 
9
</CsOptions>
 
10
<CsInstruments>
 
11
 
 
12
sr = 44100
 
13
ksmps = 32
 
14
nchnls = 2
 
15
0dbfs = 1
 
16
 
 
17
instr 1 ; press your midi keyboard and move your midi controller to see result
 
18
 
 
19
ichnl  = 1              ;MIDI note inputs on channel 1
 
20
ictlno = 7              ;use midi volume controller 
 
21
kch  chanctrl ichnl, 7  ;to control amplitude of oscil
 
22
     printk2  kch
 
23
 
 
24
asig oscil kch*(1/127), 220, 1
 
25
     outs  asig, asig
 
26
endin
 
27
 
 
28
</CsInstruments>
 
29
<CsScore>
 
30
;Dummy f-table to give time for real-time MIDI events
 
31
f 0 30
 
32
;sine wave.
 
33
f 1 0 16384 10 1
 
34
e
 
35
 
 
36
</CsScore>
 
37
</CsoundSynthesizer>