Focusrite Scarlett 2i4 - success!

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

Moderators: MattKingUSA, khz

danboid
Established Member
Posts: 1327
Joined: Sun Aug 26, 2012 11:28 am
Location: England
Has thanked: 1 time
Been thanked: 4 times

Focusrite Scarlett 2i4 - success!

Post by danboid »

My Focusrite Scarlett 2i4 arrived today! I was unable to find any reports of anyone having tried it with Linux/JACK, prob because its pretty new so I'm very happy to report that it works and sounds great OOTB with Debian Wheezy - no messing or setup required whatsoever other than the obligatory plugging in and starting JACK of course. I've not tried all of the audio outputs yet nor have I tried the MIDI ports either but I can at least confirm both MIDI ports (IN+OUT) are visible under qjackctl so I don't foresee a prob there.

UPDATE APRIL 20th 2013

At the time of writing, the 2i4 works fine with JACK but doesn't display any controls under ALSA mixers. This can be mostly worked around by using non mixer or jack_mixer if you want to adjust levels in software.

UPDATE 9th March 2013

It took me longer than I expected for me to don my JACK labcoat and do the proper testing required to work out the optimum JACK settings for tracking with the 2i4 to get the JACK latency down to a minimum with no xruns but finally the figures are in!

TEST PROCEDURE

Record approx 1 minute of random sound from both XLR inputs to two separate (qtractor, in this case) tracks simultaneously, play them back then check for xruns. For the settings listed below, I was able to complete the recording test procedure with no xruns and the latency is as reported by Cadence.

TEST PLATFORM

Samsung R700 laptop, 4GB RAM + 64GB SSD running KXStudio 12.04.1 recording with qtractor 0.5.7. No synth or FX plugins nor Flash-using browser tabs open to cause xruns.

SETTINGS AND RESULTS

Frequency Buffer Periods Latency

96000 128 3 1.3ms

48000 64 3 1.3ms
Last edited by danboid on Sat Apr 20, 2013 10:12 am, edited 7 times in total.
tux99
Established Member
Posts: 346
Joined: Fri Sep 28, 2012 10:42 am
Contact:

Re: Focusrite Scarlett 2i4 - success!

Post by tux99 »

Never mind 96KHz, what about 24bit@48KHz (which is far more useful)?
danboid
Established Member
Posts: 1327
Joined: Sun Aug 26, 2012 11:28 am
Location: England
Has thanked: 1 time
Been thanked: 4 times

Re: Focusrite Scarlett 2i4 - success!

Post by danboid »

Hi Tux99!

Sorry - I, or ffmpeg, goofed. I said I had tested recording at 16bit/48Khz simply because I did a

ffmpeg -i filename.wav

which output:

Stream #0.0: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s

Maybe its a bug in ffmpeg but I took that 'pcm_s16le' to mean it was a 16bit file, as you would, but if I open the same file under Audacity it says its 32bit float @ 48K and on top of that when I start JACK I see:

ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback

So I'm confident that it is indeed recording in 32bit.

That begs the question - what is the best command line app to use to identify sound files? Doesn't look like I can trust ffmpeg to give me useful info unless pcm_s16le is actually a 32bit format with a stupid name?
steevc
Established Member
Posts: 251
Joined: Fri May 23, 2008 7:05 pm
Location: Bedfordshire, UK
Contact:

Re: Focusrite Scarlett 2i4 - success!

Post by steevc »

But doesn't the 2i4 only do 24 bit?

This may be a dumb question, but can recording bit depth be controlled by software? Don't some USB 1.1 devices have a switch to go between 16 and 24 bit depending on how many channels you want to use?

I'm guessing that whatever you recorded with created a 32 bit file, but I don't know how you actually test what signal is coming in. I think Ardour works with 32 bit floating point files, regardless of the type of input.

Please correct me if I'm wrong.

Steve
Sounds - http://soundcloud.com/steevc
Debut Album - https://steevcmusic.bandcamp.com/
Blog - https://peakd.com/@steevc/posts
Recording via M-Audio FastTrack Pro and Zoom H4. Got Korg nanoKONTROL and Zoom G3X plus Roland TD-07 drums

danboid
Established Member
Posts: 1327
Joined: Sun Aug 26, 2012 11:28 am
Location: England
Has thanked: 1 time
Been thanked: 4 times

Re: Focusrite Scarlett 2i4 - success!

Post by danboid »

Hi Steevc!

As I understand it, JACK tries to start in 32 or 24bit if the hardware can handle it unless you specify 'Force 16bit mode'. I've not read the Scarlett docs yet but there is no 16/24/32bit hardware switch on the device.

I think the best (only?) way to know beforehand what bit depth is being used is to look at the JACK startup messages as I copy/pasted in my last post.
steevc
Established Member
Posts: 251
Joined: Fri May 23, 2008 7:05 pm
Location: Bedfordshire, UK
Contact:

Re: Focusrite Scarlett 2i4 - success!

Post by steevc »

danboid wrote:Hi Steevc!

As I understand it, JACK tries to start in 32 or 24bit if the hardware can handle it unless you specify 'Force 16bit mode'. I've not read the Scarlett docs yet but there is no 16/24/32bit hardware switch on the device.

I think the best (only?) way to know beforehand what bit depth is being used is to look at the JACK startup messages as I copy/pasted in my last post.
But that is not telling the whole story as the 2i4 can only sample at up to 24 bit.

As for getting info on the audio file I just installed mediainfo and that gives lots of details.

Steve
Sounds - http://soundcloud.com/steevc
Debut Album - https://steevcmusic.bandcamp.com/
Blog - https://peakd.com/@steevc/posts
Recording via M-Audio FastTrack Pro and Zoom H4. Got Korg nanoKONTROL and Zoom G3X plus Roland TD-07 drums

Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: Focusrite Scarlett 2i4 - success!

Post by Pablo »

As for getting info on the audio file I just installed mediainfo and that gives lots of details.
Also, sndfile-info (from either sndfile-programs or sndfile-tools packages, I am not sure which)
danboid
Established Member
Posts: 1327
Joined: Sun Aug 26, 2012 11:28 am
Location: England
Has thanked: 1 time
Been thanked: 4 times

Re: Focusrite Scarlett 2i4 - success!

Post by danboid »

Thanks for the recommendations Steev and Pablo - I'll give them a go soon.
tux99
Established Member
Posts: 346
Joined: Fri Sep 28, 2012 10:42 am
Contact:

Re: Focusrite Scarlett 2i4 - success!

Post by tux99 »

I think the following tool on the following page could help to determine supported hardware capabilities correctly:
http://www.volkerschatz.com/noise/alsacap.c (build it with: gcc -o alsacap alsacap.c -lasound)
http://www.volkerschatz.com/noise/alsa.html#alsacap

Run it as:
./alsacap -R -d hw:1,0 (adapte the hw device number to your situation)

For the M-Audio 2496 I get:
./alsacap -R -d hw:1,0
*** Exploring configuration space of device `hw:1,0' for recording ***
12 channels
Sampling rate 8000..96000 Hz
Sample formats: S32_LE
Significant bits: 24

I guess the last line is the important info.
danboid
Established Member
Posts: 1327
Joined: Sun Aug 26, 2012 11:28 am
Location: England
Has thanked: 1 time
Been thanked: 4 times

Re: Focusrite Scarlett 2i4 - success!

Post by danboid »

./alsacap -R -d hw:1
*** Exploring configuration space of device `hw:1' for recording ***
2 channels
Sampling rate 44100..96000 Hz
Sample formats: S32_LE
Significant bits: 32
tux99
Established Member
Posts: 346
Joined: Fri Sep 28, 2012 10:42 am
Contact:

Re: Focusrite Scarlett 2i4 - success!

Post by tux99 »

danboid wrote:./alsacap -R -d hw:1
*** Exploring configuration space of device `hw:1' for recording ***
2 channels
Sampling rate 44100..96000 Hz
Sample formats: S32_LE
Significant bits: 32
Hmm, I wonder if that's an alsa driver issue, given that the hardware can only do 24 bit?
danboid
Established Member
Posts: 1327
Joined: Sun Aug 26, 2012 11:28 am
Location: England
Has thanked: 1 time
Been thanked: 4 times

Re: Focusrite Scarlett 2i4 - success!

Post by danboid »

You're right - it is only advertised as being 24bit capable so I've just raised this issue on the alsa-devel list.

It seems to work fine regardless but if its only actually using 24 of 32bits per sample then that builds up to a lot of wasted disk space in decent size multitrack projects I suppose.
danboid
Established Member
Posts: 1327
Joined: Sun Aug 26, 2012 11:28 am
Location: England
Has thanked: 1 time
Been thanked: 4 times

Re: Focusrite Scarlett 2i4 - success!

Post by danboid »

Got a reply off alsa-devel already.

Daniel Mack says to Dan Mac.:

"The output lets you know about the format the hardware uses on the wire.
Nothing to be concerned about - if you want to record 24 bits only, you
can use the plughw plugin to do the sample format conversion."

:)
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: Focusrite Scarlett 2i4 - success!

Post by raboof »

danboid
Established Member
Posts: 1327
Joined: Sun Aug 26, 2012 11:28 am
Location: England
Has thanked: 1 time
Been thanked: 4 times

Re: Focusrite Scarlett 2i4 - success!

Post by danboid »

Thanks raboof!
Post Reply