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

38
TheQuietestOne•

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.

3
Bromskloss•

What you can do is have one of the soundcards run as a slave - and have it resampled and buffered a bit.

Ah, so that's how you do it. How much extra latency can be expected from doing this?

1
TheQuietestOne•

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.

2
Bromskloss•

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.

2
TheQuietestOne•

I wonder if you could do it more on the fly, by estimating all necessary parameters and producing an output once every sample

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.

It might be computationally intensive, though. We might have to build some hardware for the purpose.

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).

2
voteNoOnYes•

This page might be of use to you.

Execute this command: cat /proc/asound/cards

The cat program outputs a list of sound cards in your computer that looks similarly to this:

0 [SB             ]: HDA-Intel - HDA ATI SB
                  HDA ATI SB at 0xf7ff4000 irq 16
1 [MobilePre      ]: USB-Audio - MobilePre
                  M Audio MobilePre at usb-0000:00:13.0-2

Click Setup to open the "Setup" window in qjackctl.

In the 'Interface' text box, type the name of your preferred sound card with "hw:" in front. With the sound cards listed above, you might write hw:MobilePre (or hw:1).

2
StevenMatrixOP•

UPDATE:

I got mad at the M-Track and the store I bought it at when I found out that the copy of Ableton that it came with was already activated, and ended up returning it. Final thoughts on the M-Track: It might work for recording audio, it definitely works fine with MIDI.

I ended up finishing this odessy with a Behringer UCA222. I've thrown together and Imgur album with the QJackCtl settings. Ignore the PulseAudio Jack Source/Sink bit -- that's an artifact of messing with alsa_in that I haven't deleted yet.

1