Page 2 of 2

Re: make stereo from 2 cheap USB sound cards each with mono in

Posted: Thu Mar 14, 2019 10:10 am
by markh1289
Thanks very much CrocoDuck - I'll try that some time.

Re: make stereo from 2 cheap USB sound cards each with mono in

Posted: Thu Mar 14, 2019 3:04 pm
by jptrol
merlyn wrote:I had a look at

Code: Select all

man alsa_in
There are a lot of options, and -r is unnecessary. 'selected sample format 32 bit' seems a bit weird as the hardware won't be able to sample at 32 bits. That could be the internal resolution of course.
I added -r just to be sure both cards have the same resolution. Selected sample format 32 bit is strange indeed. The maximum bit depth given in the dox of the Focusrite Scarlet 2i4 is 24 bits . Besides the alsa_in client does not give an option to select other than 32 bits.

But when I reverse both cards I get 'Selected sample format 24 bits' for the EDIROL UA25 (this is defined by a switch on the card itself) and the Scarlet works fine but it is then the UA25 that produces that 150 Hz distortion. It is always the alsa-in defined card that produces this distortion.

I've come to think that the solutions given in the Jack site for using multiple devices have become obsolete and no one seems to notice it because it is used by nobody. :|

Re: make stereo from 2 cheap USB sound cards each with mono in

Posted: Thu Mar 14, 2019 6:19 pm
by merlyn
The date on the bottom of the man page is January 2019, so alsa_in is probably still active. It might be possible to get it working using information from -v and -i, or on irc.

Code: Select all

-i
              Instrumentation. This logs the 4 important parameters  of  the
              samplerate  control  algorithm  every  1ms.  You can pipe this
              into a file, and plot it. Should only be necessary, if it does
              not  work  as  expected,  and  we  need  to adjust some of the
              obscure parameters, to make it work.  Find  me  on  irc.freen‐
              ode.org #jack in order to set this up correctly.


Re: make stereo from 2 cheap USB sound cards each with mono in

Posted: Thu Mar 14, 2019 6:25 pm
by jptrol
merlyn wrote:The date on the bottom of the man page is January 2019, so alsa_in is probably still active. It might be possible to get it working using information from -v and -i, or on irc.

Code: Select all

-i
              Instrumentation. This logs the 4 important parameters  of  the
              samplerate  control  algorithm  every  1ms.  You can pipe this
              into a file, and plot it. Should only be necessary, if it does
              not  work  as  expected,  and  we  need  to adjust some of the
              obscure parameters, to make it work.  Find  me  on  irc.freen‐
              ode.org #jack in order to set this up correctly.

Thank you for your help , Merlyn. I had overlooked that. I'll try this.

Re: make stereo from 2 cheap USB sound cards each with mono in

Posted: Thu Mar 14, 2019 7:02 pm
by merlyn
I didn't think I had a USB soundcard to try this. I did. lol. I've got a small midi keyboard, an Alesis Photon X25, which I noticed has audio in. It works, but sadly I wouldn't consider it usable. At a 64 JACK buffer it's a stream of Xruns.

This worked without 150Hz:

Code: Select all

alsa_in -j Photon -d hw:2 -p 512 -n 2
The -p isn't the JACK buffer -- it's the buffer used for re-sampling.

Re: make stereo from 2 cheap USB sound cards each with mono in

Posted: Sun Mar 17, 2019 12:01 pm
by jptrol
Hello,

Well I tried to discuss the topic on irc.freenode.org #jack but it did not seem that many people were interested in the topic :? . Considering that we are exposed to poor quality if we use two USB cards to record I think it is not worthwhile digging it further. I give up.

Re: make stereo from 2 cheap USB sound cards each with mono in

Posted: Sun Mar 17, 2019 4:44 pm
by merlyn
IRC can be slow. If you've posted a question it may get answered eventually. If you want four inputs for recording a band this could work. The latency would be relatively high, but it's possible to have it work without Xruns. Your 150Hz thing is totally weird to me. You've somehow made an oscillator. Maybe you should let synth developers know about this new oscillator technique. :)

I messed about with alsa-in a bit more. How fast is the 'delay = 144' going up your screen? If you're seeing that go up the screen alsa-in isn't working properly. It's meant to stabilise onto a delay. Every time the delay changes on my machine I hear a glitch. JACK doesn't report this as an Xrun.

So in the spirit of minimalism I left off options. This worked:

Code: Select all

★ alsa_in -j photon -d hw:2
selected sample format: 24bit - real
delay = 2968
You can see the delay is fixed. This is quite a bit of latency. For live recording that wouldn't matter, and the worst case is that you'd have to bring the audio from the two cards back into sync.

Catia:
alsa_in.png
alsa_in.png (21.75 KiB) Viewed 1274 times

Re: make stereo from 2 cheap USB sound cards each with mono in

Posted: Mon Mar 18, 2019 2:52 pm
by jptrol
Thank you Merlyn,

I tried with the minimum of options AND IT WORKS !!

Code: Select all

jp@jpt-quad-core:~$ alsa_in -j CartSON2 -d hw:2
selected sample format: 24bit - real
delay = 2541
The delay is larger but it is steady and there is no more 150 Hz. My problem is solved !

EDIT : I measured the real latency : 45 ms between the 2 groups of 2 tracks : very easy to make up for with Ardour !

Thank you again.