Csound Csound-dev Csound-tekno Search About

[Csnd] routing to a specific soundcard

Date2012-08-19 09:28
FromStefan Thomas
Subject[Csnd] routing to a specific soundcard
Dear community,
I would like to route the output to a specific card, via alsa.
Off course I know that could be done with jack, but I have difficvulties with it.
My output of cat /proc/asound/cards is:
0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xea200000 irq 55
 1 [S6USB20        ]: USB-Audio - Saffire 6USB2.0
                      Focusrite Saffire 6USB2.0 at usb-0000:05:00.0-2, high speed
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xe3080000 irq 17
 3 [UM1            ]: USB-Audio - UM-1
                      EDIROL UM-1 at usb-0000:05:00.0-1.1, full speed
 4 [U88es          ]: USB-Audio - USB Keystation 88es
                      M-Audio USB Keystation 88es at usb-0000:05:00.0-1.3.1, full speed
So I tried it with
csound -+rtaudio=alsa -o dac:S6USB20 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d  myfile.csd
and
csound -+rtaudio=alsa -o dac:hw:1,0 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d   myfile.csd
but unfortunately without any success.
In the first case I get
 Cannot open device 'S6USB20' (or for audio output: No such file or directory
in the second case the output gisves me some hope, but it also fails to make sound:
*** Unable to set requested sample format on soundcard
Failed to initialise real time audio output



Date2012-08-19 10:16
FromAnders Genell
SubjectRe: [Csnd] routing to a specific soundcard
Hi Stefan!

In most cases alsa sets up a "plug" layer that handles automatic conversion, which might get rid of the "unable to set requested sample format". Try -o dac:plughw:1,0 and see if you get sound out. Mind you, this adds latency so if you're looking for extremely low such then other ways might be more suitable. 

Regards,
Anders

19 aug 2012 kl. 10:28 skrev Stefan Thomas <kontrapunktstefan@gmail.com>:

Dear community,
I would like to route the output to a specific card, via alsa.
Off course I know that could be done with jack, but I have difficvulties with it.
My output of cat /proc/asound/cards is:
0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xea200000 irq 55
 1 [S6USB20        ]: USB-Audio - Saffire 6USB2.0
                      Focusrite Saffire 6USB2.0 at usb-0000:05:00.0-2, high speed
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xe3080000 irq 17
 3 [UM1            ]: USB-Audio - UM-1
                      EDIROL UM-1 at usb-0000:05:00.0-1.1, full speed
 4 [U88es          ]: USB-Audio - USB Keystation 88es
                      M-Audio USB Keystation 88es at usb-0000:05:00.0-1.3.1, full speed
So I tried it with
csound -+rtaudio=alsa -o dac:S6USB20 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d  myfile.csd
and
csound -+rtaudio=alsa -o dac:hw:1,0 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d   myfile.csd
but unfortunately without any success.
In the first case I get
 Cannot open device 'S6USB20' (or for audio output: No such file or directory
in the second case the output gisves me some hope, but it also fails to make sound:
*** Unable to set requested sample format on soundcard
Failed to initialise real time audio output



Date2012-08-19 10:53
FromVictor Lazzarini
SubjectRe: [Csnd] routing to a specific soundcard
In my experience, the plughw latency was not an issue. I used to get down to -b32 with it.

Victor
On 19 Aug 2012, at 10:16, Anders Genell wrote:

Hi Stefan!

In most cases alsa sets up a "plug" layer that handles automatic conversion, which might get rid of the "unable to set requested sample format". Try -o dac:plughw:1,0 and see if you get sound out. Mind you, this adds latency so if you're looking for extremely low such then other ways might be more suitable. 

Regards,
Anders

19 aug 2012 kl. 10:28 skrev Stefan Thomas <kontrapunktstefan@gmail.com>:

Dear community,
I would like to route the output to a specific card, via alsa.
Off course I know that could be done with jack, but I have difficvulties with it.
My output of cat /proc/asound/cards is:
0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xea200000 irq 55
 1 [S6USB20        ]: USB-Audio - Saffire 6USB2.0
                      Focusrite Saffire 6USB2.0 at usb-0000:05:00.0-2, high speed
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xe3080000 irq 17
 3 [UM1            ]: USB-Audio - UM-1
                      EDIROL UM-1 at usb-0000:05:00.0-1.1, full speed
 4 [U88es          ]: USB-Audio - USB Keystation 88es
                      M-Audio USB Keystation 88es at usb-0000:05:00.0-1.3.1, full speed
So I tried it with
csound -+rtaudio=alsa -o dac:S6USB20 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d  myfile.csd
and
csound -+rtaudio=alsa -o dac:hw:1,0 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d   myfile.csd
but unfortunately without any success.
In the first case I get
 Cannot open device 'S6USB20' (or for audio output: No such file or directory
in the second case the output gisves me some hope, but it also fails to make sound:
*** Unable to set requested sample format on soundcard
Failed to initialise real time audio output



Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2012-08-19 11:07
FromAnders Genell
SubjectRe: [Csnd] routing to a specific soundcard

Oh, good! I haven't tried it that low.
If I understand it correctly it adds one extra buffer of same size as -b to perform the conversion on, so the latency will in general be doubled? I guess it won't be an issue at such small sizes though...

Regards,
/Anders


19 aug 2012 kl. 11:53 skrev Victor Lazzarini <Victor.Lazzarini@nuim.ie>:

In my experience, the plughw latency was not an issue. I used to get down to -b32 with it.

Victor
On 19 Aug 2012, at 10:16, Anders Genell wrote:

Hi Stefan!

In most cases alsa sets up a "plug" layer that handles automatic conversion, which might get rid of the "unable to set requested sample format". Try -o dac:plughw:1,0 and see if you get sound out. Mind you, this adds latency so if you're looking for extremely low such then other ways might be more suitable. 

Regards,
Anders

19 aug 2012 kl. 10:28 skrev Stefan Thomas <kontrapunktstefan@gmail.com>:

Dear community,
I would like to route the output to a specific card, via alsa.
Off course I know that could be done with jack, but I have difficvulties with it.
My output of cat /proc/asound/cards is:
0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xea200000 irq 55
 1 [S6USB20        ]: USB-Audio - Saffire 6USB2.0
                      Focusrite Saffire 6USB2.0 at usb-0000:05:00.0-2, high speed
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xe3080000 irq 17
 3 [UM1            ]: USB-Audio - UM-1
                      EDIROL UM-1 at usb-0000:05:00.0-1.1, full speed
 4 [U88es          ]: USB-Audio - USB Keystation 88es
                      M-Audio USB Keystation 88es at usb-0000:05:00.0-1.3.1, full speed
So I tried it with
csound -+rtaudio=alsa -o dac:S6USB20 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d  myfile.csd
and
csound -+rtaudio=alsa -o dac:hw:1,0 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d   myfile.csd
but unfortunately without any success.
In the first case I get
 Cannot open device 'S6USB20' (or for audio output: No such file or directory
in the second case the output gisves me some hope, but it also fails to make sound:
*** Unable to set requested sample format on soundcard
Failed to initialise real time audio output



Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2012-08-19 11:15
FromAnders Genell
SubjectRe: [Csnd] routing to a specific soundcard
I think you are correct - the plug layer is transparent if no conversion is needed - but if the sample format needs to be changed, doesn't that also require conversion?

Regards,
Anders



19 aug 2012 kl. 12:16 skrev Victor Lazzarini <Victor.Lazzarini@nuim.ie>:

Maybe it does. But I find the SR values that are returned by hw (as an error) to be very odd, so I was expecting that if you use the soundcard default SR that would not actually happen.

Victor
On 19 Aug 2012, at 11:07, Anders Genell wrote:


Oh, good! I haven't tried it that low.
If I understand it correctly it adds one extra buffer of same size as -b to perform the conversion on, so the latency will in general be doubled? I guess it won't be an issue at such small sizes though...

Regards,
/Anders


19 aug 2012 kl. 11:53 skrev Victor Lazzarini <Victor.Lazzarini@nuim.ie>:

In my experience, the plughw latency was not an issue. I used to get down to -b32 with it.

Victor
On 19 Aug 2012, at 10:16, Anders Genell wrote:

Hi Stefan!

In most cases alsa sets up a "plug" layer that handles automatic conversion, which might get rid of the "unable to set requested sample format". Try -o dac:plughw:1,0 and see if you get sound out. Mind you, this adds latency so if you're looking for extremely low such then other ways might be more suitable. 

Regards,
Anders

19 aug 2012 kl. 10:28 skrev Stefan Thomas <kontrapunktstefan@gmail.com>:

Dear community,
I would like to route the output to a specific card, via alsa.
Off course I know that could be done with jack, but I have difficvulties with it.
My output of cat /proc/asound/cards is:
0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xea200000 irq 55
 1 [S6USB20        ]: USB-Audio - Saffire 6USB2.0
                      Focusrite Saffire 6USB2.0 at usb-0000:05:00.0-2, high speed
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xe3080000 irq 17
 3 [UM1            ]: USB-Audio - UM-1
                      EDIROL UM-1 at usb-0000:05:00.0-1.1, full speed
 4 [U88es          ]: USB-Audio - USB Keystation 88es
                      M-Audio USB Keystation 88es at usb-0000:05:00.0-1.3.1, full speed
So I tried it with
csound -+rtaudio=alsa -o dac:S6USB20 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d  myfile.csd
and
csound -+rtaudio=alsa -o dac:hw:1,0 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d   myfile.csd
but unfortunately without any success.
In the first case I get
 Cannot open device 'S6USB20' (or for audio output: No such file or directory
in the second case the output gisves me some hope, but it also fails to make sound:
*** Unable to set requested sample format on soundcard
Failed to initialise real time audio output



Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2012-08-19 11:16
FromVictor Lazzarini
SubjectRe: [Csnd] routing to a specific soundcard
Maybe it does. But I find the SR values that are returned by hw (as an error) to be very odd, so I was expecting that if you use the soundcard default SR that would not actually happen.

Victor
On 19 Aug 2012, at 11:07, Anders Genell wrote:


Oh, good! I haven't tried it that low.
If I understand it correctly it adds one extra buffer of same size as -b to perform the conversion on, so the latency will in general be doubled? I guess it won't be an issue at such small sizes though...

Regards,
/Anders


19 aug 2012 kl. 11:53 skrev Victor Lazzarini <Victor.Lazzarini@nuim.ie>:

In my experience, the plughw latency was not an issue. I used to get down to -b32 with it.

Victor
On 19 Aug 2012, at 10:16, Anders Genell wrote:

Hi Stefan!

In most cases alsa sets up a "plug" layer that handles automatic conversion, which might get rid of the "unable to set requested sample format". Try -o dac:plughw:1,0 and see if you get sound out. Mind you, this adds latency so if you're looking for extremely low such then other ways might be more suitable. 

Regards,
Anders

19 aug 2012 kl. 10:28 skrev Stefan Thomas <kontrapunktstefan@gmail.com>:

Dear community,
I would like to route the output to a specific card, via alsa.
Off course I know that could be done with jack, but I have difficvulties with it.
My output of cat /proc/asound/cards is:
0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xea200000 irq 55
 1 [S6USB20        ]: USB-Audio - Saffire 6USB2.0
                      Focusrite Saffire 6USB2.0 at usb-0000:05:00.0-2, high speed
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xe3080000 irq 17
 3 [UM1            ]: USB-Audio - UM-1
                      EDIROL UM-1 at usb-0000:05:00.0-1.1, full speed
 4 [U88es          ]: USB-Audio - USB Keystation 88es
                      M-Audio USB Keystation 88es at usb-0000:05:00.0-1.3.1, full speed
So I tried it with
csound -+rtaudio=alsa -o dac:S6USB20 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d  myfile.csd
and
csound -+rtaudio=alsa -o dac:hw:1,0 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d   myfile.csd
but unfortunately without any success.
In the first case I get
 Cannot open device 'S6USB20' (or for audio output: No such file or directory
in the second case the output gisves me some hope, but it also fails to make sound:
*** Unable to set requested sample format on soundcard
Failed to initialise real time audio output



Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2012-08-19 11:23
FromVictor Lazzarini
SubjectRe: [Csnd] routing to a specific soundcard
I guess so.

Victor
On 19 Aug 2012, at 11:15, Anders Genell wrote:

I think you are correct - the plug layer is transparent if no conversion is needed - but if the sample format needs to be changed, doesn't that also require conversion?

Regards,
Anders



19 aug 2012 kl. 12:16 skrev Victor Lazzarini <Victor.Lazzarini@nuim.ie>:

Maybe it does. But I find the SR values that are returned by hw (as an error) to be very odd, so I was expecting that if you use the soundcard default SR that would not actually happen.

Victor
On 19 Aug 2012, at 11:07, Anders Genell wrote:


Oh, good! I haven't tried it that low.
If I understand it correctly it adds one extra buffer of same size as -b to perform the conversion on, so the latency will in general be doubled? I guess it won't be an issue at such small sizes though...

Regards,
/Anders


19 aug 2012 kl. 11:53 skrev Victor Lazzarini <Victor.Lazzarini@nuim.ie>:

In my experience, the plughw latency was not an issue. I used to get down to -b32 with it.

Victor
On 19 Aug 2012, at 10:16, Anders Genell wrote:

Hi Stefan!

In most cases alsa sets up a "plug" layer that handles automatic conversion, which might get rid of the "unable to set requested sample format". Try -o dac:plughw:1,0 and see if you get sound out. Mind you, this adds latency so if you're looking for extremely low such then other ways might be more suitable. 

Regards,
Anders

19 aug 2012 kl. 10:28 skrev Stefan Thomas <kontrapunktstefan@gmail.com>:

Dear community,
I would like to route the output to a specific card, via alsa.
Off course I know that could be done with jack, but I have difficvulties with it.
My output of cat /proc/asound/cards is:
0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xea200000 irq 55
 1 [S6USB20        ]: USB-Audio - Saffire 6USB2.0
                      Focusrite Saffire 6USB2.0 at usb-0000:05:00.0-2, high speed
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xe3080000 irq 17
 3 [UM1            ]: USB-Audio - UM-1
                      EDIROL UM-1 at usb-0000:05:00.0-1.1, full speed
 4 [U88es          ]: USB-Audio - USB Keystation 88es
                      M-Audio USB Keystation 88es at usb-0000:05:00.0-1.3.1, full speed
So I tried it with
csound -+rtaudio=alsa -o dac:S6USB20 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d  myfile.csd
and
csound -+rtaudio=alsa -o dac:hw:1,0 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d   myfile.csd
but unfortunately without any success.
In the first case I get
 Cannot open device 'S6USB20' (or for audio output: No such file or directory
in the second case the output gisves me some hope, but it also fails to make sound:
*** Unable to set requested sample format on soundcard
Failed to initialise real time audio output



Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2012-08-19 11:25
FromVictor Lazzarini
SubjectRe: [Csnd] routing to a specific soundcard
But if the comparison here is to jack, then all of these things could probably also be built in to the jack layer. It's hard to say without actually testing.

Victor
On 19 Aug 2012, at 11:23, Victor Lazzarini wrote:

I guess so.

Victor
On 19 Aug 2012, at 11:15, Anders Genell wrote:

I think you are correct - the plug layer is transparent if no conversion is needed - but if the sample format needs to be changed, doesn't that also require conversion?

Regards,
Anders



19 aug 2012 kl. 12:16 skrev Victor Lazzarini <Victor.Lazzarini@nuim.ie>:

Maybe it does. But I find the SR values that are returned by hw (as an error) to be very odd, so I was expecting that if you use the soundcard default SR that would not actually happen.

Victor
On 19 Aug 2012, at 11:07, Anders Genell wrote:


Oh, good! I haven't tried it that low.
If I understand it correctly it adds one extra buffer of same size as -b to perform the conversion on, so the latency will in general be doubled? I guess it won't be an issue at such small sizes though...

Regards,
/Anders


19 aug 2012 kl. 11:53 skrev Victor Lazzarini <Victor.Lazzarini@nuim.ie>:

In my experience, the plughw latency was not an issue. I used to get down to -b32 with it.

Victor
On 19 Aug 2012, at 10:16, Anders Genell wrote:

Hi Stefan!

In most cases alsa sets up a "plug" layer that handles automatic conversion, which might get rid of the "unable to set requested sample format". Try -o dac:plughw:1,0 and see if you get sound out. Mind you, this adds latency so if you're looking for extremely low such then other ways might be more suitable. 

Regards,
Anders

19 aug 2012 kl. 10:28 skrev Stefan Thomas <kontrapunktstefan@gmail.com>:

Dear community,
I would like to route the output to a specific card, via alsa.
Off course I know that could be done with jack, but I have difficvulties with it.
My output of cat /proc/asound/cards is:
0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xea200000 irq 55
 1 [S6USB20        ]: USB-Audio - Saffire 6USB2.0
                      Focusrite Saffire 6USB2.0 at usb-0000:05:00.0-2, high speed
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xe3080000 irq 17
 3 [UM1            ]: USB-Audio - UM-1
                      EDIROL UM-1 at usb-0000:05:00.0-1.1, full speed
 4 [U88es          ]: USB-Audio - USB Keystation 88es
                      M-Audio USB Keystation 88es at usb-0000:05:00.0-1.3.1, full speed
So I tried it with
csound -+rtaudio=alsa -o dac:S6USB20 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d  myfile.csd
and
csound -+rtaudio=alsa -o dac:hw:1,0 -+rtmidi=alsa -Ma  -b-1 -B 2048 -m0d   myfile.csd
but unfortunately without any success.
In the first case I get
 Cannot open device 'S6USB20' (or for audio output: No such file or directory
in the second case the output gisves me some hope, but it also fails to make sound:
*** Unable to set requested sample format on soundcard
Failed to initialise real time audio output



Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie