Csound Csound-dev Csound-tekno Search About

[Csnd] No sound with -i adc under linux

Date2009-03-06 03:46
FromTobiah
Subject[Csnd] No sound with -i adc under linux
This is an Kubuntu box.

I can use:

	arecord -fcd -Dhw:0,1 foo.wav

and record a sound just fine.  Then I try it with csound:

	csound -d -+rtaudio=alsa -i adc:hw:0,1

With this orchestra:

sr      = 44100
kr      = 1
nchnls  = 2

instr 1
        asigl, asigr    ins
                        outs    asigl, asigr

endin


And a dummy score:

f1 10

Csound gives me only silence of the correct duration in test.wav.
I tried removing my .asoundrc completely. arecord works, csound
gives silence.

Thanks,

Toby

Date2009-03-06 05:48
FromSteven Yi
Subject[Csnd] Re: No sound with -i adc under linux
Hi Toby,

Are you recording to disk or to dac?  I'm wondering if Csound is
rendering faster than realtime when rendering to disk and therefore
not getting any sound for you.  Could you try adding -o dac to see if
any sound is played out speakers?

steven

On Thu, Mar 5, 2009 at 7:46 PM, Tobiah  wrote:
> This is an Kubuntu box.
>
> I can use:
>
>        arecord -fcd -Dhw:0,1 foo.wav
>
> and record a sound just fine.  Then I try it with csound:
>
>        csound -d -+rtaudio=alsa -i adc:hw:0,1
>
> With this orchestra:
>
> sr      = 44100
> kr      = 1
> nchnls  = 2
>
> instr 1
>       asigl, asigr    ins
>                       outs    asigl, asigr
>
> endin
>
>
> And a dummy score:
>
> f1 10
>
> Csound gives me only silence of the correct duration in test.wav.
> I tried removing my .asoundrc completely. arecord works, csound
> gives silence.
>
> Thanks,
>
> Toby
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>


Date2009-03-06 15:02
FromTobiah
Subject[Csnd] Re: Re: No sound with -i adc under linux
Steven Yi wrote:
> Hi Toby,
> 
> Are you recording to disk or to dac?  I'm wondering if Csound is
> rendering faster than realtime when rendering to disk and therefore
> not getting any sound for you.  Could you try adding -o dac to see if
> any sound is played out speakers?

Hi.

I actually started out trying to play to dac.  I didn't hear
anything, so I tried writing to disk so I could look at what
was coming out.  The score, with a deferred function table
definition assures that the orchestra will run for a period
of time.  With the below score, I got a test.wav file with
10 seconds of silence.  I'm recording from microphones that
work with arecord, so I'm sure that I'm providing a signal.
hw:0,1 is the digital input on my Mia MIDI, but I did try
the analog input as well.

Thanks,

Toby

> On Thu, Mar 5, 2009 at 7:46 PM, Tobiah  wrote:
>> This is an Kubuntu box.
>>
>> I can use:
>>
>>        arecord -fcd -Dhw:0,1 foo.wav
>>
>> and record a sound just fine.  Then I try it with csound:
>>
>>        csound -d -+rtaudio=alsa -i adc:hw:0,1
>>
>> With this orchestra:
>>
>> sr      = 44100
>> kr      = 1
>> nchnls  = 2
>>
>> instr 1
>>       asigl, asigr    ins
>>                       outs    asigl, asigr
>>
>> endin
>>
>>
>> And a dummy score:
>>
>> f1 10
>>
>> Csound gives me only silence of the correct duration in test.wav.
>> I tried removing my .asoundrc completely. arecord works, csound
>> gives silence.
>>
>> Thanks,
>>
>> Toby
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
> 
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2009-03-06 15:11
FromTobiah
Subject[Csnd] Re: No sound with -i adc under linux
Nevermind, I found it.  I tried something revolutionary, and
it worked.  I actually put an 'i' statement in the score that
activated my instrument!

Tobiah wrote:

>     csound -d -+rtaudio=alsa -i adc:hw:0,1
> 
> With this orchestra:
> 
> sr      = 44100
> kr      = 1
> nchnls  = 2
> 
> instr 1
>        asigl, asigr    ins
>                        outs    asigl, asigr
> 
> endin
> 
> 
> And a dummy score:
> 
> f1 10
> 
> Csound gives me only silence of the correct duration in test.wav.
> I tried removing my .asoundrc completely. arecord works, csound
> gives silence.