Page 1 of 4

Focusrite Scarlett 2i4 - success!

Posted: Thu Oct 11, 2012 8:51 pm
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

Re: Focusrite Scarlett 2i4 - success!

Posted: Thu Oct 11, 2012 9:46 pm
by tux99
Never mind 96KHz, what about 24bit@48KHz (which is far more useful)?

Re: Focusrite Scarlett 2i4 - success!

Posted: Fri Oct 12, 2012 8:32 am
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?

Re: Focusrite Scarlett 2i4 - success!

Posted: Fri Oct 12, 2012 8:51 am
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.

Re: Focusrite Scarlett 2i4 - success!

Posted: Fri Oct 12, 2012 9:00 am
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.

Re: Focusrite Scarlett 2i4 - success!

Posted: Fri Oct 12, 2012 9:57 am
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.

Re: Focusrite Scarlett 2i4 - success!

Posted: Fri Oct 12, 2012 10:09 am
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)

Re: Focusrite Scarlett 2i4 - success!

Posted: Fri Oct 12, 2012 10:22 am
by danboid
Thanks for the recommendations Steev and Pablo - I'll give them a go soon.

Re: Focusrite Scarlett 2i4 - success!

Posted: Fri Oct 12, 2012 2:13 pm
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.

Re: Focusrite Scarlett 2i4 - success!

Posted: Fri Oct 12, 2012 5:01 pm
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

Re: Focusrite Scarlett 2i4 - success!

Posted: Fri Oct 12, 2012 6:46 pm
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?

Re: Focusrite Scarlett 2i4 - success!

Posted: Sat Oct 13, 2012 7:47 am
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.

Re: Focusrite Scarlett 2i4 - success!

Posted: Sat Oct 13, 2012 8:15 am
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."

:)

Re: Focusrite Scarlett 2i4 - success!

Posted: Sat Oct 13, 2012 1:54 pm
by raboof

Re: Focusrite Scarlett 2i4 - success!

Posted: Sat Oct 13, 2012 2:04 pm
by danboid
Thanks raboof!