QJackCtl + M-Audio M-Track
Hey everyone, I'm hoping someone here can set me straight. I'll say this up front -- nothing is broken, I just don't know what I'm doing all the way.
I've got an M-Track and I'm trying to use it to take an input and hand it off to IDJC via JACK. I can see the device in VLC (image 1) on default settings (image 2) and all works well. I can see it in QJackCtl under MIDI (image 3) but can't find it it under Audio (image 4) which is where is where I can interact with IDJC.
How should I proceed?
Edit: Problem "fixed" using a different card for reasons explained below. Most of the setup should still apply.
Posted Mar 24, 2015, 11:09 PM UTC · edited
Jack by default isn't multi-card aware.
Basically any time you have more than one soundcard you have each one producing samples at ever so slightly different rates. Some pro soundcards will allow you to link the clock across multiple soundcards, but regular consumer cards don't allow you to do this.
What you can do is have one of the soundcards run as a slave - and have it resampled and buffered a bit.
See: http://www.reddit.com/r/linux/comments/2l03hd/the_future_of_realtime_linux_is_called_into/clqzglr
alsa_in may suffice for your usage.
Ah, so that's how you do it. How much extra latency can be expected from doing this?
If I remember correctly it works by observing how often the resampled card periods come in versus the master periods. Once it's got an estimation for the skew between the two there's a contingency percentage + one full resampled card period (to avoid starvation).
In terms of times - if you're running 256 samples per period it seems reasonable it would be somewhere under 512 samples.
So, great for mic in for a podcast, not so great for adding extra tracks to that mix.
I wonder if you could do it more on the fly, by estimating all necessary parameters and producing an output once every sample. It might be computationally intensive, though. We might have to build some hardware for the purpose. :-)
Actually, if it can be done well, a hardware box that collects the signals from multiple audio interfaces and presents them to the computer as coming from a single interface might be handy.
You could, but the constraints on CPU power usage means it's a pain to keep a whole CPU constantly busy doing that one thing.
Aye, you've hit the nail on the head. And if we're doing custom DSP on the fly per sample, that's a custom DSP chip we need plus the logic for it. Given the cost of DSP hardware versus mass produced DAC/ADC circuits, the far simpler economical method is to get better audio hardware with more channels using one clock.
There's another thing I didn't mention about this resampling / slave issue - the resampling has a cost in terms of CPU usage - but it also comes at a cost in terms of sound floor and high end.
We are resampling, which due to floating point precision/rounding errors is going to bring up the noise floor.
Additionally we have to put in place some low pass filters at the high end to stop things passing through Nyquist. As soon as we're doing filtering we're altering the signal and for any pro-audio environment applying filters that are out of our control is a big no-no.
I get your zen for providing a product for multi-card recording ability, but for the occasions where it's really necessary the simplest and cheapest solution really is buying a card that can handle the number of channels necessary (pro gear not ignored, there you get clock linked multi-card solutions due to the large number of channels).