summaryrefslogtreecommitdiff
path: root/examples-xml/tabmorphi.csd.xml
diff options
context:
space:
mode:
Diffstat (limited to 'examples-xml/tabmorphi.csd.xml')
-rw-r--r--examples-xml/tabmorphi.csd.xml43
1 files changed, 43 insertions, 0 deletions
diff --git a/examples-xml/tabmorphi.csd.xml b/examples-xml/tabmorphi.csd.xml
new file mode 100644
index 0000000..87c260c
--- /dev/null
+++ b/examples-xml/tabmorphi.csd.xml
@@ -0,0 +1,43 @@
+<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>
+-odac <emphasis role="comment">;;;realtime audio out</emphasis>
+<emphasis role="comment">;-iadc ;;;uncomment -iadc if realtime audio input is needed too</emphasis>
+<emphasis role="comment">; For Non-realtime ouput leave only the line below:</emphasis>
+<emphasis role="comment">; -o tabmorphi.wav -W ;;; for file output any platform</emphasis>
+<emphasis role="csdtag">&lt;/CsOptions&gt;</emphasis>
+<emphasis role="csdtag">&lt;CsInstruments&gt;</emphasis>
+
+<emphasis role="ohdr">sr</emphasis> <emphasis role="op">=</emphasis> 44100
+<emphasis role="ohdr">ksmps</emphasis> <emphasis role="op">=</emphasis> 32
+<emphasis role="ohdr">nchnls</emphasis> <emphasis role="op">=</emphasis> 2
+<emphasis role="ohdr">0dbfs</emphasis> <emphasis role="op">=</emphasis> 1
+
+giSine <emphasis role="ohdr">ftgen</emphasis> 0, 0, 8193, 10, 1 <emphasis role="comment">;sine wave</emphasis>
+giSquare <emphasis role="ohdr">ftgen</emphasis> 0, 0, 8193, 7, 1, 4096, 1, 0, <emphasis role="op">-</emphasis>1, 4096, <emphasis role="op">-</emphasis>1 <emphasis role="comment">;square wave</emphasis>
+giTri <emphasis role="ohdr">ftgen</emphasis> 0, 0, 8193, 7, 0, 2048, 1, 4096, <emphasis role="op">-</emphasis>1, 2048, 0 <emphasis role="comment">;triangle wave</emphasis>
+giSaw <emphasis role="ohdr">ftgen</emphasis> 0, 0, 8193, 7, 1, 8192, <emphasis role="op">-</emphasis>1 <emphasis role="comment">;sawtooth wave, downward slope</emphasis>
+
+<emphasis role="oblock">instr</emphasis> 1
+
+iamp <emphasis role="op">=</emphasis> .7
+kindex <emphasis role="opc">phasor</emphasis> 440 <emphasis role="comment">;read table value at this index</emphasis>
+kindex <emphasis role="op">=</emphasis> kindex<emphasis role="op">*</emphasis>8192 <emphasis role="comment">;for all 8192 index points</emphasis>
+kweightpoint <emphasis role="op">=</emphasis> 0.5 <emphasis role="comment">;set weightpoint</emphasis>
+ktabnum1 <emphasis role="opc">line</emphasis> 0, p3, 3 <emphasis role="comment">;morph through all tables</emphasis>
+ktabnum2 <emphasis role="op">=</emphasis> 2 <emphasis role="comment">;set to triangle wave</emphasis>
+ksig <emphasis role="opc">tabmorphi</emphasis> kindex, kweightpoint, ktabnum1, ktabnum2, giSine, giSquare, giTri, giSaw
+ksig <emphasis role="op">=</emphasis> ksig<emphasis role="op">*</emphasis>iamp
+asig <emphasis role="opc">interp</emphasis> ksig <emphasis role="comment">;convert to audio signal</emphasis>
+<emphasis role="opc">outs</emphasis> asig, asig
+
+<emphasis role="oblock">endin</emphasis>
+<emphasis role="csdtag">&lt;/CsInstruments&gt;</emphasis>
+<emphasis role="csdtag">&lt;CsScore&gt;</emphasis>
+
+<emphasis role="stamnt">i</emphasis>1 0 5
+<emphasis role="stamnt">e</emphasis>
+<emphasis role="csdtag">&lt;/CsScore&gt;</emphasis>
+<emphasis role="csdtag">&lt;/CsoundSynthesizer&gt;</emphasis>
+</programlisting> \ No newline at end of file