Bad recording quality

I’m getting serious about recording vocals and some other things using a mic. I am running arch linux with a real time kernel, an external soundcard (Scarlett 2in2) and a sE X1 mic. The resulting sounds has lots of pollution. Where it comes from I don’t know. I have tried changing the settings for Sample rate and Buffer size and it clearly affects it to the worse. It seems hard to find the correct setting. Since I’m completely new to this I think it is more likely that I have missed something essential. Any directions as where to go now would be appreciated.

I am pretty certain that the issue is renoise related since recording with audacity works like a charm.

Do you use Jack or Alsa? Just to make sure you use the same sound server for Audacity and Renoise. Can you make a test with Ardour or Reaper? Is it crackling or a hiss noise?

I’m using alsa for both audacity and renoise. ardour also works fine. It is a crackling noise. It distorts the sound completely with extreme values for sample rate and buffer size.

Setup Renoise to use a Jack server and see if it still crackles.

Have you set up realtime privileges for the audio goup in /etc/security/limits?

The command “ulimit -r” will show you if your user can access realtime priorities, it should display something between 90 and 99.

Renoise first tries to set Round-robin scheduling with priority 95. Failing that, it tries to set First in-first out scheduling with priority 99.

I had the same experience when trying to record with ALSA. Audacity worked fine, but Renoise introduced a lot of distortion. Renoise running through JACK was okay.

Thanks for your answers. I had a hard time getting Jack to run at all. Now it seems to work and I am not entirely sure why. Certainly using Jack seems to be essential. I think I will just be happy about it and move on!

1 Like

Sure most people just use the ‘jack’ workaround. But some questions…

If we assume that pretty much every other Linux program that uses ALSA API calls directly that record a sample doesn’t produce the infamous ‘crackling’ result on that sample…why does Renoise? Is it a bug?

If @taktik can’t reproduce the ‘crackling’ on his system, how is he to fix it?

If (as Zer0 Fly suggests) you have to modify and raise the priority of the process to get Renoise to record via ALSA without ‘crackling’, do you have to do this with Audacity (or any other Linux record sample program)?

I’ve considered this for 8+ years now…has @taktik?

There are some tweaks you can do on linux to make realtime audio work in more stable ways, also for jack. But also lots of random pits and bugs, or misconfigurations. When trying to diagnose a problem one would have to check on different stages, to find where the problems are. I for example remember crackling issues with graphics card drivers, where using a different driver or newer (or older more stable…) version helped fixing the issues. But to find out what happened and why, I had to go real deep, do perf logs/dumps on kernel level to find the process/kernel task that blocked the audio processing.

Best is to run the realtime config script to see if things can be optimized:

git clone git://github.com/raboof/realtimeconfigquickscan.git
cd realtimeconfigquickscan
perl ./realTimeConfigQuickScan.pl

I don’t see why Alsa is not working, but Jack.

Jack brings a lot of functionalities about routing and i/o stability… I’d say it’s a must have :slight_smile:

I experienced a lot of issues with UI and compositing… Try to take it down.

A good test is also to check different USB ports and if possible avoid any hubs. Some Audio interfaces also work better with buffer sizes = sampling rate / 1000 * n (i.e. 48, 96, 144, … 528 etc. @ 48 000 Hz)

this is the case for UMC1820, it’s very sensitive to buffer size. I think alsa can do mostly garbage about that, whereas jack has good policies.

Having a USB hub doesn’t seem to matter. But with Jack I am not getting stereo - any ideas as to why?

Ok so I am confused now. Jack solved recording so the srcatchy noises are gone. BUT sound coming out of renoise (not samples but other things) have quality problem instead. It was working nicely with Alsa.

Does it change when increasing the buffer size? Can you post your Jack settings?

I experimented a lot and it doesn’t seem to affect the problem at all. I started with 48000/1024/2. I guess those are the relevant settings here?

Yes, the numbers look good.