diff options
Diffstat (limited to 'examples/pitchamdf.csd')
-rw-r--r-- | examples/pitchamdf.csd | 57 |
1 files changed, 22 insertions, 35 deletions
diff --git a/examples/pitchamdf.csd b/examples/pitchamdf.csd index f4e0810..348d55d 100644 --- a/examples/pitchamdf.csd +++ b/examples/pitchamdf.csd @@ -1,56 +1,43 @@ <CsoundSynthesizer> <CsOptions> ; Select audio/midi flags here according to platform -; Audio out Audio in No messages --odac -iadc -d ;;;RT audio I/O +-odac ;;;realtime audio out +;-iadc ;;;uncomment -iadc if real audio input is needed too ; For Non-realtime ouput leave only the line below: ; -o pitchamdf.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> -; Initialize the global variables. sr = 44100 -kr = 4410 -ksmps = 10 -nchnls = 1 +ksmps = 32 +nchnls = 2 +0dbfs = 1 -; synth waveform -giwave ftgen 2, 0, 1024, 10, 1, 1, 1, 1 +instr 1 ;clean audio -; Instrument #1 - play an audio file with no effects. -instr 1 - ; get input signal with original freq. - asig soundin "mary.wav" - - out asig +asig soundin p4 + outs asig, asig endin -; Instrument #2 - play the synth waveform using the -; same pitch and amplitude as the audio file. -instr 2 - ; get input signal with original freq. - asig soundin "mary.wav" +instr 2 ;use pitch - ; lowpass-filter - asig tone asig, 1000 - ; extract pitch and envelope - kcps, krms pitchamdf asig, 150, 500, 200 - ; "re-synthesize" with the synth waveform, giwave. - asig1 oscil krms, kcps, giwave +asig soundin p4 +asig tone asig, 1000 ;lowpass-filter +kcps, krms pitchamdf asig, 100, 500, 200 +asig poscil krms, kcps, 1 ;re-synthesize with sawtooth + outs asig, asig - out asig1 endin - - </CsInstruments> <CsScore> - -; Play Instrument #1, the audio file, for three seconds. -i 1 0 3 -; Play Instrument #2, the "re-synthesized" waveform, for three seconds. -i 2 3 3 +f1 0 16384 10 1 0.5 0.3 0.25 0.2 0.167 0.14 0.125 .111 ;sawtooth + +i 1 0 3 "fox.wav" +i 2 3 3 "fox.wav" +i 1 6 3 "mary.wav" +i 2 9 3 "mary.wav" +i 1 12 3 "beats.wav" +i 2 15 3 "beats.wav" e - - </CsScore> </CsoundSynthesizer> |