Page 2 of 3
Re: audacity sometimes won't start when devices change
Posted: Mon Apr 12, 2010 11:28 pm
by bgravato
stevethefiddle wrote:bgravato wrote:it seems that there's a module to send pulseaudio output to jack...
That's what I've been trying to get working on my virtual test machine - not the best test bed for this kind of thing - no joy so far. I'll start a new topic about it if I get it to work.
I just did it and it's working
You need to install the package pulseaudio-module-jack and then you need to manually edit some conf file to load the modules... (in my opinion this should be done by the postinst scripts on the package, or at least there should be some note about it in the README file) Anyway you can do this by adding the following lines to /etc/pulse/default.pa
Code: Select all
load-module module-jack-sink
load-module module-jack-source
Restart pulseaudio and then there should be a new device in pavucontrol...
Also you should start pulseaudio after jackd.
stevethefiddle wrote:bgravato wrote:for what I do and my needs I think jack suits me better and is more powerful...
I use jack on my desktop machine for that same reason, but find the versatility of PulseAudio indispensable on my laptop.
I had trouble getting Audacity to work properly with Jack for years, but now it works great - just wish we had persistent ports rather than ones that disappear every time you click stop.
Sometimes I wish the opposite... if for some reason I need to restart jackd I'll have to close and restart the apps which create persistent ports at startup only... apps that only create/connect the ports when I hit play I don't need to restart them

You can try to work around that using the patchbay in jack control
Re: audacity sometimes won't start when devices change
Posted: Tue Apr 13, 2010 1:22 am
by steve
bgravato wrote:you can do this by adding the following lines to /etc/pulse/default.pa
Already tried that but still no joy - I've got the device, but Jack locks up as soon as I start PulseAudio.
My VM has become a seriously hacked up machine

, I think I'll do a fresh install before I try again.
bgravato wrote:You can try to work around that using the patchbay in jack control
The problem I seem to have is that I get different Portaudio port numbers each time Audacity starts playing or recording, so the patchbay settings never link up.
Have you ever got that to work? If I could do that I'd be happy

Re: audacity sometimes won't start when devices change
Posted: Tue Apr 13, 2010 1:33 am
by bgravato
stevethefiddle wrote:bgravato wrote:You can try to work around that using the patchbay in jack control
The problem I seem to have is that I get different Portaudio port numbers each time Audacity starts playing or recording, so the patchbay settings never link up.
Have you ever got that to work? If I could do that I'd be happy

You can use regular expressions in the patchbay... I didn't remember that but I checked my patchbay and I found this on one the output side:
I use this to connect xmms output to idjc aux input. When I start xmms it will show in jack connections as xmms-jack-<some number>_000
I don't remember how I got to that regexp but probably found it by googling around...

my regexp skills are not very good...

Re: audacity sometimes won't start when devices change
Posted: Tue Apr 13, 2010 3:03 am
by steve
bgravato wrote:You can use regular expressions in the patchbay...
Ooh - now that I didn't know - must try it, thanks.
Re: audacity sometimes won't start when devices change
Posted: Tue Apr 13, 2010 4:37 am
by steve
bgravato wrote:You can use regular expressions in the patchbay...
Fantastic
Tried Googling, but came up with zilch - just references that it
could be done, but no clue as to
how.
Finally, after a good bit of trial and error...
For left and right inputs in Audacity:
For left and right outputs from Audacity:
So easy when you know how - real-time effects in Audacity, fantastic

Thanks for the tip bgravato
Steve
Re: audacity sometimes won't start when devices change
Posted: Tue Aug 31, 2010 2:01 am
by bgravato
I'm still knocking my head on the original problem on the first post in this thread...
Still getting the pcm error and audacity won't start... Deleting the audacity.cfg file doesn't solve the problem...
Just to refresh this is what I get when starting audacity from the command line:
Code: Select all
$ audacity
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
jack_client_new: deprecated
audacity: pcm_plug.c:388: snd_pcm_plug_change_channels: Assertion `snd_pcm_format_linear(slv->format)' failed.
Aborted
$
And I have .asoundrc so that jack will be the default pcm device (through jack's alsa pcm port):
The relevant parts of my .asoundrc:
Code: Select all
pcm.jackplug {
type plug
slave { pcm "jack" }
}
pcm.!default {
type plug
slave { pcm "jack" }
}
pcm.jack {
type jack
playback_ports {
0 alsa_pcm:playback_1
1 alsa_pcm:playback_2
}
capture_ports {
0 alsa_pcm:capture_1
1 alsa_pcm:capture_2
}
}
Audacity 1.3.12 (from official Debian testing)
jackd 1.9.4+svn3842-2 (from non-update official Debian testing or sid)
I'm currently upgrading to jackd2 and I'll see if that makes any difference...
My guess is that this might be related to my .asoundrc configuration and the use of jack's alsa-pcm port...
Re: audacity sometimes won't start when devices change
Posted: Tue Aug 31, 2010 3:05 am
by bgravato
Upgrading to jackd2 will break too many things on my system for me to be able to fix right now... So I'm sticking to jackd1 for now...
Anyways regarding this problem. I've found 2 workarounds:
1) edit .asoundrc and remove the redirection of default pcm to jack alsa-pcm port
2) edit audacity.cfg and change Playing and Recording devices to "ALSA: jack"
Re: audacity sometimes won't start when devices change
Posted: Sat Oct 30, 2010 12:22 pm
by bgravato
The problem seems to be half-solved since I upgraded to the latest debian package version of audacity (1.3.12-5 -> 1.3.12-6)
From debian's changelog:
* Build with jack on all architectures (Due to a bug, jack was already
enabled on all architectures except on i386, amd64, powerpc).
The "jack_client_new" error message I was getting before is now gone.
Though audacity still fails to start when it can't open the devices in the configuration file (PlaybackDevice and
RecordingDevice parameters) with the same error message as before:
Code: Select all
$ audacity
audacity: pcm_plug.c:388: snd_pcm_plug_change_channels: Assertion `snd_pcm_format_linear(slv->format)' failed.
Aborted
Re: audacity sometimes won't start when devices change
Posted: Sun Oct 31, 2010 7:35 pm
by steve
Have you tried the current SVN code?
Re: audacity sometimes won't start when devices change
Posted: Sun Oct 31, 2010 8:27 pm
by bgravato
stevethefiddle wrote:Have you tried the current SVN code?
No.
Should I?