Data Analysis with Lee Hawthorn

Audio on Linux

Topics: Linux

I use Windows and Linux for Audio recording/development. I have to use Linux when I want to use multiple active interfaces as Windows doesn't provide that functionality. Furthermore, I have a USB mic and instrument which means I have 2 interfaces. Windows is very good for audio these days with 1 interface. I can get really low latency.

When I started to use Linux/Ubuntu I found it tricky to get a good base sound.

This post goes into a bit of detail of how to do that. I'm using my sound card as an example. By default, this sound card was muted.

Configure Parameters

Press Control+ALT+T to open a terminal.

Into this terminal enter alsamixer

Alsamixer

You can see my default soundcard is from my GPU. Press F6 and select the sound source you want to change. I needed to select HDA Creative

Alsamixer2

Now this sound was muted, so I had to increase the PCM level. It was 0 for me. I also had to mute <Enable 0> as the sound was very tinny.

We can mute channels by pressing m - they will show MM when muted or 00 when unmuted.

Alsamixer2

I lost these parameters when Ubuntu was rebooted, so I needed to save the parameters and reinvoke them at start up.

Close Alsamixer and in the existing terminal enter :

alsactl --file ~/.config/asound.state store

Enter :

nano ~/config/autostart/alsarestore.desktop

Paste in the code below

[Desktop Entry]
Type=Application
Terminal=false
Name=alsarestore
Exec=alsactl --file ~/.config/asound.state restore

I use Pulse Effects to apply effects to music.

sudo apt update
sudo apt install pulseeffects

PulseEffects

We can create and use presets with Pulse Effects. I installed presets from this GitHub repo

I had to use the manual installation from the Pulse Effect branch.

This gives me good audio to start with. You'll be able to use some of these techniques to get a good sound on Linux.

I wish Windows was able to manage multiple active interfaces (eg USB Mic+Interface). I have had mixed success with ASIO4ALL. MacOS and Linux has it.

There is a new multimedia driver under development for Linux called pipe-wire. This will make using multiple interfaces even easier. Hopefully Ubuntu will have this set up in the next version. I understand Fedora already has pipe-wire set up.

Previous PostPython Text Tips
Next Post

© 2020 Lee Hawthorn

This site is built with GatsbyJS