summaryrefslogtreecommitdiff
path: root/examples-xml/sfplay.csd.xml
diff options
context:
space:
mode:
Diffstat (limited to 'examples-xml/sfplay.csd.xml')
-rw-r--r--examples-xml/sfplay.csd.xml32
1 files changed, 17 insertions, 15 deletions
diff --git a/examples-xml/sfplay.csd.xml b/examples-xml/sfplay.csd.xml
index 12839f0..d44862f 100644
--- a/examples-xml/sfplay.csd.xml
+++ b/examples-xml/sfplay.csd.xml
@@ -2,34 +2,34 @@
<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 -M0 <emphasis role="comment">;;;RT audio I/O, midi in</emphasis>
+-odac -+rtmidi=virtual -M0 <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 sfplay.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> 100
+<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
+
isf <emphasis role="opc">sfload</emphasis> "07AcousticGuitar.sf2"
- <emphasis role="opc">sfilist</emphasis> isf
<emphasis role="opc">sfplist</emphasis> isf
- <emphasis role="opc">sfpassign</emphasis> 0, isf
+ <emphasis role="opc">sfpassign</emphasis> 0, isf
+
+<emphasis role="oblock">instr</emphasis> 1 <emphasis role="comment">; play from score and midi keyboard</emphasis>
- <emphasis role="oblock">instr</emphasis> 1
-<emphasis role="comment">; play from score and midi keyboard</emphasis>
- <emphasis role="opc">mididefault</emphasis> 60, p3
+ <emphasis role="opc">mididefault</emphasis> 60, p3
<emphasis role="opc">midinoteonkey</emphasis> p4, p5
inum <emphasis role="opc">init</emphasis> p4
ivel <emphasis role="opc">init</emphasis> p5
-<emphasis role="opc">print</emphasis> ivel
-
-ivel <emphasis role="opc">init</emphasis> 3<emphasis role="op">*</emphasis>(ivel<emphasis role="op">/</emphasis>127) <emphasis role="comment">; pre-amplify</emphasis>
-kamp <emphasis role="opc">linsegr</emphasis> 1,1,1,.1,0
-kfreq <emphasis role="opc">init</emphasis> 1 <emphasis role="comment">;do not change freq from sf</emphasis>
-a1,a2 <emphasis role="opc">sfplay</emphasis> ivel, inum, kamp<emphasis role="op">*</emphasis>ivel, kfreq, 0, 0
+ivel <emphasis role="opc">init</emphasis> ivel<emphasis role="op">/</emphasis>127 <emphasis role="comment">;make velocity dependent</emphasis>
+kamp <emphasis role="opc">linsegr</emphasis> 1, 1, 1, .1, 0
+kamp <emphasis role="op">=</emphasis> kamp<emphasis role="op">/</emphasis>5000 <emphasis role="comment">;scale amplitude</emphasis>
+kfreq <emphasis role="opc">init</emphasis> 1 <emphasis role="comment">;do not change freq from sf</emphasis>
+a1,a2 <emphasis role="opc">sfplay</emphasis> ivel, inum, kamp<emphasis role="op">*</emphasis>ivel, kfreq, 0 <emphasis role="comment">;preset index = 0</emphasis>
<emphasis role="opc">outs</emphasis> a1, a2
<emphasis role="oblock">endin</emphasis>
@@ -42,6 +42,8 @@ a1,a2 <emphasis role="opc">sfplay</emphasis> ivel, inum, kamp<emphasis role="op"
<emphasis role="stamnt">i</emphasis>1 + 1 62 &lt;
<emphasis role="stamnt">i</emphasis>1 + 1 65 &lt;
<emphasis role="stamnt">i</emphasis>1 + 1 69 10
+
+<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