Question about Renoise on Linux with ALSA

I was talking to a guy on irc who was mad that he cant use his DAW and simultaneously watch a youtube tutorial. I too, have noticed this and was wondering if there is a way to make this happen. I’m not very hip with ALSA but I thought maybe someone could tell me if its possible and if not, maybe they can explain to me why its not. :ph34r:

The Best way for Me is to use PulseAudio Jack Sink (enabled in UbuntuStudio).
I run QjackCtl and ‘start’ then pulseaudio (firefox, mediaplayer etc.) is plugged to my Jack session.

show.php?id=111602

p.s. routing everything to everything :wub:

I’ve bought this USB audio interface: https://www.thomann.de/gb/behringer_u_phoria_umc22.htmand configured jack to use the USB soundcard, while my laptop’s sound card is used by alsa (for e.g.: youtube)

I don’t use Pulseaudio like kopias, only alsa + jack and I highly recommend jack, it’s super flexible.

To make it easy for you:

1. install jack and patchage

sudo apt-get install jackd patchage

2. start the jack server on first soundcard

jackd -R -d alsa -d hw:0 -p 256 -r 48000

If you change “hw:0” to “hw:1” you would start jack on your second (e.g. USB) soundcard.

You can see all your soundcards with this command:

cat /proc/asound/pcm

The first number is the number of your soundcard.

You should try to set the “-p” (periods) as low as you can, but if you start hearing crackles and jack shows you “underruns”, then you have to set it larger again.

Periods have to be set to 2^n (2, 4, 8, 16, 32, 64, 128, 256, 512, …).

3. change audio preferences in Renoise to "jack"

4. optionally use patchage to route your audio wherever you want

  • you can route Renoise to Ardour, you can even record each Renoise track to a separate Ardour track (change “Out device” channels in Renoise audio preferences)

  • or use “projectm-jack” to beautifully visualize your music

  • or use any other application that supports jack

That’s the way I do it, maybe it helps you too :slight_smile:

I use jack also. For everyday stuff it is dormant, and I’ve a starter that starts up jack (or stops it), and with it some system tunings that make lower latency possible but burn more energy, on demand.

I used to uninstall pulse, but now I bite the weed and just leave it in. Many programs seem to have adopted to it, and configuring pure alsa in ubuntu becomes more and more a hassle while pulse is getting better. When jack is running and no pulse bridge active, pulse sleeps totally so it is no more problem. Alsa used to be much more slim and performant.

Renoise seems to work with jack just as well as with alsa. And you can configure your sound card action more verbosely than with pure renoise/alsa.

But I take care and only fire up the pulseaudio/jack bridge for youtube or the like on demand, because it will eat quite some rt performance and heavier renoise stuff might start to glitch sooner. I was glad that unloading the pulse module would fix that problem. It is only problematic when playback is running, so I can still stop renoise, load the bridge with a click and watch in a quick cat video meow for a laugh, and then unload the pulse module and resume my meow merry tracking.

Other than that jack is generally very helpful. Not only YT, but other progs like audacity or mp3 players or the like can be used in parallel with renoise, or routed in between. As many as you like and your cpu can cope with.

Jack also will give you options to use multiple sound cards simultaneously in the same patching system, and route vice versa between them and all programs at will. Secondary cards will get resampled though, so loosing tiny bit quality that will make them unsuitable for more serious recording or the like.

You can bridge audio from any ALSA application into your chosen audio system (including PulseAudio) It’s fairly easy to do and requires a loopback device, no explicit support in Renoise is needed.

A long time ago I posted a quick explanation of this; it still applies and here’s a link to the original post:

https://forum.renoise.com/t/renoise-linux-and-pulseaudio/39275

In my case, I don’t use PulseAudio at all, just ALSA. So I use this to allow Renoise to share the ALSA ‘dmix’ device with all the other applications on the system.

I found this jack + alsa solution easier:

https://wiki.archlinux.org/index.php/JACK_Audio_Connection_Kit#Playing_nice_with_ALSA

Just create an /etc/asound.conf to expose jack ports to alsa applications:

# convert alsa API over jack API
# use it with
# % aplay foo.wav

# use this as default
pcm.!default {
    type plug
    slave { pcm "jack" }
}

ctl.mixer0 {
    type hw
    card 1
}

# pcm type jack
pcm.jack {
    type jack
    playback_ports {
        0 system:playback_1
        1 system:playback_2
    }
    capture_ports {
        0 system:capture_1
        1 system:capture_2
    }
}

Caveat #1: You need to have jack started to get any sound

Caveat #2: Your jack latency settings need to be able to cope with generic multimedia apps - ex: youtube videos generating tons of xruns at low latencies.

Another option: Firefox is now creating jack ports automagically - this is more of a pain actually,

Indeed, the current Firefox jack implementation is less than ideal, quite buggy in fact.