Csound Csound-dev Csound-tekno Search About

Re: [Csnd] Mic "USB PnP Sound Device" doesn't work

Date2019-07-28 16:30
FromSlobodan Ivanovic
SubjectRe: [Csnd] Mic "USB PnP Sound Device" doesn't work
Hello Victor, thank you for your answer. I added the line it and I got:


###########
orch now loaded
audio buffered in 128 sample-frame blocks
reading 256-byte blks of shorts from adc1 (RAW)
PortAudio V19-devel (built Feb 12 2010 09:42:54)
   0: adc0 (Built-in Microph [Core Audio])
   1: adc1 (USB PnP Sound Device [Core Audio])
PortAudio: selected input device 'USB PnP Sound Device'
   0: dac0 (Built-in Output [Core Audio])
   1: dac1 (USB PnP Sound Device [Core Audio])
PortAudio: selected output device 'Built-in Output'
 *** PortAudio: error: -9998: Invalid number of channels
closing device
Failed to initialise real time audio output
inactive allocs returned to freespace
end of score.		   overall amps:  0.00000  0.00000
	   overall samples out of range:        0        0
1 errors in performance
Elapsed time at end of performance: real: 0.146s, CPU: 0.027s
closing device
#########

It seems like I cannot have "USB PnP Sound Device" as Input and "Built-in Microphone" as output.
I'm on Mac btw.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2019-07-28 16:34
FromVictor Lazzarini
SubjectRe: [Csnd] Mic "USB PnP Sound Device" doesn't work
It looks like the problem is with the output. Try running with nchnls=1

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 28 Jul 2019, at 16:30, Slobodan Ivanovic  wrote:
> 
> Hello Victor, thank you for your answer. I added the line it and I got:
> 
> 
> ###########
> orch now loaded
> audio buffered in 128 sample-frame blocks
> reading 256-byte blks of shorts from adc1 (RAW)
> PortAudio V19-devel (built Feb 12 2010 09:42:54)
>   0: adc0 (Built-in Microph [Core Audio])
>   1: adc1 (USB PnP Sound Device [Core Audio])
> PortAudio: selected input device 'USB PnP Sound Device'
>   0: dac0 (Built-in Output [Core Audio])
>   1: dac1 (USB PnP Sound Device [Core Audio])
> PortAudio: selected output device 'Built-in Output'
> *** PortAudio: error: -9998: Invalid number of channels
> closing device
> Failed to initialise real time audio output
> inactive allocs returned to freespace
> end of score.           overall amps:  0.00000  0.00000
>       overall samples out of range:        0        0
> 1 errors in performance
> Elapsed time at end of performance: real: 0.146s, CPU: 0.027s
> closing device
> #########
> 
> It seems like I cannot have "USB PnP Sound Device" as Input and "Built-in Microphone" as output.
> I'm on Mac btw.
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2019-07-28 17:56
FromSlobodan Ivanovic
SubjectRe: [Csnd] Mic "USB PnP Sound Device" doesn't work
AttachmentsScreen Shot 2019-07-28 at 6.41.04 PM.png  
It keeps saying:
 "*** PortAudio: error: -9998: Invalid number of channels closing device Failed to initialize real-time audio output inactive allocs returned to freespace"

I used JackOSX aswell:
CODE
########################
<CsoundSynthesizer>
<CsOptions>
;CHANGE YOUR INPUT AND OUTPUT DEVICE NUMBER HERE IF NECESSARY!
-+rtaudio=jack -iadc2 -odac0 -B4096 -b128
</CsOptions>
<CsInstruments>
;Example by Joachim Heintz
sr = 44100 ;set sample rate to 44100 Hz
ksmps = 32 ;number of samples per control cycle
nchnls_i = 1
nchnls = 2 ;use two audio channels
0dbfs = 1 ;set maximum level as 1

giSine    ftgen     0, 0, 2^10, 10, 1 ;table with sine wave

instr 1
aIn       inch      1 ;take input from channel 1
kInLev    downsamp  aIn ;convert audio input to control signal
          printk    .2, abs(kInLev)
;make modulator frequency oscillate 200 to 1000 Hz
kModFreq  poscil    400, 1/2, giSine
kModFreq  =         kModFreq+600
aMod      poscil    1, kModFreq, giSine ;modulator signal
aRM       =         aIn * aMod ;ring modulation
          outch     1, aRM, 2, aRM ;output tochannel 1 and 2
endin
</CsInstruments>
<CsScore>
i 1 0 3600
</CsScore>
</CsoundSynthesizer>
###################################

I'm still trying to figure it out.
When I choose "USB PnP Sound" as an input device, it is set automatically as output as well.


El dom., 28 jul. 2019 a las 17:34, Victor Lazzarini (<Victor.Lazzarini@mu.ie>) escribió:
It looks like the problem is with the output. Try running with nchnls=1

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 28 Jul 2019, at 16:30, Slobodan Ivanovic <slobodanip@gmail.com> wrote:
>
> Hello Victor, thank you for your answer. I added the line it and I got:
>
>
> ###########
> orch now loaded
> audio buffered in 128 sample-frame blocks
> reading 256-byte blks of shorts from adc1 (RAW)
> PortAudio V19-devel (built Feb 12 2010 09:42:54)
>   0: adc0 (Built-in Microph [Core Audio])
>   1: adc1 (USB PnP Sound Device [Core Audio])
> PortAudio: selected input device 'USB PnP Sound Device'
>   0: dac0 (Built-in Output [Core Audio])
>   1: dac1 (USB PnP Sound Device [Core Audio])
> PortAudio: selected output device 'Built-in Output'
> *** PortAudio: error: -9998: Invalid number of channels
> closing device
> Failed to initialise real time audio output
> inactive allocs returned to freespace
> end of score.           overall amps:  0.00000  0.00000
>       overall samples out of range:        0        0
> 1 errors in performance
> Elapsed time at end of performance: real: 0.146s, CPU: 0.027s
> closing device
> #########
>
> It seems like I cannot have "USB PnP Sound Device" as Input and "Built-in Microphone" as output.
> I'm on Mac btw.
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2019-07-28 18:11
FromGuillermo Senna
SubjectRe: [Csnd] Mic "USB PnP Sound Device" doesn't work
Hi,

I think there's something called "Audio MIDI Setup" in Mac. How many ins
and outs does the USB card have in there?

Cheers.

On 28/7/19 13:56, Slobodan Ivanovic wrote:
> It keeps saying:
>  "*** PortAudio: error: -9998: Invalid number of channels closing device
> Failed to initialize real-time audio output inactive allocs returned to
> freespace"
>
> I used JackOSX aswell:
> CODE
> ########################
> 
> 
> ;CHANGE YOUR INPUT AND OUTPUT DEVICE NUMBER HERE IF NECESSARY!
> -+rtaudio=jack -iadc2 -odac0 -B4096 -b128
> 
> 
> ;Example by Joachim Heintz
> sr = 44100 ;set sample rate to 44100 Hz
> ksmps = 32 ;number of samples per control cycle
> nchnls_i = 1
> nchnls = 2 ;use two audio channels
> 0dbfs = 1 ;set maximum level as 1
>
> giSine    ftgen     0, 0, 2^10, 10, 1 ;table with sine wave
>
> instr 1
> aIn       inch      1 ;take input from channel 1
> kInLev    downsamp  aIn ;convert audio input to control signal
>           printk    .2, abs(kInLev)
> ;make modulator frequency oscillate 200 to 1000 Hz
> kModFreq  poscil    400, 1/2, giSine
> kModFreq  =         kModFreq+600
> aMod      poscil    1, kModFreq, giSine ;modulator signal
> aRM       =         aIn * aMod ;ring modulation
>           outch     1, aRM, 2, aRM ;output tochannel 1 and 2
> endin
> 
> 
> i 1 0 3600
> 
> 
> ###################################
>
> I'm still trying to figure it out.
> When I choose "USB PnP Sound" as an input device, it is set automatically
> as output as well.
>
>
> El dom., 28 jul. 2019 a las 17:34, Victor Lazzarini ()
> escribió:
>
>> It looks like the problem is with the output. Try running with nchnls=1
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>>> On 28 Jul 2019, at 16:30, Slobodan Ivanovic 
>> wrote:
>>> Hello Victor, thank you for your answer. I added the line it and I got:
>>>
>>>
>>> ###########
>>> orch now loaded
>>> audio buffered in 128 sample-frame blocks
>>> reading 256-byte blks of shorts from adc1 (RAW)
>>> PortAudio V19-devel (built Feb 12 2010 09:42:54)
>>>   0: adc0 (Built-in Microph [Core Audio])
>>>   1: adc1 (USB PnP Sound Device [Core Audio])
>>> PortAudio: selected input device 'USB PnP Sound Device'
>>>   0: dac0 (Built-in Output [Core Audio])
>>>   1: dac1 (USB PnP Sound Device [Core Audio])
>>> PortAudio: selected output device 'Built-in Output'
>>> *** PortAudio: error: -9998: Invalid number of channels
>>> closing device
>>> Failed to initialise real time audio output
>>> inactive allocs returned to freespace
>>> end of score.           overall amps:  0.00000  0.00000
>>>       overall samples out of range:        0        0
>>> 1 errors in performance
>>> Elapsed time at end of performance: real: 0.146s, CPU: 0.027s
>>> closing device
>>> #########
>>>
>>> It seems like I cannot have "USB PnP Sound Device" as Input and
>> "Built-in Microphone" as output.
>>> I'm on Mac btw.
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>        https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2019-07-28 19:33
Fromjoachim heintz
SubjectRe: [Csnd] Mic "USB PnP Sound Device" doesn't work
and perhaps it is better to use -iadc and -odac as default input/output, 
and set the device in the operating system (or if you use jack, there).

	joachim


On 28/07/19 19:11, Guillermo Senna wrote:
> Hi,
>
> I think there's something called "Audio MIDI Setup" in Mac. How many ins
> and outs does the USB card have in there?
>
> Cheers.
>
> On 28/7/19 13:56, Slobodan Ivanovic wrote:
>> It keeps saying:
>>  "*** PortAudio: error: -9998: Invalid number of channels closing device
>> Failed to initialize real-time audio output inactive allocs returned to
>> freespace"
>>
>> I used JackOSX aswell:
>> CODE
>> ########################
>> 
>> 
>> ;CHANGE YOUR INPUT AND OUTPUT DEVICE NUMBER HERE IF NECESSARY!
>> -+rtaudio=jack -iadc2 -odac0 -B4096 -b128
>> 
>> 
>> ;Example by Joachim Heintz
>> sr = 44100 ;set sample rate to 44100 Hz
>> ksmps = 32 ;number of samples per control cycle
>> nchnls_i = 1
>> nchnls = 2 ;use two audio channels
>> 0dbfs = 1 ;set maximum level as 1
>>
>> giSine    ftgen     0, 0, 2^10, 10, 1 ;table with sine wave
>>
>> instr 1
>> aIn       inch      1 ;take input from channel 1
>> kInLev    downsamp  aIn ;convert audio input to control signal
>>           printk    .2, abs(kInLev)
>> ;make modulator frequency oscillate 200 to 1000 Hz
>> kModFreq  poscil    400, 1/2, giSine
>> kModFreq  =         kModFreq+600
>> aMod      poscil    1, kModFreq, giSine ;modulator signal
>> aRM       =         aIn * aMod ;ring modulation
>>           outch     1, aRM, 2, aRM ;output tochannel 1 and 2
>> endin
>> 
>> 
>> i 1 0 3600
>> 
>> 
>> ###################################
>>
>> I'm still trying to figure it out.
>> When I choose "USB PnP Sound" as an input device, it is set automatically
>> as output as well.
>>
>>
>> El dom., 28 jul. 2019 a las 17:34, Victor Lazzarini ()
>> escribió:
>>
>>> It looks like the problem is with the output. Try running with nchnls=1
>>>
>>> Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy
>>> Maynooth University
>>> Ireland
>>>
>>>> On 28 Jul 2019, at 16:30, Slobodan Ivanovic 
>>> wrote:
>>>> Hello Victor, thank you for your answer. I added the line it and I got:
>>>>
>>>>
>>>> ###########
>>>> orch now loaded
>>>> audio buffered in 128 sample-frame blocks
>>>> reading 256-byte blks of shorts from adc1 (RAW)
>>>> PortAudio V19-devel (built Feb 12 2010 09:42:54)
>>>>   0: adc0 (Built-in Microph [Core Audio])
>>>>   1: adc1 (USB PnP Sound Device [Core Audio])
>>>> PortAudio: selected input device 'USB PnP Sound Device'
>>>>   0: dac0 (Built-in Output [Core Audio])
>>>>   1: dac1 (USB PnP Sound Device [Core Audio])
>>>> PortAudio: selected output device 'Built-in Output'
>>>> *** PortAudio: error: -9998: Invalid number of channels
>>>> closing device
>>>> Failed to initialise real time audio output
>>>> inactive allocs returned to freespace
>>>> end of score.           overall amps:  0.00000  0.00000
>>>>       overall samples out of range:        0        0
>>>> 1 errors in performance
>>>> Elapsed time at end of performance: real: 0.146s, CPU: 0.027s
>>>> closing device
>>>> #########
>>>>
>>>> It seems like I cannot have "USB PnP Sound Device" as Input and
>>> "Built-in Microphone" as output.
>>>> I'm on Mac btw.
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here