Focusrite Scarlett 2i4 - success!

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: khz, MattKingUSA

danboid
Established Member
Posts: 1305
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: Focusrite Scarlett 2i4 - success!

Postby danboid » Wed Feb 20, 2013 7:55 am

Great news tbritton - thanks for sharing that!

Cadence's ability to use arbitrary size frames is a win over qjackctl then but I'm not running qjack svn so maybe this has been added since? I'm sure Rui would add it in a blink if it got requested. In fact you can prob do that at the moment by editing the .jackdrc

I sent my SSD off for repair last week but when it comes back I'll be installing KX and trying your settings on my 2i4
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

tbritton
Established Member
Posts: 33
Joined: Sun Jan 29, 2012 4:22 am

Re: Focusrite Scarlett 2i4 - success!

Postby tbritton » Thu Feb 21, 2013 2:21 am

I entered the forumla (frames/sample rate)*period into a spreadsheet and found some interesting numbers for both 2 and 3 periods that make even multiples of 1ms for USB use in Cadence, taking advantage of the ability to enter arbitrary numbers in there.

To avoid a double post, here is the spreadsheet result:

viewtopic.php?f=47&t=10707#p37609

[EDIT - Now also in the WIKI - http://wiki.linuxmusicians.com/doku.php ... _interface ]

Let me know if you have luck with using this, and particularly what didn't work! :-)

Terry
Last edited by tbritton on Wed Feb 27, 2013 2:26 am, edited 2 times in total.

tbritton
Established Member
Posts: 33
Joined: Sun Jan 29, 2012 4:22 am

Re: Focusrite Scarlett 2i4 - success!

Postby tbritton » Thu Feb 21, 2013 2:25 am

AutoStatic wrote:In the case of USB, JACK works best if the software latency is a multiple of 1ms. You can only achieve this if the sample rate is 48kHz, 96kHz or 192kHz


BTW - It seems that 44100 actually does have two frame rates that come out even for USB! (Not sure these would really work in practicality...)

147 frames 44100 3 periods 10ms
441 frames 44100 2 periods 20ms

Terry

alex_turik
Posts: 1
Joined: Sun Feb 24, 2013 2:30 pm

Re: Focusrite Scarlett 2i4 - success!

Postby alex_turik » Sun Feb 24, 2013 3:18 pm

Hello guys!
I wanna buy this card, but I cannot determine whether 2i4 actually supports 4-channel output at 24/96 in alsa?
Slackware Linux 14.0

danboid
Established Member
Posts: 1305
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: Focusrite Scarlett 2i4 - success!

Postby danboid » Fri Mar 08, 2013 8:27 am

Terry:

Thanks for adding the list of settings to the wiki. Most of them seem to work at least a bit on the 2i4 but Catia and Claudia need to accept them now as they both give an error in the current releases. I'll be back with my findings this weekend.

Alex:

Yes, you have 4 outputs under JACK on the 2i4 and 96/24 (or 96/32 as it kinda is) does work with as little as 1ms latency if all you're doing is recording and playing audio at least.
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

danboid
Established Member
Posts: 1305
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: Focusrite Scarlett 2i4 - success!

Postby danboid » Sat Mar 09, 2013 1:46 pm

I have just updated the OP of this thread with the results of my tests trying to find the optimal JACK settings for tracking with the 2i4 under KXStudio. This info could be useful for the wiki too so I'll look to adding it there too.

Using Terry's suggested buffer (frames sounds way too much like snooker - 147?) size of 147 with 3 periods at 44100 I get a latency of 3.3ms
Last edited by danboid on Sat Mar 09, 2013 5:46 pm, edited 1 time in total.
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

danboid
Established Member
Posts: 1305
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: Focusrite Scarlett 2i4 - success!

Postby danboid » Sat Mar 09, 2013 2:18 pm

I have now updated the Scarlett page on the wiki with my test results

http://wiki.linuxmusicians.com/doku.php ... e_scarlett

EDIT

Just updated OP and wiki again. Seems I can't manage any better than a 2ms latency without xruns on my 2i4 currently.
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

danboid
Established Member
Posts: 1305
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: Focusrite Scarlett 2i4 - success!

Postby danboid » Sat Mar 09, 2013 10:12 pm

I noticed I was getting xruns with any JACK settings even with my simple test procedure when recording with MusE svn so I re-did my tests with the latest qtractor release (0.5.7) and got better results - no xruns at nearly 1ms latency recording at both 48 and 96Khz.

Good result for Focusrite (and Rui), not so good news for the MusE team.
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

tbritton
Established Member
Posts: 33
Joined: Sun Jan 29, 2012 4:22 am

Re: Focusrite Scarlett 2i4 - success!

Postby tbritton » Sun Mar 10, 2013 6:39 pm

danboid wrote:I have just updated the OP of this thread with the results of my tests trying to find the optimal JACK settings for tracking with the 2i4 under KXStudio. This info could be useful for the wiki too so I'll look to adding it there too.

Using Terry's suggested buffer (frames sounds way too much like snooker - 147?) size of 147 with 3 periods at 44100 I get a latency of 3.3ms


I added [or buffer] wherever Frames were mentioned for greater clarity on the Wiki entry. Thanks for pointing that out!

List of JACK Frame [or Buffer] & Period settings ideal for USB interface

Terry

danboid
Established Member
Posts: 1305
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: Focusrite Scarlett 2i4 - success!

Postby danboid » Tue Mar 12, 2013 11:21 am

Hi Terry!

Autostatic said that Firewire interfaces seem to work better with whole number latencies too and my Scarlett 2i4 seems to run happily at 1.3ms latency so it doesn't seem that its a hard and fast rule.
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

tbritton
Established Member
Posts: 33
Joined: Sun Jan 29, 2012 4:22 am

Re: Focusrite Scarlett 2i4 - success!

Postby tbritton » Sat Mar 16, 2013 1:11 am

danboid wrote:Hi Terry!

Autostatic said that Firewire interfaces seem to work better with whole number latencies too and my Scarlett 2i4 seems to run happily at 1.3ms latency so it doesn't seem that its a hard and fast rule.


If you are getting that 1.3ms figure from Cadence, FalkTX says that is not necessarily accurate, as it does not/cannot take into account the periods/buffer multiplier of 2x or 3x. But what Autostatic was referring to was the math-derived latency.

Terry

male
Established Member
Posts: 232
Joined: Tue May 22, 2012 5:45 pm

Re: Focusrite Scarlett 2i4 - success!

Postby male » Sat Apr 20, 2013 5:22 am

I just got this device as well. It seems to work fine. However, there are no controls in alsamixer. Also (this is a bit odd, I think) the volume knob only controls channels 1 and 2.

I found that -p 16 -n 3 works the best. Note, however, that according to jack_iodelay, the actual latency is 6.8ms (not 0.3ms as reported).
Image

danboid
Established Member
Posts: 1305
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: Focusrite Scarlett 2i4 - success!

Postby danboid » Sat Apr 20, 2013 9:52 am

Hi male!

Although I can start JACK with -p 16, -p 64 is the lowest I can manage here without getting crazy xruns but I suspect you could well have a superior machine (than my aging core2duo 2Ghz laptop) combined with a more highly tweaked OS, top JACK dev dude that you are! :)

As for jack_iodelay - how am I supposed to get useful info out of that with the 2i4? I get a stable result (27 frames off before latency adjustment) using iodelay on my onboard but I get nonsense when I try using it with my 2i4. This is when running JACK2 under KXStudio. Is there a JACK option I need to change when using iodelay with a USB device?

You're right about the ALSA mixer controls - I think I forgot to mention that here originally although I think I've mentioned it elsewhere on these forums since - I'll update the OP. I must admit I've not been bothered enough to have reported it to ALSA as a bug yet.
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

male
Established Member
Posts: 232
Joined: Tue May 22, 2012 5:45 pm

Re: Focusrite Scarlett 2i4 - success!

Postby male » Sat Apr 20, 2013 5:37 pm

danboid wrote:Hi male!

Although I can start JACK with -p 16, -p 64 is the lowest I can manage here without getting crazy xruns but I suspect you could well have a superior machine (than my aging core2duo 2Ghz laptop) combined with a more highly tweaked OS, top JACK dev dude that you are! :)


Make sure you use the rtirq script or similar to set a high priority of your USB controller. Also make sure that you're using an RT kernel and running JACK with RT priority (I use -P90).

danboid wrote:As for jack_iodelay - how am I supposed to get useful info out of that with the 2i4? I get a stable result (27 frames off before latency adjustment) using iodelay on my onboard but I get nonsense when I try using it with my 2i4. This is when running JACK2 under KXStudio. Is there a JACK option I need to change when using iodelay with a USB device?


What do you mean you get nonsense? Make sure the input is set to 'line' and its gain is on the lowest setting. Loop output one to input one (I used the unbalanced output--in case that matters). Also, make sure the "Direct Monitor" knob is set all the way to 'playback', otherwise the signal is bypassing JACK. That's all there is to it.

danboid wrote:You're right about the ALSA mixer controls - I think I forgot to mention that here originally although I think I've mentioned it elsewhere on these forums since - I'll update the OP. I must admit I've not been bothered enough to have reported it to ALSA as a bug yet.


For me this might be a show stopper. Since the volume knob only controls the front channels, that means that I can only control all the channels together by always placing something between the 'system' jack ports and my software..., and can't control it at all if using bare ALSA. Which is more than a little annoying.
Image

danboid
Established Member
Posts: 1305
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: Focusrite Scarlett 2i4 - success!

Postby danboid » Sat Apr 20, 2013 6:51 pm

iodelay is working now - thanks for your advice male. The latency varies wildly if Direct Monitor isn't fully set to playback so I obviously didn't check that dial on my first attempt.

I had already done all the tweaks you suggested except my JACK priority is at the 85 default - I'll try upping that soon to see if I can get some more out of it.

I'm presuming the ALSA issue will get fixed eventually. A good first step might be for one of us chickens to report it as broke.
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual


Return to “Computer Related Hardware”

Who is online

Users browsing this forum: No registered users and 1 guest