summaryrefslogtreecommitdiff
path: root/examples-xml/lposcil.csd.xml
blob: e35e824ec656d81ec6507a4adb06bf63576e4024 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<programlisting>
<emphasis role="csdtag">&lt;CsoundSynthesizer&gt;</emphasis>
<emphasis role="csdtag">&lt;CsOptions&gt;</emphasis>
<emphasis role="comment">; Select audio/midi flags here according to platform</emphasis>
<emphasis role="comment">; Audio out   Audio in    No messages</emphasis>
-odac           -iadc     -d     <emphasis role="comment">;;;RT audio I/O</emphasis>
<emphasis role="comment">; For Non-realtime ouput leave only the line below:</emphasis>
<emphasis role="comment">; -o lposcil.wav -W ;;; for file output any platform</emphasis>
<emphasis role="csdtag">&lt;/CsOptions&gt;</emphasis>
<emphasis role="csdtag">&lt;CsInstruments&gt;</emphasis>

<emphasis role="comment">; Initialize the global variables.</emphasis>
<emphasis role="ohdr">sr</emphasis> <emphasis role="op">=</emphasis> 44100
<emphasis role="ohdr">kr</emphasis> <emphasis role="op">=</emphasis> 4410
<emphasis role="ohdr">ksmps</emphasis> <emphasis role="op">=</emphasis> 10
<emphasis role="ohdr">nchnls</emphasis> <emphasis role="op">=</emphasis> 1

<emphasis role="comment">; Instrument #1.</emphasis>
<emphasis role="oblock">instr</emphasis> 1
   kamp <emphasis role="op">=</emphasis> 30000
   kcps <emphasis role="op">=</emphasis> 1.5
   ifn <emphasis role="op">=</emphasis> 1
  kloop <emphasis role="op">=</emphasis> 0
  kend <emphasis role="op">=</emphasis> 45000

   a1 <emphasis role="opc">lposcil</emphasis> kamp, kcps, kloop, kend, ifn
   <emphasis role="opc">out</emphasis> a1
<emphasis role="oblock">endin</emphasis>


<emphasis role="csdtag">&lt;/CsInstruments&gt;</emphasis>
<emphasis role="csdtag">&lt;CsScore&gt;</emphasis>

<emphasis role="comment">; Table #1: an audio file.</emphasis>
<emphasis role="comment">; Its table size is deferred,</emphasis>
<emphasis role="comment">; and format taken from the soundfile header.</emphasis>
<emphasis role="stamnt">f</emphasis> 1 0 0 1 "beats.wav" 0 0 0

<emphasis role="comment">; Play Instrument #1 for 6 seconds.</emphasis>
<emphasis role="comment">; This will loop the drum pattern several times.</emphasis>
<emphasis role="stamnt">i</emphasis> 1 0 6
<emphasis role="stamnt">e</emphasis>


<emphasis role="csdtag">&lt;/CsScore&gt;</emphasis>
<emphasis role="csdtag">&lt;/CsoundSynthesizer&gt;</emphasis>
</programlisting>