[issue] audacity ... only jack connections when play

Discuss how to promote using FLOSS to make music.

Moderators: khz, MattKingUSA

studio32

[issue] audacity ... only jack connections when play

Post by studio32 »

It must not be difficult do it right, but it is very annoying that apps like audacity only show up in qjackctl when they play...

Alsaplayer is a lot better in here, but doesn't have the tools which audacity have...

How can we solve this stupid problem?
Last edited by studio32 on Mon Oct 06, 2008 11:26 am, edited 5 times in total.
studio32

Re: [bug?] only jack connections when play

Post by studio32 »

raboof wrote:
studio32 wrote:It must not be difficult do it right, but it is very annoying that apps like audacity only show up in qjackctl when they play...
Why is this a problem? Because you have to `rewire' the applications each time they've disappeared and appeared?

One `solution' would be to modify all those apps and make them register at startup and unregister at shutdown, instead of on play/stop. This might be quite a challenge.

Another `solution' would be to use jack.plumbing (or a GUI for it) to automatically manage your connections as applications enter/leave jack.

I think I'd prefer the latter.
Last edited by studio32 on Mon Oct 06, 2008 12:26 pm, edited 1 time in total.
studio32

Re: [bug?] only jack connections when play

Post by studio32 »

raboof wrote:
Why is this a problem? Because you have to `rewire' the applications each time they've disappeared and appeared?

One `solution' would be to modify all those apps and make them register at startup and unregister at shutdown, instead of on play/stop. This might be quite a challenge.

Another `solution' would be to use jack.plumbing (or a GUI for it) to automatically manage your connections as applications enter/leave jack.

I think I'd prefer the latter.
Yes it is a problem, when you want to connect for example audacity and rakarrack to jack_mixer or livemix...

Fons from aeolus etc. said ones on the LAU mailinglist that it is a matter of putting some 'if' commands in the right place (in the code) so the apps will connect when startup. AlsaPlayer does that...

Jack.plumbing?
Last edited by studio32 on Mon Oct 06, 2008 12:26 pm, edited 1 time in total.
thorgal
Established Member
Posts: 739
Joined: Mon Apr 07, 2008 6:04 pm

Re: [issue] audacity/rezound ... only jack connections when play

Post by thorgal »

I think audacity can use an oss backend. In that case, you could use oss2jack for the permanent bridge. So audacity believes it's using oss while in fact, it's outputting to a jack client that has permanent ports. The number of oss2jack ports can be configured at start up. It is stereo by default but you can specify many more.

Now, maybe oss2jack is not the best and fastest way to go if you're after low latency but I would give it a try if I were desperate :)
thorgal
Established Member
Posts: 739
Joined: Mon Apr 07, 2008 6:04 pm

Re: [issue] audacity/rezound ... only jack connections when play

Post by thorgal »

thorgal wrote: Now, maybe oss2jack is not the best and fastest way to go if you're after low latency but I would give it a try if I were desperate :)
I just tried it, not worth it. The playback is totally inaudible, chopped like hell!
Too bad because the ports are permanent.
studio32

Re: [issue] audacity/rezound ... only jack connections when play

Post by studio32 »

thorgal wrote:
thorgal wrote: Now, maybe oss2jack is not the best and fastest way to go if you're after low latency but I would give it a try if I were desperate :)
I just tried it, not worth it. The playback is totally inaudible, chopped like hell!
Too bad because the ports are permanent.
Ok, thanks anyway.

BTW This issue does NOT count for ReZound...!!! :) :) (so is ReZound a better app then Audacity?)

look also at: http://linuxmusicians.com/viewtopic.php?f=1&t=197
User avatar
raboof
Established Member
Posts: 1821
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 29 times
Been thanked: 47 times
Contact:

Re: [bug?] only jack connections when play

Post by raboof »

What I means is this problem can be approached from 2 sides: we can modify the applications and tell them not to drop their connection with Jack, or we could modify Jack to cope better with connections being dropped and reestablished.
studio32 wrote:
raboof wrote:One `solution' would be to modify all those apps and make them register at startup and unregister at shutdown, instead of on play/stop.

Another `solution' would be to use jack.plumbing (or a GUI for it) to automatically manage your connections as applications enter/leave jack.
Jack.plumbing?
jack.plumbing, if I'm reading correctly, allows you to specify 'rules' like "whenever audacity becomes available, connect it to alsa playback". That seems like an elegant fit to me (though it'd probably need a GUI, not sure if one is already available).

Anyone tried it (or something similar to it) yet?
thorgal
Established Member
Posts: 739
Joined: Mon Apr 07, 2008 6:04 pm

Re: [issue] audacity/vlc ... only jack connections when play

Post by thorgal »

it's just a guess but if jack ports are destroyed between to playback or record sequences, I don't see how jack_plumbing could do anything about it. I suggest the audacity users run jack_lsp from the command line (terminal) when audacity is idle (and make sure audacity's audio preferences are set up to use jack of course). If there's nothing showing up related to audacity in the displayed list of ports, then I'm afraid there's nothing that can be done externally.

This philosophy of disconnecting jack ports while not in use is sort of strange when you consider that jack is the software equivalent of cabling / patching audio hardware together. One does not systematically unplug a guitar or speakers or amps as soon as no audio is played or recorded ... truly bizarre decision from audacity's team.
becks
Established Member
Posts: 51
Joined: Thu May 29, 2008 6:52 pm
Location: Italy
Contact:

Re: [bug?] only jack connections when play

Post by becks »

studio32 wrote:
Yes it is a problem, when you want to connect for example rezound and rakarrack to jack_mixer or livemix...
you can try using patchbay on qjackctl. it support also regexp, so you can make your own rule
ciao
studio32

Re: [issue] audacity/vlc ... only jack connections when play

Post by studio32 »

Thanks for the suggestions guys! It seems to be fruitful to discuss such issues...

Patchbay would be a good option I guess, thanks!
thorgal wrote:This philosophy of disconnecting jack ports while not in use is sort of strange when you consider that jack is the software equivalent of cabling / patching audio hardware together. One does not systematically unplug a guitar or speakers or amps as soon as no audio is played or recorded ... truly bizarre decision from audacity's team.
Agree! And it shouldn't be so hard to solve if other apps like ReZound have it right? It's open source, so just a matter of 'copy paste' isn't it (!??)

Maybe we can write an petition...
User avatar
raboof
Established Member
Posts: 1821
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 29 times
Been thanked: 47 times
Contact:

Re: [issue] audacity/vlc ... only jack connections when play

Post by raboof »

thorgal wrote:it's just a guess but if jack ports are destroyed between to playback or record sequences, I don't see how jack_plumbing could do anything about it.
Reconnect them as soon as they are re-created.
This philosophy of disconnecting jack ports while not in use is sort of strange when you consider that jack is the software equivalent of cabling / patching audio hardware together. One does not systematically unplug a guitar or speakers or amps as soon as no audio is played or recorded
Indeed. In this light, it's also strange that connections aren't persistent across application restarts: one does not systematically unplug a cd player as soon as it's turned off and on again ;).

If we fix this (with jack.plumbing or perhaps qjackctl's patchbay - haven't looked into that yet), we also have solved the audacity problem.
... truly bizarre decision from audacity's team.
I expect they first implemented traditional output like OSS, where it does make sense to only connect to the sound card if you're actually playing (as those outputs don't always allow multiple applications to use the card simultaneously). Then they probably added Jack output in the same framework, leaving the place where the output device is opened/closed untouched.
It's open source, so just a matter of 'copy paste' isn't it (!??)
You haven't done much application development have you? :)
studio32

Re: [issue] audacity/vlc ... only jack connections when play

Post by studio32 »

raboof wrote:You haven't done much application development have you? :)
no ;) But I do understand that it isn't a matter of copy/paste ;)
But what is the advantage of open source then? (maybe another discussion for another topic!)

What about a petition for audacity team to fix this?
thorgal
Established Member
Posts: 739
Joined: Mon Apr 07, 2008 6:04 pm

Re: [issue] audacity/vlc ... only jack connections when play

Post by thorgal »

raboof wrote:
thorgal wrote:it's just a guess but if jack ports are destroyed between to playback or record sequences, I don't see how jack_plumbing could do anything about it.
Reconnect them as soon as they are re-created.
This philosophy of disconnecting jack ports while not in use is sort of strange when you consider that jack is the software equivalent of cabling / patching audio hardware together. One does not systematically unplug a guitar or speakers or amps as soon as no audio is played or recorded
Indeed. In this light, it's also strange that connections aren't persistent across application restarts: one does not systematically unplug a cd player as soon as it's turned off and on again ;).
hehe, but then, when you turn off your application, it just (from the user's point of view) disappears so I guess it's like powering off your CD player, unplugging it and putting it away (in the toilet, or wherever in your house :lol: )

seriously, there is some issue here : what do you expect when your application is brought on again ? same configuration as before you switched it off ? not obvious. But while the application is on, ports should be persistent and available at all time. They should not disappear from view as soon as you're done playing something. Anyway, there is something called LASH as well. Don't know about its status, never used it but I don't use audacity intensively anyway (very rarely for retouching a couple of amplitude peaks), so I don't feel so strong about this whole business.
User avatar
raboof
Established Member
Posts: 1821
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 29 times
Been thanked: 47 times
Contact:

Re: [issue] audacity ... only jack connections when play

Post by raboof »

Added the issue to the audacity feature request page, vote for it if you like:

http://audacityteam.org/wiki/index.php? ... hancements
studio32

Re: [issue] audacity ... only jack connections when play

Post by studio32 »

raboof wrote:Added the issue to the audacity feature request page, vote for it if you like:

http://audacityteam.org/wiki/index.php? ... hancements
Good Job Raboof!
+1
Post Reply