2 interfaces, 2 jackd, couple them

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

tavasti
Established Member
Posts: 2059
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 375 times
Been thanked: 209 times
Contact:

Re: 2 interfaces, 2 jackd, couple them

Post by tavasti »

merlyn wrote: Fri May 12, 2023 11:50 am

Does this work?

Code: Select all

$ jack_control ip audioadapter

Yeah, that works.

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: 2 interfaces, 2 jackd, couple them

Post by merlyn »

We can conclude that zalsa_in is not an internal. I found audioadapter to be the best. I haven't tried zalsa_in.

tavasti
Established Member
Posts: 2059
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 375 times
Been thanked: 209 times
Contact:

Re: 2 interfaces, 2 jackd, couple them

Post by tavasti »

artix_linux_user wrote: Sat May 13, 2023 8:21 am

It is interesting to read here about using 2 interfaces.
Having said this, from my perspective, it seems, this is just more a theoretically academic discussion then a real life scenario.
I want many in and outputs? I would use an audiointerface with many in- and outputs.
For me there would be exactly one use case scenario for 2 audio interfaces in one PC or notebook:
you want for whatever reason use jack1 instead of pipewire-jack but you still want to hear for example an audio stream from firefox while working and recording with a jack client.
All other scenarios are more academic then really necessary.
Generally spoken, there is one thumb rule:
Like in real life, there is only one master (clock) - there cant be two.
As said before, the clock source can be internal or external; you can use aes/ebu, spdif, smux, adat or madi for that purpose or as mentioned before you can use a word clock generator, even if your audio interface does not have any wordclock ports:
you can pipe the wordclock signal into spdif cable for example.
cheerz

That is your elitistic point of view. From your point, my music production isn't real life case, because I use 2 interfaces, have done it before and will use also after this. Haven't noticed any problems on that, but sure, that does not mean there isn't. I got M-Audio Fast Track Ultra for getting rid of using more than one interface, but unfortunately spdif input does not work (maybe config issue, but so old interface that could not find more info)

Yeah, I would be willing to use one interface, but getting one that would have spdif input would cost more than 250€ (Behringer UMC1820 or Focusrire Scarlet 8i6).

Sure there is elitists on every side of life, but for me sufficient solution is enough.

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: 2 interfaces, 2 jackd, couple them

Post by merlyn »

@artix_linux_user It might be an idea not to hit the weed so hard before posting. We might get more sense out of you that way.

If you had read the thread you would know that one use case is for a synth with a USB output. More and more devices have a USB out, like drum machines, synths and groove boxes. Without some way of having multiple ins, these USB connections can't be used with a DAW. On Macs, this has been addressed with the 'aggregate device', which apparently works OK. Windows body swerves this, as Windows users can do no more than double click the ASIO installer and expect it to work.

With all these devices with USB, multiple devices is a real world thing.

merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: 2 interfaces, 2 jackd, couple them

Post by merlyn »

artix_linux_user wrote: Sat May 13, 2023 12:12 pm

Yeah, lets talk about crazy sound machines that do not have sound outputs but only usb ports so you rely on drivers - what a nice idea to earn a lot of money.

Let's deal with the technical aspects. These devices I'm talking about have USB ports in addition to analogue audio out.

So you can not run these synths without a computer.

Again, reading the thread would have helped. I don't know of a synth that has only USB out.

merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: 2 interfaces, 2 jackd, couple them

Post by merlyn »

Well, thanks for that steaming pile of horse manure.

To get back somewhere near the track -- @tavasti did audioadapter work when using jack_control ?

User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: 2 interfaces, 2 jackd, couple them

Post by khz »

I ask for a respectful, appreciative tone. See: viewtopic.php?t=270, https://www.gnu.org/philosophy/kind-communication.html. Thank you.

Among many other devices, https://mod.audio/dwarf/as well as SSL Big SiX have optional USB I/O. If you absolutely want to archive or even publish your "$art".

. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
tavasti
Established Member
Posts: 2059
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 375 times
Been thanked: 209 times
Contact:

Re: 2 interfaces, 2 jackd, couple them

Post by tavasti »

merlyn wrote: Sat May 13, 2023 12:58 pm

To get back somewhere near the track -- @tavasti did audioadapter work when using jack_control ?

I can't see any relevant parameters that would be likely to make it working (see my posts may 11, only getting noise), so cannot see why it would make any difference to jack_load. And zalsa_in/zalsa_out were recommended by falktx who maintains jack code. In my previous OS (Ubuntu 18.04) audioadapter worked, but that time I had different audio interface. And sure, difference can be also jack version.

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: 2 interfaces, 2 jackd, couple them

Post by merlyn »

After four years I have some idea what is going on here:

bluebell wrote: Thu Nov 28, 2019 6:13 am

The ringbuffer increased after some minutes of operation to ridiculous large values.

The ringbuffer, which I think is the resampling buffer, has a default value of 32768. From my audioadapter parameters that worked I set the ringbuffer to a fixed size of 512 samples

Code: Select all

ring-buffer: Fixed ringbuffer size (uint:set:32768:512)

If left on the default, the ringbuffer doesn't start at 32768 -- that is the maximum. I think it starts at whatever the JACK buffer is set to but the buffer doubles in size every time there is an xrun, some of which can't be heard. This is why to get sensible operation a fixed ringbuffer must be used.

Also audioadapter will use the default sampling rate unless you tell it otherwise. Is that the problem, tavasti?

tavasti
Established Member
Posts: 2059
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 375 times
Been thanked: 209 times
Contact:

Re: 2 interfaces, 2 jackd, couple them

Post by tavasti »

merlyn wrote: Sat May 13, 2023 2:01 pm

Also audioadapter will use the default sampling rate unless you tell it otherwise. Is that the problem, tavasti?

No, I don't think so:

Oh it does not work that great. When started recording, I am getting just noise, and there is error in logs:

../linux/alsa/JackAlsaAdapter.h:327, unable to set format to either 32-bits or 16-bits : Invalid argument(-22)

And if jack maintainer suggests using other module, and that works, I don't see point in hitting head to wall.

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: 2 interfaces, 2 jackd, couple them

Post by merlyn »

I have found that ALSA and JACK error messages often don't tell you what the problem actually is -- they tell you a symptom of the problem.

One way of interpreting what you've posted is that falktx broke audioadapter. That's great brother. :D

tavasti
Established Member
Posts: 2059
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 375 times
Been thanked: 209 times
Contact:

Re: 2 interfaces, 2 jackd, couple them

Post by tavasti »

artix_linux_user wrote: Sat May 13, 2023 6:47 pm

yeah, using several soundcards at the same time on linux is so hard ooohh...its so easy that my grandma can do it, just DO!
you want jack, install pipewire-jack.
anythingelse here is just flameshit and stupid blaaah
not reading your shit

When I was installing new Os last summer, tried pipewire. I have used linux for 29 years, coded kernel modules, etc. Tried pipewire for 2 hours, did not get audio out at all, even with basic stuff. Took old way.

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: 2 interfaces, 2 jackd, couple them

Post by asbak »

I go back to the real world for a couple of weeks, log in here and I'm in the twilight zone.
Where did all the normal people go?

Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
tavasti
Established Member
Posts: 2059
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 375 times
Been thanked: 209 times
Contact:

Re: 2 interfaces, 2 jackd, couple them

Post by tavasti »

asbak wrote: Sat May 13, 2023 8:26 pm

I go back to the real world for a couple of weeks, log in here and I'm in the twilight zone.
Where did all the normal people go?

They are watching Eurovision finals.

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

asbak
Established Member
Posts: 897
Joined: Thu Sep 11, 2014 3:04 pm
Has thanked: 71 times
Been thanked: 64 times

Re: 2 interfaces, 2 jackd, couple them

Post by asbak »

Depending on OS, OS version, version of PW etc it can be tricky and I'm not aware of any good documentation on how to get it to work well.
Nevertheless, after weeks of messing around I got it to the point where it's very usable now.

It's just a pity I had to waste so much time to get to that point.

Once you have the secret sauce to making it work it's literally just installing a few packages, making a couple of file config changes and job done.

Switching to native jack with a script is pretty easy as well, that's what I do now to flip back and forth.

tavasti wrote: Sat May 13, 2023 8:10 pm

When I was installing new Os last summer, tried pipewire. I have used linux for 29 years, coded kernel modules, etc. Tried pipewire for 2 hours, did not get audio out at all, even with basic stuff. Took old way.

Some Focal / 20.04 audio packages and resources https://midistudio.groups.io/g/linuxaudio
Locked