diff options
Diffstat (limited to 'examples-xml/pitchamdf.csd.xml')
-rw-r--r-- | examples-xml/pitchamdf.csd.xml | 57 |
1 files changed, 22 insertions, 35 deletions
diff --git a/examples-xml/pitchamdf.csd.xml b/examples-xml/pitchamdf.csd.xml index dc7e26b..7028d9f 100644 --- a/examples-xml/pitchamdf.csd.xml +++ b/examples-xml/pitchamdf.csd.xml @@ -2,57 +2,44 @@ <emphasis role="csdtag"><CsoundSynthesizer></emphasis> <emphasis role="csdtag"><CsOptions></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> +-odac <emphasis role="comment">;;;realtime audio out</emphasis> +<emphasis role="comment">;-iadc ;;;uncomment -iadc if real audio input is needed too</emphasis> <emphasis role="comment">; For Non-realtime ouput leave only the line below:</emphasis> <emphasis role="comment">; -o pitchamdf.wav -W ;;; for file output any platform</emphasis> <emphasis role="csdtag"></CsOptions></emphasis> <emphasis role="csdtag"><CsInstruments></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="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 -<emphasis role="comment">; synth waveform</emphasis> -giwave <emphasis role="ohdr">ftgen</emphasis> 2, 0, 1024, 10, 1, 1, 1, 1 +<emphasis role="oblock">instr</emphasis> 1 <emphasis role="comment">;clean audio</emphasis> -<emphasis role="comment">; Instrument #1 - play an audio file with no effects.</emphasis> -<emphasis role="oblock">instr</emphasis> 1 - <emphasis role="comment">; get input signal with original freq.</emphasis> - asig <emphasis role="opc">soundin</emphasis> "mary.wav" - - <emphasis role="opc">out</emphasis> asig +asig <emphasis role="opc">soundin</emphasis> p4 + <emphasis role="opc">outs</emphasis> asig, asig <emphasis role="oblock">endin</emphasis> -<emphasis role="comment">; Instrument #2 - play the synth waveform using the</emphasis> -<emphasis role="comment">; same pitch and amplitude as the audio file.</emphasis> -<emphasis role="oblock">instr</emphasis> 2 - <emphasis role="comment">; get input signal with original freq.</emphasis> - asig <emphasis role="opc">soundin</emphasis> "mary.wav" +<emphasis role="oblock">instr</emphasis> 2 <emphasis role="comment">;use pitch</emphasis> - <emphasis role="comment">; lowpass-filter</emphasis> - asig <emphasis role="opc">tone</emphasis> asig, 1000 - <emphasis role="comment">; extract pitch and envelope</emphasis> - kcps, krms <emphasis role="opc">pitchamdf</emphasis> asig, 150, 500, 200 - <emphasis role="comment">; "re-synthesize" with the synth waveform, giwave.</emphasis> - asig1 <emphasis role="opc">oscil</emphasis> krms, kcps, giwave +asig <emphasis role="opc">soundin</emphasis> p4 +asig <emphasis role="opc">tone</emphasis> asig, 1000 <emphasis role="comment">;lowpass-filter</emphasis> +kcps, krms <emphasis role="opc">pitchamdf</emphasis> asig, 100, 500, 200 +asig <emphasis role="opc">poscil</emphasis> krms, kcps, 1 <emphasis role="comment">;re-synthesize with sawtooth</emphasis> + <emphasis role="opc">outs</emphasis> asig, asig - <emphasis role="opc">out</emphasis> asig1 <emphasis role="oblock">endin</emphasis> - - <emphasis role="csdtag"></CsInstruments></emphasis> <emphasis role="csdtag"><CsScore></emphasis> - -<emphasis role="comment">; Play Instrument #1, the audio file, for three seconds.</emphasis> -<emphasis role="stamnt">i</emphasis> 1 0 3 -<emphasis role="comment">; Play Instrument #2, the "re-synthesized" waveform, for three seconds.</emphasis> -<emphasis role="stamnt">i</emphasis> 2 3 3 +<emphasis role="stamnt">f</emphasis>1 0 16384 10 1 0.5 0.3 0.25 0.2 0.167 0.14 0.125 .111 <emphasis role="comment">;sawtooth</emphasis> + +<emphasis role="stamnt">i</emphasis> 1 0 3 "fox.wav" +<emphasis role="stamnt">i</emphasis> 2 3 3 "fox.wav" +<emphasis role="stamnt">i</emphasis> 1 6 3 "mary.wav" +<emphasis role="stamnt">i</emphasis> 2 9 3 "mary.wav" +<emphasis role="stamnt">i</emphasis> 1 12 3 "beats.wav" +<emphasis role="stamnt">i</emphasis> 2 15 3 "beats.wav" <emphasis role="stamnt">e</emphasis> - - <emphasis role="csdtag"></CsScore></emphasis> <emphasis role="csdtag"></CsoundSynthesizer></emphasis> </programlisting>
\ No newline at end of file |