summaryrefslogtreecommitdiff
path: root/examples-xml/randomh.csd.xml
diff options
context:
space:
mode:
Diffstat (limited to 'examples-xml/randomh.csd.xml')
-rw-r--r--examples-xml/randomh.csd.xml28
1 files changed, 15 insertions, 13 deletions
diff --git a/examples-xml/randomh.csd.xml b/examples-xml/randomh.csd.xml
index 37263fc..04ae7a9 100644
--- a/examples-xml/randomh.csd.xml
+++ b/examples-xml/randomh.csd.xml
@@ -15,31 +15,33 @@
<emphasis role="ohdr">ksmps</emphasis> <emphasis role="op">=</emphasis> 10
<emphasis role="ohdr">nchnls</emphasis> <emphasis role="op">=</emphasis> 1
+ <emphasis role="ohdr">seed</emphasis> 0
+
<emphasis role="comment">; Instrument #1.</emphasis>
<emphasis role="oblock">instr</emphasis> 1
<emphasis role="comment">; Choose a random frequency between 220 and 440 Hz.</emphasis>
<emphasis role="comment">; Generate new random numbers at 10 Hz.</emphasis>
- kmin <emphasis role="op">=</emphasis> 220
- kmax <emphasis role="op">=</emphasis> 440
- kcps <emphasis role="op">=</emphasis> 10
-
- k1 <emphasis role="opc">randomh</emphasis> kmin, kmax, kcps
-
- <emphasis role="opc">printks</emphasis> "k1 <emphasis role="op">=</emphasis> <emphasis role="op">%</emphasis>f\\n", 0.1, k1
+ kmin <emphasis role="opc">init</emphasis> 220
+ kmax <emphasis role="opc">init</emphasis> 440
+ kcps <emphasis role="opc">init</emphasis> 10
+ imode <emphasis role="op">=</emphasis> p4
+ ifstval <emphasis role="op">=</emphasis> p5
+
+ <emphasis role="opc">printf_i</emphasis> "\nMode<emphasis role="op">:</emphasis> <emphasis role="op">%</emphasis>d\n", 1, imode
+ k1 <emphasis role="opc">randomh</emphasis> kmin, kmax, kcps, imode, ifstval
+ <emphasis role="opc">printk2</emphasis> k1
<emphasis role="oblock">endin</emphasis>
-
<emphasis role="csdtag">&lt;/CsInstruments&gt;</emphasis>
<emphasis role="csdtag">&lt;CsScore&gt;</emphasis>
-<emphasis role="comment">; Table #1, a sine wave.</emphasis>
-<emphasis role="stamnt">f</emphasis> 1 0 16384 10 1
-
-<emphasis role="comment">; Play Instrument #1 for one second.</emphasis>
+<emphasis role="comment">; Play Instrument #1 for one second,</emphasis>
+<emphasis role="comment">; each time with a different mode.</emphasis>
<emphasis role="stamnt">i</emphasis> 1 0 1
+<emphasis role="stamnt">i</emphasis> 1 1 1 2 330
+<emphasis role="stamnt">i</emphasis> 1 2 1 3
<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