Debian Codegraph @

examples/rms.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;realtime audio out
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o rms.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; By Stefano Cucchi 2020
12
13 sr = 44100
14 ksmps = 32
15 nchnls = 2
16 0dbfs = 1
17
18 instr 1
19
20 areference diskin "fox.wav"
21 krms rms areference ; take the RMS of "fox.wav"
22 asound oscili krms, 440 ; use RMS as amplitude of sine wave
23 outch 1, areference
24 outch 2, asound
25 endin
26
27
28 </CsInstruments>
29 <CsScore>
30 i 1 0 4
31 e
32 </CsScore>
33 </CsoundSynthesizer>