Hi All
I would like to use CSound to analyze ambient sound. So I tried to set up a microphone
and use following opcode: spectrum, specdiff, etc. to achieve my goal. However, I am
stuck at the first step when I tried to make a microphone to work. In my orc file, I have
some code piece like
instr 1
asig in ; GET MICROPHONE INPUT
wsig1 spectrum asig, .01, 8, 12, 8, 0, 1, 0
wsig2 specdiff wsig1
specdisp wsig2, 1
out asig
endin
It doesn't work at all. So I changed the "GET MICROPHONE INPUT" line to
asig soundin "123.wav" ;USE A WAVE FILE AS INPUT
and it works fine for those spec???? opcode.
Anything I need to pay attention to when I want to use a microphone? Such as
and command line flag?
I am using CSound_AV on Windows XP. When I tried to use -+I or -i command flag,
it will return error like
; error message for -+P0 -+I0
Portaudio OUTPUT device num.0 selected:
---->Microsoft Sound Mapper - Input
Portaudio INPUT device num.0 selected:
------>Microsoft Sound Mapper - Input
An error occured while using the portaudio stream.Error
number: -9998
Portaudio error message: Invalid number of channels
writing 20-byte blks of shorts to portaudio
SECTION 1:
An error occured while using the portaudio stream.Error number: -10000
Portaudio error message: PortAudio not initialized
The CSound_AV will crash directly when I use "-+P0 -idevaudio0" flag.
Thanks a lot for your help.
Chaochi