[ubuntu-studio-devel] Introduction to feature definition (for all you newcomers, and memory refresh for the rest)
Len Ovens
len at ovenwerks.net
Fri Dec 11 15:17:50 UTC 2015
On Thu, 10 Dec 2015, WMID wrote:
> I suggest something a little harder it becomes.
>
> Happens is that when I started at UbuntuStudio 12.04 I did not know that there
> is aplications that only work fine with Jack excecuted first, so if someone comes
> from scratch I wish there was something that can explain that there are only
> those applications if you execute it is first executed qjackctl
>
> UbuntuStudio/Wily/FreedesktopCategories/Audio(start QjackCtl first)
> UbuntuStudio/Wily/FreedesktopCategories/Graphics
> UbuntuStudio/Wily/FreedesktopCategories/Video
>
> like this:
>
> http://i.imgur.com/nW6nbU8.png
>
> "I want that when someone come to using Ubuntu Studio can understand as quickly
> as possible so do not be discouraged"
That is a great idea... even if it won't work. However, I have been
working on another solution. Jack does not take a lot of CPU and is quite
stable (hardly noticable at higher latencies). SO starting jack at session
start means the user doesn't have to know about jack on first startup.
So start jack with session startup. Now we have problem two, pulse audio
(desktop audio) has no access to the audio device and if there are more
than one device it will then default to whatever else is around. Fix? Yes,
unload pulse's device loading and load a pulse-jack bridge so that desktop
audio just uses jack as it's device.
So far so good. The next problem... The new thing is USB mics. These are a
cheaper way of getting a mic in, but the mic is now another device and
jack can only deal with one device at a time because no two devices are in
sync with each other. In the profesional world one device is used only or
if more than one they are externally synced (jack can be made to deal with
that) So another program needs to be used. This program is zita-ajbridge.
It will sync an extra device with jack using a high quality resample. Of
course if the user wants skype to see this extra mic, another pulse-jack
bridge needs to be added. I have actually got this far. The user boots and
in jack they see all their devices and from the desktop they see all their
devices too. My wife uses skype this way too.
The next few steps are what I need to work on next:
The case of a user pluggin in a USB audio device. There are two senerios
here:
1) The user just wants to see this device, udev script just runs
zita-ajbridge etc. done. (I will do this first :)
2) The user actually wants this one to become jacks main
interface. This can be done, jackdbus will allow changing the main audio
interface on the fly. We also have to catch the interface that is no
longer used and connect with zita-ajbridge. We also have to remember which
device this is so that if the USB device goes away, we can set this as
jacks interface.
The case where one of the applications requests jack use freewheel mode.
the pulse-jack bridge has to be removed in this case as they do not deal
well with freewheel mode. In the long term I will see if I can fix the
pulse-jack bridge.
The case where the latency needs to be changed. A high latency works for
most things (note high latency in this case is what most desktops call low
latency) but for live effects (guitarix for example) or live software
synth, it needs to be lower. This starts to get into "it depends" things.
Most often in this case desktop audio no longer matters. The pulse bridge
can go away. Jack can handle a change in latency on the fly, but the
zizta-ajbridge can't. Really, the user needs to decide which audio
interfaces matter because with lower latency comes higher cpu use for any
bridge as well as jack itself and the audio applications being used. In
any case any of the zita-ajbridges need to be dropped and if any are
needed they need to be restarted.
So as you can see this is not trivial, but it is possible. Pulse provides
the desktop front end and with no device back ends become much easier to
deal with. Most of the problems I have seen with pulse come from allowing
pulse to see (and sync to) any device while working with jack which gives
xruns. But having taken away pulse's back end, we have to do the work that
pulse would normally do of keeping track of what audio devices are around.
In all of this I have not mentioned MIDI devices. These are taken care of
by a2jmidid. This may need to be restarted if a new (USB for example) MIDI
port shows up. Forget that, I just tried it. Pluggin in a USB MIDI port
just works with the a2jmidid that is already running.
As some people will probably point out, there are other solutions to
desktop audio (skype won't work but most other things can be made to). But
none of them "just work". They end up being far more intrusive in the end.
Just out of interest, looking down the road at AoIP which I suspect will
be the next new thing in audio interfaces... these will require a new way
of looking at things where an interface is visible, but not connected
until needed :)
--
Len Ovens
www.ovenwerks.net
More information about the ubuntu-studio-devel
mailing list