Renoise, Linux and Pulseaudio

You could’ve left it at that mate, perfect.

My argument in a nutshell.

  • Pezz

[quote=“Mark, post:13, topic:39275”]

  
$ modprobe snd-aloop  
$ cat /proc/asound/cards  
$ renoise  
<in the preferences configure renoise to output hw:loopback><br>
<br>```

<br>
<br>
Then in another terminal, connect Renoise output onto its new destination, eg.<br>
<br>

```<br><br>
$ alsaloop -c 2 -C hw:Loopback,1,0 -P default<br>
<br>```

<br>
<br>
You're basically taking Renoise audio and feeding it through the 'alsaloop' program and asking it to make the noise for you. So needless to say, don't expect real-time latency for playing live, unless you configure alsaloop and any onward destinations for this (which is do-able, though)<br>[/quote]<br>
<br>
I've just come back to this thread, and thanks for this (I completely missed it).<br>
<br>
Thanks to this advice, I've made things work how I wanted, so I wrote a gist which is slightly different to what you've advised (with regard to device order).<br>
<br>
https://gist.github.com/pezz/6761488<br>
<br>
I withdraw my request, I guess, even though it would be so much simpler if Renoise "just worked" with Pulse.<br>
<br>
But, at least now, I have my normal desktop audio working with an internal laptop mic for Skype, Flash and web browser makes noise, VLC, etc, and Renoise can make noise with the rest of my programs.<br>
<br>
Cheers.</in>

Hey, thanks for this!

PS: Where did you get that Github avatar? It’s actually a JPG I made myself years ago. I’m glad to see it’s making the rounds.

Cheers.

I might’ve actually stolen it off this forum?

It’s great anyway. I hope you don’t mind me using it, as I have done for years. :)

No, I don’t mind at all. Just thought it was a weird coincidence. Cheers.

Glad you found it useful. I don’t think it negates our original requests, this is very much a workaround rather than a solution.

Especially as over time you’ll probably discover that snd-aloop is fiddly at best (the various parameters on both sides have to match exactly), and sometimes just down right buggy – especially when it comes to things like suspend/resume. I haven’t notified of these bugs though, so apart from not doing anything to help the situation, it could also be that they’re not bugs and I’m doing something wrong. But frequently things fail on my system with “Input/output error”; it’s not something I would want to use in a live scenario.

The compelling argument is why waste developer cycles when there are plenty of solutions, with and without pulse, already. I would much rather see the Renoise devs focus on new features for the product, rather than supporting another unnecessary audio interface.

Pulse is in no way a “requirement” on a modern desktop… I run Ubuntu and Mint systems on various desktops and laptops without pulse, but with full audio capabilities. I agree for a standard desktop user pulse (when it works) makes a few things easier/nicer, but it is in no way a requirement.

no, we are not agreed - actually, there are some very nice, easy ways to make it all work together… and yes, it is not well documented, but I would be very interested in seeing you hand configure Pulse… see next comment…

Then install the kxstudio repos, install kxstudio-[unity|xfce|kde]-desktop, and let it manage all of the connections for you. As long as you have an alsa supported sound device (mine is firewire and pulse just dosnt play nice…) it will make it all work “out of the box” - and nicely at that.

I am in no way saying you cant use pulse… simply stating that there is no real reason to divert the limited resources available to the renoise development effort to make renoise talk to it directly. You cant run pulse without alsa, so alsa is fine.

  • Pezz

The release cycle for Renoise is like 6+ months, if they can output to ALSA (from what I understand is a clusterf*ck programmatically) and get it right, then a simple Pulse output doesn’t seem that difficult. I’m not an audio coder, and neither are you (probably), but given the output of release vs features, I don’t see it as that much of a big deal given how ubiquitous Pulse is now.

You say there’s very nice ways, but then argue against yourself by admitting that it’s not well documented.

You’ve missed my point here, I do run a dedicated box with Linux audio hacked beyond buggery, and it’s fine on that box - I don’t need flash or audio desktop alerts or anything else that “just works” on a standard DE that is used for web browsing, Skype, etc etc…

You’ve missed my points on several levels, sorry.

  • Pezz

(probably) shouldnt make assumptions about what I am or am not :blink:. Probably shouldn’t make assumptions about how easy/not easy it is to create “simple Pulse output”, as you are (stated, not “probably”) not an audio coder.

Dosnt matter if the release cycle is 1 month or 3 years, I as a user would much rather see every hour of that time spent making a better product, not custom coding to a specific audio server that is NOT intended for pro audio (as Renoise is…)

the underlying configs are not well documented. Nor are the Pulse configs. There is a simple way to get pulse-jack-alsa working - install KXStudio repos.

Here, while you are wrong in which point I missed, I will acknowledge, I did miss a point - since I have never attempted to run Renoise without JACK, I was making a few assumptions about its ALSA config - assuming in ALSA mode that it behaved like an ALSA app, which would then work through a normal desktop Pulse setup just like any other desktop app coded to Alsa (like Firefox, or Banshee, or whatever other sound application you are using). Very VERY few applications are re-coded specifically for Pulse.

So after this discussion, I fired up Renoise and switched to ALSA and see where the issue is - Renoise wants to talk directly to a hardware interface. Yeah, ick.

So the request really should be “modify alsa mode to allow behaving as a simple alsa application outputting audio as a standard alsa app (or add an “app” mode)”. Still no reason for direct PULSE support - would actually help even more people, and I heartily agree this is a valid request.

Though I bet no other audio production tool in Linux Land will even pay attention to such a request. Many dont even support any level of ALSA without JACK. Go ask Ardour, or QTractor, or [insert prosumer audio application name here] to directly support Pulse… guarantee that request is closed as “will not implement/will not fix” as fast as it is read.

Which one of those do I pay for again?

I agree. This would, as a side effect, be Pulse compatible, and end the thread.

For example: if I launch Audacity on my vanilla out-of-the-box Ubuntu rig, then go to [Edit → Preferences], then look at the Devices config. The host is clearly set to: ALSA

If I play an OGG in Audacity, then go to Youtube and view a video at the same time, the sound on the video plays fine.

Whatever Audacity is doing, Renoise should copy.

Good times.

Well, I and many others who use Renoise on Linux with a configuration for audio production and have no use for “Pulse Audio Integration”, but would welcome new composing/production features, pay for Renoise… so I dont quite understand your point.

My point is: I don’t demand stuff from free software (you said that “nobody will ever listen to your request blah blah blah”).

I do demand features for something I pay for – just like you do and implied in your response (composing/production features).

You disagree and assert nobody needs basic desktop audio support because you don’t, something that (as Connor pointed out), Audacity and even something like Milkytracker supports (both free).

Anyway, we’re never going to agree.

The developers have ultimate control, so it’s in their hands that I leave my plea, not yours.

You pay for a license for the software as it currently is (the latest final), not for as you think it should be or should become. Don’t get any of us wrong here, the input that you and any other user submit on this board is gladly appreciated and seriously considered (look at the history of what was requested and added to the software and you will see that every update contained stuff that users requested), but also weighted for several aspects. This doesn’t only involve how many are asking for it, but also how hard it is to implement and how much these new routines would fit the rest of the program without disturbing other current working processes for instance.
I’m sure that pulse-audio support or changing the way that the ALSA layer is claimed, would not harm other existing functions inside Renoise, but i don’t have the knowledge how hard or easy it is to make these changes which remains up to the devs to decide.

I also use gnome shell on arch and although I didn’t manage to integrate the audio playback with the system yet, I still bought renoise. So no, this feature is not crucial. And yes, pulseaudio is not meant for “serious” audio production. But it would be nice to just being able to preview samples or whatnot within the file manager while renoise is running. Without having to set up some complicated workaround. So a big +1 from me. But I don’t want to “demand” anything here.

EDIT:
Some sort of free/grab audio device button would actually be enough in this case

Honestly pulseaudio is so easy to set up to work with proper audio server (jack) that developers shouldn’t waste their time on implementing support for it.

for example in arch all you need to do is install jack2 and pulseaudio, and start renoise with this script:

#!/bin/sh  
jack_control start  
exec renoise $1  
jack_control exit  
``` this should work in any distribution that supports jack2 (with dbus support) and pulseaudio has module-jackdbus-detect. I'd imagine at least most major distros would have those on their latest release. When jack is started via jack_control, pulseaudio recognizes it with module-jackdbus-detect and automatically routes everything to jack.  
  
If you're going to use this you probably want to extend the script to set up correct buffer size, sampling rate etc. with jack_control. [arch wiki](https://wiki.archlinux.org/index.php/JACK_Audio_Connection_Kit#A_Shell-Based_Example_Setup) has a good example on how to do that.  
  
I know this gets too technical for some people, but if renoise was able to control jack via dbus, you wouldn't even need the script, and everything should work pretty much out of the box with pulseaudio using jack as output.

^ remove the “exec” in front of renoise, or else the commands coming after it won’t get executed.

…and replace $1 with “$@” (including the quotes) or else only the first command line argument will be passed to renoise.

does renoise take more than one argument? originally I didn’t even have the $1 in there, since I simply use the script to launch renoise. I added the $1 in case it was used to open xrns via file browser or something and I thought you can’t open more than one file at the time.

That’s a good point about the ‘exec’. I added it to make gnome-shell’s dash/panel recognize that renoise is open when started with the script. I was going to find better solution but forgot about it. Anyway the script should work, although it won’t stop jack server if there’s ‘exec’ before renoise command.

My point is that instead of implementing pulseaudio support, it would be better if devs improved jack support to use dbus, thus making pulseaudio work flawlessly with it. The script was provided more as a proof of concept than workaround.

here’s a more complete script with comments if anyone’s interested.

#!/bin/sh  
  
#start jack server  
jack_control start  
  
#enable realtime support  
jack_control eps realtime true  
  
#select audio subsystem and device  
jack_control ds alsa  
jack_control dps device hw:0  
  
# set sample rate, buffers and periods  
jack_control dps rate 48000  
jack_control dps nperiods 2  
jack_control dps period 512  
  
#start renoise  
renoise "$@"  
  
# stop jack server and exit jackdbus  
jack_control exit  

KDE/Arch Linux user here. The nice thing about both is that they don’t mandate the use of the PulseAudio server. Thus I have so far gotten along just fine with ALSA. I can use Renoise and play YouTube videos at the same time. However, I think a solution for the Pulse users would be ideal.

Normally for most Linux applications one should be using an abstraction layer such as OpenAL or SDL as they handle a multitude of audio backends out of the box. For something like Renoise, however, it is understandable that support for each sound system be implemented individually for the tighter integration required by DAWs.

Thanks pussi! That did it