Csound Csound-dev Csound-tekno Search About

audio interface questions

Date2016-07-31 14:23
FromDave Seidel
Subjectaudio interface questions
I have a Scarlett 18i8. When I run Csound, if I try to use the "dac:hw:x,0" device, I get messages like "Unable to set number of channels on soundcard" (with nchnls=2) or sometimes a similar message about setting the sample rate (usually 48000 or 96000). I always have to use "dac:plughw:x,0" instead. What is the difference, exactly? Am I sacrificing resolution? Same thing used to happen with my previous interface also, a Scarlett 2I4. I'm running Linux Mint (essentially Ubuntu) using alsa. Maybe an alsa config issue? (Hope not, because I don't really want to wade into that morass again.) I don't really need jack's capabilities, trying to keep things "simple" (and I can't get jackd to run currently anyway).

(I note that Audacity has no problem using the non-plug device for output.)

Any advice/enlightenment would be appreciated.

Thanks,
Dave
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

Date2016-07-31 14:39
FromFfanci Silvain
SubjectRe: audio interface questions
Dave Seidel, Jul 31 2016:

> I have a Scarlett 18i8. When I run Csound, if I try to use the "dac:hw:x,0"
> device, I get messages like "Unable to set number of channels on soundcard"
> (with nchnls=2) or sometimes a similar message about setting the sample
> rate (usually 48000 or 96000). I always have to use "dac:plughw:x,0"
> instead. What is the difference, exactly?
Hi Dave,
I don't think you're sacrificing anything. the plug or plughw ALSA devices automatically try to convert between the incoming audio and the native settings of the interface. My card would always expect 12 channels of audio output, so ALSA manages that side and I get to simply send a stereo stream.

The plug and pluhw device types should be able to: manage different channel counts, convert bit resolution and resample. Although I'm not 100% sure about automatic resampling. If you're worried about that, see if your card has a setting for samplerate or read up on your cards supported samplerates and pick a supported one.
HTH.
...

Ta-ta,
----
Ffanci
* Homepage: https://freeshell.de/~silvain
* Twitter:  http://twitter.com/ffanci_silvain
* GitHub:   https://github.com/fsilvain

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

Date2016-07-31 14:53
FromDave Seidel
SubjectRe: audio interface questions
Thanks, Ffanci.

On Sun, Jul 31, 2016 at 9:39 AM, Ffanci Silvain <silvain@freeshell.de> wrote:
Dave Seidel, Jul 31 2016:

I have a Scarlett 18i8. When I run Csound, if I try to use the "dac:hw:x,0"
device, I get messages like "Unable to set number of channels on soundcard"
(with nchnls=2) or sometimes a similar message about setting the sample
rate (usually 48000 or 96000). I always have to use "dac:plughw:x,0"
instead. What is the difference, exactly?
Hi Dave,
I don't think you're sacrificing anything. the plug or plughw ALSA devices automatically try to convert between the incoming audio and the native settings of the interface. My card would always expect 12 channels of audio output, so ALSA manages that side and I get to simply send a stereo stream.

The plug and pluhw device types should be able to: manage different channel counts, convert bit resolution and resample. Although I'm not 100% sure about automatic resampling. If you're worried about that, see if your card has a setting for samplerate or read up on your cards supported samplerates and pick a supported one.
HTH.
...

Ta-ta,
----
Ffanci
* Homepage: https://freeshell.de/~silvain
* Twitter:  http://twitter.com/ffanci_silvain
* GitHub:   https://github.com/fsilvain

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

Date2016-07-31 16:24
FromAnders Genell
SubjectRe: audio interface questions
Just to add to Ffanci's fancy answer: 
From answers to similar questions on the alsa users list I have drawn the conclusion that the plug-device will handle resampling if necessary, but will do nothing if the sound card can handle the requested sample rate, so it should be safe to use. 

Regards,
Anders

31 juli 2016 kl. 15:53 skrev Dave Seidel <dave.seidel@GMAIL.COM>:

Thanks, Ffanci.

On Sun, Jul 31, 2016 at 9:39 AM, Ffanci Silvain <silvain@freeshell.de> wrote:
Dave Seidel, Jul 31 2016:

I have a Scarlett 18i8. When I run Csound, if I try to use the "dac:hw:x,0"
device, I get messages like "Unable to set number of channels on soundcard"
(with nchnls=2) or sometimes a similar message about setting the sample
rate (usually 48000 or 96000). I always have to use "dac:plughw:x,0"
instead. What is the difference, exactly?
Hi Dave,
I don't think you're sacrificing anything. the plug or plughw ALSA devices automatically try to convert between the incoming audio and the native settings of the interface. My card would always expect 12 channels of audio output, so ALSA manages that side and I get to simply send a stereo stream.

The plug and pluhw device types should be able to: manage different channel counts, convert bit resolution and resample. Although I'm not 100% sure about automatic resampling. If you're worried about that, see if your card has a setting for samplerate or read up on your cards supported samplerates and pick a supported one.
HTH.
...

Ta-ta,
----
Ffanci
* Homepage: https://freeshell.de/~silvain
* Twitter:  http://twitter.com/ffanci_silvain
* GitHub:   https://github.com/fsilvain

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

Date2016-07-31 16:30
FromDave Seidel
SubjectRe: audio interface questions
Thanks, Anders. Ffanci's answer and yours are reassuring. I would still like to eventually understand why I have to use the plug device with csound when I don't have to do this with other applications....

On Sun, Jul 31, 2016 at 11:24 AM, Anders Genell <anders.genell@gmail.com> wrote:
Just to add to Ffanci's fancy answer: 
From answers to similar questions on the alsa users list I have drawn the conclusion that the plug-device will handle resampling if necessary, but will do nothing if the sound card can handle the requested sample rate, so it should be safe to use. 

Regards,
Anders

31 juli 2016 kl. 15:53 skrev Dave Seidel <dave.seidel@GMAIL.COM>:

Thanks, Ffanci.

On Sun, Jul 31, 2016 at 9:39 AM, Ffanci Silvain <silvain@freeshell.de> wrote:
Dave Seidel, Jul 31 2016:

I have a Scarlett 18i8. When I run Csound, if I try to use the "dac:hw:x,0"
device, I get messages like "Unable to set number of channels on soundcard"
(with nchnls=2) or sometimes a similar message about setting the sample
rate (usually 48000 or 96000). I always have to use "dac:plughw:x,0"
instead. What is the difference, exactly?
Hi Dave,
I don't think you're sacrificing anything. the plug or plughw ALSA devices automatically try to convert between the incoming audio and the native settings of the interface. My card would always expect 12 channels of audio output, so ALSA manages that side and I get to simply send a stereo stream.

The plug and pluhw device types should be able to: manage different channel counts, convert bit resolution and resample. Although I'm not 100% sure about automatic resampling. If you're worried about that, see if your card has a setting for samplerate or read up on your cards supported samplerates and pick a supported one.
HTH.
...

Ta-ta,
----
Ffanci
* Homepage: https://freeshell.de/~silvain
* Twitter:  http://twitter.com/ffanci_silvain
* GitHub:   https://github.com/fsilvain

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

Date2016-08-10 21:58
Fromjoachim heintz
SubjectRe: audio interface questions
hi dave -

just to note that i had similar issues with audio cards and alsa.  after 
i used jack as "interface", all is fine ... (and jack gives several 
additional options)

best -
	joachim


On 31/07/16 17:30, Dave Seidel wrote:
> Thanks, Anders. Ffanci's answer and yours are reassuring. I would still
> like to eventually understand why I have to use the plug device with
> csound when I don't have to do this with other applications....
>
> On Sun, Jul 31, 2016 at 11:24 AM, Anders Genell  > wrote:
>
>     Just to add to Ffanci's fancy answer:
>      From answers to similar questions on the alsa users list I have
>     drawn the conclusion that the plug-device will handle resampling if
>     necessary, but will do nothing if the sound card can handle the
>     requested sample rate, so it should be safe to use.
>
>     Regards,
>     Anders
>
>     31 juli 2016 kl. 15:53 skrev Dave Seidel      >:
>
>>     Thanks, Ffanci.
>>
>>     On Sun, Jul 31, 2016 at 9:39 AM, Ffanci Silvain
>>     > wrote:
>>
>>         Dave Seidel, Jul 31 2016:
>>
>>             I have a Scarlett 18i8. When I run Csound, if I try to use
>>             the "dac:hw:x,0"
>>             device, I get messages like "Unable to set number of
>>             channels on soundcard"
>>             (with nchnls=2) or sometimes a similar message about
>>             setting the sample
>>             rate (usually 48000 or 96000). I always have to use
>>             "dac:plughw:x,0"
>>             instead. What is the difference, exactly?
>>
>>         Hi Dave,
>>         I don't think you're sacrificing anything. the plug or plughw
>>         ALSA devices automatically try to convert between the incoming
>>         audio and the native settings of the interface. My card would
>>         always expect 12 channels of audio output, so ALSA manages
>>         that side and I get to simply send a stereo stream.
>>
>>         The plug and pluhw device types should be able to: manage
>>         different channel counts, convert bit resolution and resample.
>>         Although I'm not 100% sure about automatic resampling. If
>>         you're worried about that, see if your card has a setting for
>>         samplerate or read up on your cards supported samplerates and
>>         pick a supported one.
>>         HTH.
>>         ...
>>
>>         Ta-ta,
>>         ----
>>         Ffanci
>>         * Homepage: https://freeshell.de/~silvain
>>         * Twitter: http://twitter.com/ffanci_silvain
>>         * GitHub: https://github.com/fsilvain
>>
>>         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

Date2016-08-10 22:25
FromDave Seidel
SubjectRe: audio interface questions
Thanks, Joachim. I may end up switching to jack if I can get it running again on this machine.

On Wed, Aug 10, 2016 at 4:58 PM, joachim heintz <jh@joachimheintz.de> wrote:
hi dave -

just to note that i had similar issues with audio cards and alsa.  after i used jack as "interface", all is fine ... (and jack gives several additional options)

best -
        joachim


On 31/07/16 17:30, Dave Seidel wrote:
Thanks, Anders. Ffanci's answer and yours are reassuring. I would still
like to eventually understand why I have to use the plug device with
csound when I don't have to do this with other applications....

On Sun, Jul 31, 2016 at 11:24 AM, Anders Genell <anders.genell@gmail.com
<mailto:anders.genell@gmail.com>> wrote:

    Just to add to Ffanci's fancy answer:
     From answers to similar questions on the alsa users list I have
    drawn the conclusion that the plug-device will handle resampling if
    necessary, but will do nothing if the sound card can handle the
    requested sample rate, so it should be safe to use.

    Regards,
    Anders

    31 juli 2016 kl. 15:53 skrev Dave Seidel <dave.seidel@GMAIL.COM
    <mailto:dave.seidel@gmail.com>>:

    Thanks, Ffanci.

    On Sun, Jul 31, 2016 at 9:39 AM, Ffanci Silvain
    <silvain@freeshell.de <mailto:silvain@freeshell.de>> wrote:

        Dave Seidel, Jul 31 2016:

            I have a Scarlett 18i8. When I run Csound, if I try to use
            the "dac:hw:x,0"
            device, I get messages like "Unable to set number of
            channels on soundcard"
            (with nchnls=2) or sometimes a similar message about
            setting the sample
            rate (usually 48000 or 96000). I always have to use
            "dac:plughw:x,0"
            instead. What is the difference, exactly?

        Hi Dave,
        I don't think you're sacrificing anything. the plug or plughw
        ALSA devices automatically try to convert between the incoming
        audio and the native settings of the interface. My card would
        always expect 12 channels of audio output, so ALSA manages
        that side and I get to simply send a stereo stream.

        The plug and pluhw device types should be able to: manage
        different channel counts, convert bit resolution and resample.
        Although I'm not 100% sure about automatic resampling. If
        you're worried about that, see if your card has a setting for
        samplerate or read up on your cards supported samplerates and
        pick a supported one.
        HTH.
        ...

        Ta-ta,
        ----
        Ffanci
        * Homepage: https://freeshell.de/~silvain
        * Twitter: http://twitter.com/ffanci_silvain
        * GitHub: https://github.com/fsilvain

        Csound mailing list
        Csound@listserv.heanet.ie <mailto: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
    <mailto: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
    <mailto: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
<mailto: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