Specify output declared in ~/asoundrc

Good day!
It seems that I can’t set output device to my virtual interface ‘pbnrec’ that I’ve declared via ALSA .asoundrc file.

What I want to do is to record everything that Ardour8 sent to ‘pbnrec’ interface via ffmpeg. For that I created snd-aloop interface (see my asoundrc file for example) that catches everything ‘pbnrec’ plays.

But it seems that Ardour8 allows me to select real devices only.
Is there any way I can select my virtual interface ‘pbnrec’ for output?

Here is my .asoundrc file

pcm.RME{    
    type hw
    card Pro73038048
    device 0
    subdevice 0    
    nonblock false}

ctl.RME{
    type hw
    card Pro73038048}

pcm.loopin {
    type plug
    slave.pcm "hw:0,0,0"
}

pcm.loopout {
    type plug
    slave.pcm "hw:0,1,0"
}

pcm.multi {
    type route;
    slave.pcm {
        type multi;
        slaves.a.pcm "RME";
        slaves.b.pcm "loopin";
        slaves.a.channels 6;        
        slaves.b.channels 2;
        
    bindings.0.slave a;
    bindings.0.channel 0;
    bindings.1.slave a;
    bindings.1.channel 1;
    bindings.2.slave a;
    bindings.2.channel 2;
    bindings.3.slave a;
    bindings.3.channel 3;
    bindings.4.slave a;        
    bindings.4.channel 4;
    bindings.5.slave a;
    bindings.5.channel 5;
    
bindings.6.slave b;
    bindings.6.channel 0;
    bindings.7.slave b;
    bindings.7.channel 1;
}

ttable.0.0 1;
ttable.1.1 1;
ttable.4.6 1;
ttable.5.7 1;
}

pcm.pbnrec {
    type plug
    slave.pcm "multi"
    hint{
        show on
        description "Alsa Playback & Record"}}

I might be wrong, but you may have to use JACK to accomplish what you are trying to do.

JACK was the only way that I found on my system to use a customized ALSA setup with Ardour.

I don’t like the sound produced with jack. It seems not so clear and punchy to me.

b.t.w. I successfully made the thing described above with Reaper Daw (just type in ‘pbnrec’ in the output combobox). But I don’t like the sounds Reaper produced with my midi synth.

Thank you anyway.

Was Reaper using JACK ?

For a variety of reasons, Ardour only enumerates physical audio interfaces, not ALSA psuedo-devices. We had many issues in the past with users trying to use various pseudo-devices and decided to just get rid of the support issues this created by only allowing use of hardware devices. There were some other reasons too.

There is a way to specify other devices via an environment variable, but it is not documented and we don’t really want to encourage it’s use. There is a note in the code that we should provide a GUI for this, but wew currently do not.

Your comments about JACK are a little strange. ALL audio I/O on Linux goes via ALSA, whether you use the ALSA API directly, JACK, PulseAudio, Pipewire or anything else. JACK does absolutely nothing to color or change sound. There is no way for the sound via JACK to be different than the sound using ALSA directly.

Thank you for your clarification.
The difference between ALSA/Jack is significant to me.
Jack sounds not so powerfull to me.
May be I’ll check out JACK later once again.

No. I didn’t like the sound JACK produced.

JACK does bit-perfect transfer of audio. If you use the same device with the same hardware settings, every sample will be identical to using ALSA directly.

2 Likes

I found out that I can declare environment variable ARDOUR_ALSA_DEVICE to change output device via “export ARDOUR_ALSA_DEVICE=pbnrec” command.
But it does nothing.
And I still has my BabyFace Pro Fs interface selected.

Can you please tell me what is wrong?
I have Ardour 8.4

Paul tried to subtly hint that the reason this is not supported is because they do not have time to support the issues that arise, like for example your questions. If you had a good enough reason for needing this, they might anyway put in an effort, but since you clearly only want this because you believe that the audio via Jack is worse than audio directly via Alsa (which is not true, they are identical, the same bit stream/samples) I think they decided to not spend more time on this.

Are you running Ardour from the Terminal where you set this environment variable?
And then use Audio System: ALSA?

I found out that Ardour can export audio to RAW PCM format.
It’s much better that WAV.
Thank you.

Oh… You mean “export” cmd got lost when I ran Ardour via Ubuntu desktop icon?

Though I have a degree in IT
I spent too much time coding for Windows)

Thank you for advice.

Uh WAV file IS RAW PCM. It is just encapsulated in a header that describes things like sample rate and bit depth of the raw PCM. That is literally it.

   Seablade
3 Likes

Yes, environment variable are valid only for the current environment (here the Terminal).

For the Ubuntu desktop launcher you have a few options. The easiest is likely to just modify the desktop launcher and set it there:

ARDOUR_ALSA_DEVICE=pbnrec ardour8
1 Like

The only way JACK and ALSA can sound different is if you have something else going on that changes the sound, eg. inadvertantly using sample rate conversion on one and not the other. Check that isn’t happening.

1 Like