Permanent, system-wide plugins?

Unofficial support for the KXStudio Linux distribution and applications.
More info at http://kxstudio.linuxaudio.org/

Moderators: MattKingUSA, khz

Post Reply
Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Permanent, system-wide plugins?

Post by Luc »

I was taking a walk donwtown this week, window shopping and thinking that it would be nice to have a physical equalizer that I could attach to the output of my computer or USB interface so all sound coming from the computer would be equalized, including Youtube ou Soundcloud. Even nicer if I bought some fancy bells-and-whistles amplifier with EQ, crossover, compressor, de-ess and other luxuries. That would be nice.

But those things cost way too much money and I can achieve the same results with software.

Or can I?

Audacious is an audio media player that has a LADSPA host (among other effects), which lets me have plugins/effects permanently applied to everything it plays. Of course, they only apply to Audacious.

If I use JACK all the time, can't I have those and other (vst, lv2) effects applied to the sound output across the board?

I can see the output channels in Catia. I can build a plugin rack and connect it to those output channels, wedged between the source of the output signal and the actual output channel. That is simple, but not automated. The next thing I use is going to connect automatically to the final output, not to my plugin rack. And how do I get to save that rack so it can be reused? With Carla, I guess, but it still has to be launched and recalled.

Is there any way to have plugins permanently attached to the master output channels and take over for them when something tries to connect to the master output?
Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Re: Permanent, system-wide plugins?

Post by Luc »

Open Audacious, click the "Output" then "Effects..." menu items. Those are the effects apply to Audacious only.
I want something that is as permanent as that, but applies on the entire system.
User avatar
kbongosmusic
Established Member
Posts: 109
Joined: Sun Mar 06, 2016 9:14 pm
Location: Minneapolis

Re: Permanent, system-wide plugins?

Post by kbongosmusic »

I think what you want is very doable. In many different ways. It's just figuring out what to use and how to route it(configure it). I've just recently started to try and figure out how all these things we call linux audio work together. It's rather crazy the complexity of it all. Started playing with turning pulseaudio on and off, as well as jackd. It's just become apparent to me that alsa is not just drivers and is just as complex as these other components. So for example, I did a upgrade in Debian testing recently, it pulled in a new kernel. Somehow in the process my default sound device turned into a Alsa Loopback device. I now have two of those in front of my real audio hw. Had to reconfigure jackd(I use qjackctl mostly) to specify my 'real' hw instead of the default, which I believe is the first alsa one which is now a Loopback thing. I just got the browser to route to jack via this alsa loopback device(there is a kernel module snd_loop that is magically loading now to provide this). I discovered a alsa_in/alsa_out that can route alsa devices to jack. Got the browser to work via jack using alsa_in -dhw:Loopback,1 then a 'alsa_in' magically appears in my qjackctl Connect Audio window that I connect to my jack system tied to real audio out hw.

So that's cool, I can now listen to a sound-cloud music or youtube from the browser without activating pulseaudio. Now I don't have anything against pulseaudio. If I turn that on then somehow magically I can play tunes from the browser, and sometimes it works along with jackd. Now if you google on pulseaudio you find someone makes a equalizer that will plug into it. If you google on alsa and equalizer you will find one of those as well(says it uses a LADSPA plugin). Or using the alsa_in and loopback thing I mentioned you could route the default(first?) alsa device(loopback) that at least my browser seems to use thru whatever chain of jackd plugins you want.

For me, all the configuration of this stuff is rather frightening stuff. Alsa config files are scary to me(I leave mine alone so far), and I work with computers all day long, have put together linux systems, I enjoy command line stuff and text editors. I just mention that for any linux musicians out there that are not complete computer geeks. This stuff is not easy. I was happy as a clam running Audacity right from ALSA without jack for a long time.

pulseaudio, talk about system wide plugins. Like I said, seems to work OK, and maybe I will learn to understand and accept it. But, on my machine that I want good low latency recordings, I'm not sure how it ties in along side jack. Is jack going thru it? Or the other way around(does it add latency?). Is it hooking into ALSA? I have no idea(yet). It certainly has to take some processing power from my aging PCI desktop. Yesterday I was running pulseaudio and it was sending my browser audio to both my main audio card AND my guitar effects unit(digitech RP350) which has a built in audio interface. I suppose that is wonderful, but hey, why are you sending audio out my stomp box? The impression I get is pulseaudio wants to tap into everything by default. Maybe that's great for the default desktop experience. And I'm sure pulseaudio can be configured just like these other components. And maybe someday I will learn what the heck systemd is doing behind the scenes.

Ugh, may you flying spaghetti machine fly straight and true.

UPDATE/EDIT:
Ok. So just to try and explain the madness above(for future generations that booble and read this(booble will a have replaced google by then):
pulseaudio was not sending audio to two of my cards - It was sending it to my rp350 stomp box and I happened to have the output of that plugged into my mixer, my headphones plugged into that. My main PCI audio card is also plumbed into this mess, so I got confused on that ;)
I believe the alsa loopback modules were added by a kxstudio base package I added(debian install scripts can tinker with your config files /etc/modules). I believe that was put in place for this jack bridge thing that perhaps kxstudio wants to provide. Pulseaudio(pa) hooks into alsa by putting a pulse add-in module in. So down in the default system alsa config(/usr/share/alsa/alsa.conf.d) you will find where pulse is arranged to kidnap your audio away from alsa, do what it does with it, and send it back to alsa - fair enough. Config of pa you can find in /etc/.config/pulse, where it remembers what card it thinks is it's default to use. But you don't edit this by hand. There is pactl command, like if you want to change what it outputs to: pactl 'set-default-sink 2' for example. Or pactl list or pactl info to view current settings. Generally most apps will route thru pa using the default/pulse alsa audio hook. But Jack is special, and does everything it can to avoid pa(rightfully so, as it wants to be the low-latency mix master). In my deb-testing, Jack seems to have special abilities to ask pa to stop using the hw it wants and take it over. I'm not sure how it does that(maybe dbus msgs?). pa will not rob jacks hw(cause jack keeps it open and wants to hord it(rightfully so)).
Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Re: Permanent, system-wide plugins?

Post by Luc »

I am reopening this thread, in search of help. It's not solved yet, after all.

It is directly related to this other thread of mine:

viewtopic.php?f=47&t=16697
Luc wrote:What is the best way I could run a plugin as standalone? I want to run this plugin all the time, and it must be hidden/in background, but I also must be able to access its GUI or controls somehow.

Carla doesn't sound like a good option, because it won't be hidden and it doesn't connect inputs and outputs automatically. I intend to have aj-snapshot make the connections automatically, but I don't believe it would work because it will see Carla, not its internal patchbay. Unless I am mistaken.

I still haven't decided what plugin to use, so I don't know if it's going to be VST, LV2 or LADSPA, but I might want to add more plugins to the chain in the future.

Any ideas?
Running plugins as standalone was a mess and not really viable (explained below), so I resorted to Non-Mixer. It is one single thing that gives me extra gain (I need that) and lets me attach plugins. The best part is that it remembers the last configuration by default at startup. Sweet.

Two big problems, though:

1) Non-Mixer is unstable. It crashes occasionally. It also uses a lot of RAM, to the point of bringing my machine down to its knees. No other application has ever done this to my current machine.

2) Sometimes, I have to restart JACK several times a day. For example, Tracktion often crashes, and adamantly refuses to restart until JACK is restarted. Even if I use something else in place of Non-Mixer, I still have to deal with the trouble of keeping the appropriate connections in place. How?

JACK keeps forcing "alsa2jack" connected to my soundcard's final output. I can change that connection so as to wedge something in between, such as Non-Mixer or whatever, but that temporary connection is destroyed when JACK is restarted, which is obviously very annoying. There is no way for me to tell JACK to connect to Non-Mixer instead of the soundcard's final output. Other applications also connect to the final output, bypassing Non-Mixer (or whatever I intend to use to replace it).

I tried aj-snapshot. I keep it running in a kind of improvised 'daemon' mode (its builtin daemon mode doesn't work correctly and I've notified the developer), so it keeps stealing the connections from JACK's hands and placing them where I want them to be. But aj-snapshot relies on a 'dumb' snapshot. It's not flexible. It restores the saved snapshot no matter what. So let's suppose I want to run something that is not contemplated in that snapshot. Well, then the aj-snapshot 'daemon' will break the new connection immediately. Auditioning random plugins, for example, becomes impossible.

In my ideal world, everything that wants to connect to the final output should be told to connect to Non-Mixer (or its future replacement) instead. Or maybe JACK could have a pre-output container that could host plugins, and any default output would automatically look for that one instead of the actual output.

What is the closest I can get to that idea?
Lyberta
Established Member
Posts: 681
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet
Been thanked: 1 time

Re: Permanent, system-wide plugins?

Post by Lyberta »

Maybe they want the plugin turned on at all times, even when not making music. I've met a guy who ran reverb on his Windows PC (proprietary audio card drivers had this option) at all times, even mouse clicks had reverb and he was fine with it.
Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Re: Permanent, system-wide plugins?

Post by Luc »

beck wrote:I think i still don't understand what you realy want to achieve with the "hidden plugin on the background".

What i do is add plugin's on each track (vocals, instruments, drums) where needed to edit and mix. Mostly i only add EQ to tune the total. And Multi Compressor to get some extra backbone, gain and so (like you want to achieve??)

If the editing is done well the master hardly needs plugins.
As i don't create full albums real mastering is not needed.
There is no track. This isn't DAW operation. It's the system wide sound. It's often too quiet. I want to apply gain, possibly compression, a little EQ (e.g. for listening to music or youtube videos), and I hope I can apply some normalization because I'm sick of the roller coaster of youtube and facebook videos that are either too loud or too quiet.
Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Re: Permanent, system-wide plugins?

Post by Luc »

I am familar with mixxx. I have it installed.

But Audacious does that even better. It has a LADSPA plugin host. It supports gain, eq and compression, anything that LADSPA plugins can do.

But again, I want it system wide. I even mentioned Audacious earlier in the thread.

There is nothing wrong with my sound setup except it's dirty cheap and crappy. My idea worked with Non-Mixer except for the problems I already mentioned which are the very reason why I am keeping this thread: crashes, memory hungry, managing JACK connections...
User avatar
sysrqer
Established Member
Posts: 2525
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 320 times
Been thanked: 153 times
Contact:

Re: Permanent, system-wide plugins?

Post by sysrqer »

Haven't read the whole thread but doesn't Carla run in a gui less mode? A Claudia or ladish session could be loaded and as far as I remember connections can be remembered after a program is closed? Unless I'm wrong or barking up the wrong tree then just ignore me.
Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Re: Permanent, system-wide plugins?

Post by Luc »

sysrqer wrote:Haven't read the whole thread but doesn't Carla run in a gui less mode? A Claudia or ladish session could be loaded and as far as I remember connections can be remembered after a program is closed? Unless I'm wrong or barking up the wrong tree then just ignore me.
I've tried it with Carla "visible." It doesn't work. As soon as I restart JACK, Carla gets disabled. In fact, it completely disappears from Catia's patchbay, while Carla's own patchbay does not change at all and displays an outdated set of connections. It is impossible to rebuild the connections unless I unload and reload the plugins, or restart Carla and load a project file, which completely defeats the purpose of what I want.
Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Re: Permanent, system-wide plugins?

Post by Luc »

falkTX wrote:Your best choice here is probably gladish/claudia with jack2 no-self-connect mode activated.
Applications will not be able to connect to the system ports automatically, and you can manage the auto-start of several apps with a custom project file.
(So for example, carla stops when jack stops, but starts again with the project you specified when jack starts up again).
Can you please explain these options here? For example, what are external ports exactly?

Image
Post Reply