Focusrite Scarlett Gen 2/3 Control Panel GUI

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

Moderators: MattKingUSA, khz

patrick
Established Member
Posts: 4
Joined: Thu Nov 30, 2023 5:49 pm
Been thanked: 1 time

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by patrick »

geoffrey wrote: Fri Dec 01, 2023 3:15 pm

I.e. the hardware uses whatever sample rate is selected over USB, even after you unplug it, and even after you power cycle it.

Yes, that's it. It looks like I can safely expect the settings not to change in standalone mode, including the sample rate, as long as I don't attach the 18i20 to a USB port.

geoffrey wrote: Fri Dec 01, 2023 3:15 pm

What you observe with the sample rate resetting to 44.1KHz when you plug the USB cable back in is because that's what is selected over USB, probably by PulseAudio.

Thank you for the hint. That's exactly what happened. To play with the GUI, I used a laptop that runs the pulseaudio server from the distribution, with a default rate of 44100. Changing PulseAudio sample rate to 48000 (/etc/pulse/daemon.conf) had the expected result that the 18i20 sample rate now remains at 48k.
I didn't realize PulseAudio would claim my interface as soon as the driver makes it available, but actually it totally makes sense.

geoffrey wrote: Fri Dec 01, 2023 3:15 pm

Before PulseAudio (or whatever sound server you're using) gets to open the device though, the ALSA kernel driver goes through and selects every different sample rate (2 or 3 times), presumably to check that the device actually accepts each of the sample rates (and other parameters) that it says it supports.

That's probably why I can see the ADAT output sample rate flickering a couple of time before settling to 44100 or 48000.

Thanks a lot for your explanations.

Patrick

tseaver
Established Member
Posts: 404
Joined: Mon Mar 13, 2017 6:07 am
Has thanked: 11 times
Been thanked: 100 times

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by tseaver »

@patrick

Now what happens when the interface is in standalone mode ? The 18i20 is a great audio router / mixer and I have some use cases where it will not be attached to a computer. I this case, the hardware is responsible for setting the sample rate, isn't it ?

For straight-up audio mixing, the sample rate is irrelevant: it would matter only when converting the mixed audio (analog ) to digital signals, i.e. to send to a computer or out over the ADAT / S/PDIF ports. At that point, you would need to configure one of the devices as the "word clock" master (see https://en.wikipedia.org/wiki/Word_clock), and have the other peer(s) respect its rate. More complex setups (> 2 devices) may use an external "word clock". See, for instance, this Reverb listing: https://reverb.com/item/65947146-aardvark-aardsync-ii

Ubuntu, Mixbus32C; acoustic blues / country / jazz
geoffrey
Established Member
Posts: 259
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 34 times
Been thanked: 173 times

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by geoffrey »

tseaver wrote: Sun Dec 03, 2023 4:49 am

@patrick

Now what happens when the interface is in standalone mode ? The 18i20 is a great audio router / mixer and I have some use cases where it will not be attached to a computer. I this case, the hardware is responsible for setting the sample rate, isn't it ?

For straight-up audio mixing, the sample rate is irrelevant: it would matter only when converting the mixed audio (analog ) to digital signals, i.e. to send to a computer or out over the ADAT / S/PDIF ports. At that point, you would need to configure one of the devices as the "word clock" master (see https://en.wikipedia.org/wiki/Word_clock), and have the other peer(s) respect its rate. More complex setups (> 2 devices) may use an external "word clock". See, for instance, this Reverb listing: https://reverb.com/item/65947146-aardvark-aardsync-ii

The other time it matters is if the interface was left at 176.4kHz or 192kHz (as the ALSA driver will often do if you don't have a sound server running), because the mixer is disabled at those sample rates.
https://support.focusrite.com/hc/en-gb/ ... mple-rate-

patrick
Established Member
Posts: 4
Joined: Thu Nov 30, 2023 5:49 pm
Been thanked: 1 time

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by patrick »

tseaver wrote: Sun Dec 03, 2023 4:49 am

@patrick
For straight-up audio mixing, the sample rate is irrelevant: it would matter only when converting the mixed audio (analog ) to digital signals, i.e. to send to a computer or out over the ADAT / S/PDIF ports.

That's more or less what I was understanding, although I wonder if the sample rate really has no influence on the mixer. All the mixing probably takes place in digital stages / DSP chips, therefore after the initial A/D conversion. If A/D conversion is performed at the set sample rate, then I assume it might have an effect to the mixing, even if one uses only analog inputs and outputs. But if A/D conversion is performed at a fixed rate, and signals are only up/down sampled to the set sample rate at the digital outputs of the interface, then I agree that it is totally irrelevant.
Thanks for clarification, anyway.

Sending analog to ADAT is exactly what I am doing in one of the uses I have for the 18i20 : increase the number of inputs of my RME multiface through its ADAT input.

bueycansao
Established Member
Posts: 4
Joined: Tue Sep 26, 2023 12:28 pm
Has thanked: 3 times

Routing with Focusrite Scarlett Gen 3 18i8

Post by bueycansao »

Dear LinuxMusicians,

After a few months of using a Scartlett 2i2 with UbuntuStudio 22.04, I purchased a Scarlett 18i8 (Gen 3) because of the possibilities I have with my group.
The control panel works fine (I'm really impressed of the achieved work!!); the issue I have is that I'm not yet experienced with routing.

I want to connect two synthesizers and one drum-machine, all in stereo, to the 18i8, and hear them all 3 to 1 output (for instance the headphones jack).

At https://github.com/geoffreybennett/alsa ... r/USAGE.md I found this hint: "Note that a sink can only be connected to one source, but one source can be connected to many sinks. If you want a sink to receive input from more than one source, use the mixer inputs and outputs".

So if I want to connect the drum-machine to analog input 1&2, and the two synths to analog input 5-8, how do I use the mixer inputs and outputs to send the signals to the first headphones output (which are analog output 5&6)? Is there a must-read-document, or does anyone have a screenshot of the right configuration?

Thanks,

Cansao

geoffrey
Established Member
Posts: 259
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 34 times
Been thanked: 173 times

Re: Routing with Focusrite Scarlett Gen 3 18i8

Post by geoffrey »

Hi Cansao!

bueycansao wrote: Sat Feb 10, 2024 7:23 am

After a few months of using a Scartlett 2i2 with UbuntuStudio 22.04, I purchased a Scarlett 18i8 (Gen 3) because of the possibilities I have with my group.
The control panel works fine (I'm really impressed of the achieved work!!);

That's great, thank you!

bueycansao wrote: Sat Feb 10, 2024 7:23 am

the issue I have is that I'm not yet experienced with routing. I want to connect two synthesizers and one drum-machine, all in stereo, to the 18i8, and hear them all 3 to 1 output (for instance the headphones jack).

At https://github.com/geoffreybennett/alsa ... r/USAGE.md I found this hint: "Note that a sink can only be connected to one source, but one source can be connected to many sinks. If you want a sink to receive input from more than one source, use the mixer inputs and outputs".

So if I want to connect the drum-machine to analog input 1&2, and the two synths to analog input 5-8, how do I use the mixer inputs and outputs to send the signals to the first headphones output (which are analog output 5&6)? Is there a must-read-document, or does anyone have a screenshot of the right configuration?

Keep reading down that document, to the "Mixer" section:

If you use the Routing window to connect Sources to Mixer Inputs and Mixer Outputs to Sinks, then you can use the Mixer window to set the amount of each Mixer Input that is sent to each Mixer Output using a matrix of controls:

The particular routing configuration that will do exactly what you requested above (and no more) is:

Screenshot from 2024-02-10 20-43-27.png
Screenshot from 2024-02-10 20-43-27.png (120.22 KiB) Viewed 2386 times

And then the mixer controls should be set like this:

Screenshot from 2024-02-10 20-44-25.png
Screenshot from 2024-02-10 20-44-25.png (19.52 KiB) Viewed 2386 times

Note:

  • Mix A (routed to Headphones 1 Left) gets the audio from Analogue 1, 5, & 7 (the left channels of your drum machine & synths)

  • Mix B (routed to Headphones 1 Right) gets the audio from Analogue 2, 6, & 8 (the right channels of your drum machine & synths)

  • That routing configuration has nothing connected to the PCM Inputs or Outputs, so there will be no USB playback or recording. I'm just showing the minimal configuration there for ease of understanding.

If you want to record your drum machine/synths on your PC, then you would also:

1) Connect Hardware Inputs Analogue 1-8 to PCM Inputs 1-8 respectively. This would let you do a multi-track recording with e.g. Ardour.

or

2) Connect the Mixer Outputs A & B to PCM Inputs 1-2 if you wanted to just do a stereo recording.

If you also want to play back from your PC & hear it in the headphones along with your synths/drum machines, then you would also connect the PCM Outputs 1-2 to the Mixer Inputs 7-8, and turn up the mixer knobs to put them into Mix A & B.

Finally, apologies for the "jungle of controls". It would be nice if you could tell alsa-scarlett-gui that certain pairs of ports are stereo channels, not independent mono channels, and route and mix them as such. That could reduce the number of mixer knobs by 75% in most cases and make it much easier to use.

Good luck, and let me know if you have any other questions!

Regards,
Geoffrey.

bueycansao
Established Member
Posts: 4
Joined: Tue Sep 26, 2023 12:28 pm
Has thanked: 3 times

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by bueycansao »

Hello Geoffrey!

Thank you for your elaborate answer, just what I needed :) Indeed, now we can start recording our music!

I'm not a software engineer, but if there's anything I can do in the future to help, let me know. I switched to Linux about three years ago and I'm very glad about that choice.

One last thing, maybe useful or relevant information: when I disconnected the Scarlett 2i2 and connected the Scarlett 18i8 for the first time, the same control panel didn't detect the latter, so I couldn't get it out of MSD mode. It took me quite some effort before the panel suddenly did detect the 18i8. I can't recall in which order I tried different things, but it included de-installing and reinstalling the panel, take it out of MSD mode on another Linux machine, and installing snd-usb-audio-kmod-6.5.11c1. The kernel I use is version 6.5, low-latency. I hope this is useful feedback for you.

Thanks again!

Cansao

goldmign
Posts: 1
Joined: Mon Mar 04, 2024 10:36 pm
Has thanked: 1 time

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by goldmign »

Hi Geoffrey, first of all a huge thank you for your hard work - the community is better off for people like you.
I see you mentioned first gen support earlier on in the thread, albeit about a different device. I have owned a Scarlett 8i6 1st Gen for years now and I'd love to see support for that (and the other first gen devices too) if it's at all possible. I've attached a scarlett-gen1-8i6.state(.txt) generated with alsactl -f if that would be of any help.

scarlett-gen1-8i6.state.txt
(45.34 KiB) Downloaded 16 times

Thanks! :D

hohtogrammi
Established Member
Posts: 4
Joined: Sat Mar 30, 2024 8:12 am
Been thanked: 1 time

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by hohtogrammi »

Greetings Geoffrey,

Thank you for your hard work in delivering a good solution for maintaining a Focusrite-setup in Linux-environments. The software is all in all top notch in terms of features available and makes routing all the studio equipment a breeze.

Then on to my issue.

I'm using Alsa Scarlett2 Control Panel in EndeavourOS (KDE Plasma 6.0.2, Kernel Version 6.8.1-arch1-1 64-bit). My hardware consists of:

My issue is saving and loading the configurations made in Alsa Scarlett2 Control Panel. When I try to save, I'm met with an error:

AlsaScarlett2ControlPanel-SaveError.png
AlsaScarlett2ControlPanel-SaveError.png (20.02 KiB) Viewed 774 times

First I thought as long as the routings remain I don't need the save feature, but then I encountered a random freeze of the software while doing routings. Upon reboot the software had basically reverted to the default routing.

What can I do to enable saving and loading in Alsa Scarlett2 Control Panel?

Thanks in advance!

-Hannu / Hohtogrammi

novalix
Established Member
Posts: 107
Joined: Wed Aug 11, 2021 1:12 pm
Has thanked: 6 times
Been thanked: 39 times

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by novalix »

Hi,

reading the error message the first thing that comes to mind is to check if the file really does not exist. Since you are using a "terminal centric distro" that would be:

Code: Select all

ls -l /usr/sbin/alsactl

If it does not exist, you would want to find out how to install it. On a debian based system this would be accomplished by installing the package "alsa-utils" which contains this executable.
I don't know if there is a package with the same name on arch based distros, or if it is named differently.

geoffrey
Established Member
Posts: 259
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 34 times
Been thanked: 173 times

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by geoffrey »

goldmign wrote: Mon Mar 04, 2024 10:57 pm

Hi Geoffrey, first of all a huge thank you for your hard work - the community is better off for people like you.
I see you mentioned first gen support earlier on in the thread, albeit about a different device. I have owned a Scarlett 8i6 1st Gen for years now and I'd love to see support for that (and the other first gen devices too) if it's at all possible. I've attached a scarlett-gen1-8i6.state(.txt) generated with alsactl -f if that would be of any help.
scarlett-gen1-8i6.state.txt

Thanks! :D

Hi @goldmign,

Please see https://github.com/geoffreybennett/alsa ... 2027505705 — first rough draft of Gen 1 support is on the dev branch now.

Regards,
Geoffrey.

geoffrey
Established Member
Posts: 259
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 34 times
Been thanked: 173 times

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by geoffrey »

hohtogrammi wrote: Sat Mar 30, 2024 8:29 am

Greetings Geoffrey,

Thank you for your hard work in delivering a good solution for maintaining a Focusrite-setup in Linux-environments. The software is all in all top notch in terms of features available and makes routing all the studio equipment a breeze.

Then on to my issue.

I'm using Alsa Scarlett2 Control Panel in EndeavourOS (KDE Plasma 6.0.2, Kernel Version 6.8.1-arch1-1 64-bit). My hardware consists of:

My issue is saving and loading the configurations made in Alsa Scarlett2 Control Panel. When I try to save, I'm met with an error:

AlsaScarlett2ControlPanel-SaveError.png

First I thought as long as the routings remain I don't need the save feature, but then I encountered a random freeze of the software while doing routings. Upon reboot the software had basically reverted to the default routing.

What can I do to enable saving and loading in Alsa Scarlett2 Control Panel?

Thanks in advance!

-Hannu / Hohtogrammi

Hi Hannu,

Thank you for your feedback!

I installed EndeavourOS to see what was going on with being unable to load/save, and I see that alsactl is in /usr/bin. I've added a fix to the master branch. Please follow the "Building and Running" instructions at https://github.com/geoffreybennett/alsa ... INSTALL.md to try it out & let me know.

Regarding the random freeze, can you check the kernel messages with dmesg if this happens again. If you can reproduce the issue, please send me the messages and also see if the driver at https://github.com/geoffreybennett/scar ... 2/releases fixes that problem.

The routings do remain across reboots/power cycles — they are saved in the interface automatically and then loaded from the interface by the driver when it starts, BUT probably alsactl store/restore is also being run automatically by your distro and immediately overwriting your interface-saved routing with what is in /var/lib/alsa/asound.state as soon as your interface is detected. So I would suggest disabling the alsa-restore service or you could run "sudo alsactl store" to save the state you want.

Regards,
Geoffrey.

hohtogrammi
Established Member
Posts: 4
Joined: Sat Mar 30, 2024 8:12 am
Been thanked: 1 time

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by hohtogrammi »

Hi Geoffrey,

Really appreciate you taking the time to check things. So I did everything from scratch (github) but upon

Code: Select all

sudo make install

it exits with:

Code: Select all

/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib/libgtk-4.so: undefined reference to `g_once_init_enter_pointer'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib/libgtk-4.so: undefined reference to `g_once_init_leave_pointer'
collect2: error: ld returned 1 exit status
make: *** [Makefile:69: alsa-scarlett-gui] Error 1

Additionally tried the flatpak-install method and it goes through, but upon running

Code: Select all

./alsa-scarlett-gui

in

Code: Select all

/alsa-scarlett-gui/flatpak-build/files/bin

I'm met with

Code: Select all

./alsa-scarlett-gui: symbol lookup error: /usr/lib/libgtk-4.so.1: undefined symbol: g_once_init_enter_pointer

I uninstalled everything, including gtk4 (pacman), reinstalled gtk4 and alsa-scarlett-gui but the problem persists.

With thanks,
Hannu

Last edited by hohtogrammi on Wed Apr 03, 2024 12:07 pm, edited 1 time in total.
hohtogrammi
Established Member
Posts: 4
Joined: Sat Mar 30, 2024 8:12 am
Been thanked: 1 time

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by hohtogrammi »

Hi again,

I just wanted to also mention that using

Code: Select all

alsactl store USB -f <fn>

to store routings and

Code: Select all

alsactl restore USB -f <fn>

to load routings works as expected.

I can live with this. 8)

geoffrey
Established Member
Posts: 259
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 34 times
Been thanked: 173 times

Re: Focusrite Scarlett Gen 2/3 Control Panel GUI

Post by geoffrey »

hohtogrammi wrote: Wed Apr 03, 2024 11:57 am

Hi Geoffrey,

Really appreciate you taking the time to check things. So I did everything from scratch (github) but upon

Code: Select all

sudo make install

it exits with:

Code: Select all

/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib/libgtk-4.so: undefined reference to `g_once_init_enter_pointer'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib/libgtk-4.so: undefined reference to `g_once_init_leave_pointer'
collect2: error: ld returned 1 exit status
make: *** [Makefile:69: alsa-scarlett-gui] Error 1

I found this: https://github.com/SeaDve/Kooha/issues/283 which suggests that error means you have an older version of glib installed. Try updating that. I suspect that you won't be able to run any Gtk4 apps otherwise.

hohtogrammi wrote: Wed Apr 03, 2024 11:57 am

Additionally tried the flatpak-install method and it goes through, but upon running

Code: Select all

./alsa-scarlett-gui

in

Code: Select all

/alsa-scarlett-gui/flatpak-build/files/bin

I'm met with

Code: Select all

./alsa-scarlett-gui: symbol lookup error: /usr/lib/libgtk-4.so.1: undefined symbol: g_once_init_enter_pointer

Try running it through "flatpak run". I think if you run the binary directly it won't be setting up library paths and such so that's not going to work.

Post Reply