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

Optimize your system for ultimate performance.

Moderators: khz, MattKingUSA

markh1289
Established Member
Posts: 4
Joined: Fri Feb 22, 2019 11:59 am

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

Postby markh1289 » Thu Mar 14, 2019 10:10 am

Thanks very much CrocoDuck - I'll try that some time.

jptrol
Established Member
Posts: 8
Joined: Sun Mar 10, 2019 9:57 am

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

Postby jptrol » Thu Mar 14, 2019 3:04 pm

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

merlyn
Established Member
Posts: 292
Joined: Thu Oct 11, 2018 4:13 pm

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

Postby merlyn » Thu Mar 14, 2019 6:19 pm

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.


jptrol
Established Member
Posts: 8
Joined: Sun Mar 10, 2019 9:57 am

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

Postby jptrol » Thu Mar 14, 2019 6:25 pm

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.

merlyn
Established Member
Posts: 292
Joined: Thu Oct 11, 2018 4:13 pm

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

Postby merlyn » Thu Mar 14, 2019 7:02 pm

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.

jptrol
Established Member
Posts: 8
Joined: Sun Mar 10, 2019 9:57 am

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

Postby jptrol » Sun Mar 17, 2019 12:01 pm

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.

merlyn
Established Member
Posts: 292
Joined: Thu Oct 11, 2018 4:13 pm

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

Postby merlyn » Sun Mar 17, 2019 4:44 pm

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
You do not have the required permissions to view the files attached to this post.

jptrol
Established Member
Posts: 8
Joined: Sun Mar 10, 2019 9:57 am

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

Postby jptrol » Mon Mar 18, 2019 2:52 pm

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.


Return to “System Tuning and Configuration”

Who is online

Users browsing this forum: Google [Bot] and 3 guests