Sample Rate Conversion within same track

Discuss music production with Ableton Live.
Post Reply
sikdrumz
Posts: 8
Joined: Mon Feb 05, 2018 12:21 pm

Sample Rate Conversion within same track

Post by sikdrumz » Mon Jul 31, 2023 11:47 am

Hi all,

I am trying to resolve some questions and haven't found the answer in a lot of searching...

Let's say I want to record hi-hats into a 44.1khz project from an external source, and I am distorting the hats externally too (with e.g a preamp or pedal).

I know that the distortion will cause there to be analog content above ~22Khz, and that this will show up as foldback distortion if I sample at 44.1k. I need a higher sample rate to avoid that.

Q: Can I record ONLY this one hats channel at say 96k, while playing the rest of the track at 44.1k? Or do I need to shift the whole project to 96k? If I have to shift the whole project, will that cause issues with the content already recorded at 44.1k?

Second part...

Lets say via whatever means I now have hats recorded audio at 96k as a WAV in the 44.1k project. If I 'Freeze' that hats channel, I will get a new recording at 44.1k that I can copy to another audio channel.

Q: During the freeze, does Ableton filter out the 96k info that is above 44.1k (nyquist) BEFORE sampling the new 44.1k audio? Or does it just sample at 44.1k off the 96k recording (in which case I assume it will pick up the higher freq content as foldback again)?

Thank you!!
Last edited by sikdrumz on Mon Jul 31, 2023 11:01 pm, edited 1 time in total.

Angstrom
Posts: 14928
Joined: Mon Oct 04, 2004 2:22 pm
Contact:

Re: Sample Rate Conversion within same track

Post by Angstrom » Mon Jul 31, 2023 4:07 pm

You might be misunderstanding what you are calling "foldback distortion" that's more usually called aliasing. The aliasing from overdrive/saturation/distortion effects are usually from overdrive within software, because as the distortion effect produces high frequency harmonic content it hits the sample frequency and starts to reflect back down. That's due to the processing of the signal actually being done at the sample rate. To combat this most software overdrive/saturation/distortion effects (or anything that might produce these harmonics) are often calculated at multiples of the sample frequency. This is called oversampling.

So. Distortion effects in the box are super prone to digital aliasing and most software effects have strategies to minimise it.

As for recording analogue distorted sounds, capturing actually distorted audio. That will have aliasing baked in of course, but nice analogue aliasing of a much more minimal and musical nature. And the sampling process won't add any aliasing to that. It will just capture what it hears and brickwall everything above Nyquist. Usually I still record at 48khz but 88 is a good solution if you have a modern computer and audio interface. Any frequency above the Nyquist of that is for the dogs anyway

sikdrumz
Posts: 8
Joined: Mon Feb 05, 2018 12:21 pm

Re: Sample Rate Conversion within same track

Post by sikdrumz » Mon Jul 31, 2023 10:39 pm

As I understand it, the aliasing occurs whenever audio is sampled at less than double its frequency.

I’m asking about how to get audio into Ableton using a 96k sample rate, and how Ableton then deals with the downsampling to a lower rate.

Let’s assume no plugins are present at all.

sikdrumz
Posts: 8
Joined: Mon Feb 05, 2018 12:21 pm

Re: Sample Rate Conversion within same track

Post by sikdrumz » Mon Jul 31, 2023 11:04 pm

I’m also finding out whether my Focusrite Scarlett sound card does its own filtering above the nyquist frequency at whatever sample rate it’s using.

That would take the burden off Ableton to sort out the ultra high freq content.

pottering
Posts: 1832
Joined: Sat Dec 06, 2014 4:41 am

Re: Sample Rate Conversion within same track

Post by pottering » Tue Aug 01, 2023 4:34 am

Putting it simply, just recording doesn't add or cause any foldback or aliasing no matter the sample rate, you are confusing it with sample rate conversion.

Live has top notch SRC, so you don't even need to worry about that.

Check this site: http://src.infinitewave.ca/

You will see how many SRC show visible "foldback", but Live's SRC is clean since Live 9.11 update.

That is, recording directly at 44.1 won't cause any problems, recording at 96 then converting later to 44.1 can cause audible artifacts in some software. but actually not in Live.
♥♥♥

sikdrumz
Posts: 8
Joined: Mon Feb 05, 2018 12:21 pm

Re: Sample Rate Conversion within same track

Post by sikdrumz » Tue Aug 01, 2023 7:58 am

If I generate an analog wave via external gear that has content above 22khz, that content will not be captured accurately at 44.1 recording and will cause aliasing, unless it is filtered out before sampling. I’m pretty sure that is correct.

What I’m trying to find out (see OP) is whether I can record individual channels at a higher rate than the project.

Also, when Live downsamples, does it low pass filter at the nyquist first?

cids
Posts: 754
Joined: Fri Jul 16, 2004 5:53 pm
Location: Amsterdam, Netherlands

Re: Sample Rate Conversion within same track

Post by cids » Tue Aug 01, 2023 10:18 am

sikdrumz wrote:
Tue Aug 01, 2023 7:58 am
If I generate an analog wave via external gear that has content above 22khz, that content will not be captured accurately at 44.1 recording and will cause aliasing, unless it is filtered out before sampling. I’m pretty sure that is correct.

What I’m trying to find out (see OP) is whether I can record individual channels at a higher rate than the project.

Also, when Live downsamples, does it low pass filter at the nyquist first?
You can temporarily change the sample rate for recording and change it to 44.1 for playback but then downsampling will take place
Mac Studio M2 Max and MacBook Pro M1

Genelec M030; Live 11.3.x and Live 12; macOS Sonoma

UAD Apollo Twin

Ableton Push 2

cids
Posts: 754
Joined: Fri Jul 16, 2004 5:53 pm
Location: Amsterdam, Netherlands

Re: Sample Rate Conversion within same track

Post by cids » Tue Aug 01, 2023 10:23 am

34.3.2 Sample rate conversion/transposition
Sample rate conversion (during both real-time playback and rendering) is a non-neutral operation. Playback of audio files at a sample rate that is different from the rate set in Live‘s Preferences window will cause signal degradation. Transposition is also a form of sample-rate conversion, and thus also results in non-neutral behavior.

To minimize potential negative results during real-time playback, it is recommended to do sample rate conversion as an offline process, rather than mixing files of different sample rates within a single Set. Once the samples have been exported at the sample rate that you plan to use in Live, the files can be imported without any loss of quality.

Rendering audio from Live with a sampling rate other than the one that was used while working on the project is also a non-neutral operation. As of Live 9.1, however, sample rate conversion during export uses the extremely high-quality SoX Resampler library (This product incorporates the SoX Resampler library, as licensed under the GNU LGPL v2.1.), which results in downsampled files with extremely low distortion.
Mac Studio M2 Max and MacBook Pro M1

Genelec M030; Live 11.3.x and Live 12; macOS Sonoma

UAD Apollo Twin

Ableton Push 2

sikdrumz
Posts: 8
Joined: Mon Feb 05, 2018 12:21 pm

Re: Sample Rate Conversion within same track

Post by sikdrumz » Tue Aug 01, 2023 11:26 am

Thanks. I had already read the above, but it doesn't answer the actual question:

When Live downsamples audio, does it low pass filter at the relevant nyquist first?

Also: Can I record a single channel at say 96k, while playing the rest of the tracks at 44.1k? Or do I need to shift the whole project temporarily to 96k? If I have to shift the whole project, will that cause issues with the content already recorded at 44.1k?

cids
Posts: 754
Joined: Fri Jul 16, 2004 5:53 pm
Location: Amsterdam, Netherlands

Re: Sample Rate Conversion within same track

Post by cids » Tue Aug 01, 2023 1:58 pm

There are no separate playback/recording sample rates so:

You can temporarily change the sample rate for recording and change it to 44.1 for playback but then downsampling will take place
Mac Studio M2 Max and MacBook Pro M1

Genelec M030; Live 11.3.x and Live 12; macOS Sonoma

UAD Apollo Twin

Ableton Push 2

cids
Posts: 754
Joined: Fri Jul 16, 2004 5:53 pm
Location: Amsterdam, Netherlands

Re: Sample Rate Conversion within same track

Post by cids » Tue Aug 01, 2023 1:59 pm

For your filter question I think you should study the SoX Resampler library documentation
Mac Studio M2 Max and MacBook Pro M1

Genelec M030; Live 11.3.x and Live 12; macOS Sonoma

UAD Apollo Twin

Ableton Push 2

sikdrumz
Posts: 8
Joined: Mon Feb 05, 2018 12:21 pm

Re: Sample Rate Conversion within same track

Post by sikdrumz » Tue Aug 01, 2023 2:12 pm

cids wrote:
Tue Aug 01, 2023 1:59 pm
For your filter question I think you should study the SoX Resampler library documentation
I was kinda hoping for a straight yes/no answer from one of the team on this forum...

Tarekith
Posts: 19083
Joined: Fri Jan 07, 2005 11:46 pm
Contact:

Re: Sample Rate Conversion within same track

Post by Tarekith » Tue Aug 01, 2023 2:52 pm

Ableton does not reply to posts on the forum, it just for users to help each other out, not an official support resource I’m afraid.

pottering
Posts: 1832
Joined: Sat Dec 06, 2014 4:41 am

Re: Sample Rate Conversion within same track

Post by pottering » Tue Aug 01, 2023 5:54 pm

sikdrumz wrote:
Tue Aug 01, 2023 7:58 am
If I generate an analog wave via external gear that has content above 22khz, that content will not be captured accurately at 44.1 recording and will cause aliasing, unless it is filtered out before sampling. I’m pretty sure that is correct.
The content above 1/2 the sample rate (like 22.05 kHz, 1/2 of 44.1) won't be captured, but there won't be any aliasing.

The conversion from analog to digital is done is the ADC (analog to digital converter) in your hardware, not in the DAW.

Recording is not resampling.

Recording: Converts analog to digital in the hardware, no aliasing (and yes, ADCs do use anti-aliasing filters, not sure why you seem to reject that idea). Has nothing to do with Live, it is done way before Live's inputs.

Resampling: Converts digital to digital with SRC (Sample rate converter) software, may have aliasing with poor SRC, but Live has excellent SRC with pretty much zero aliasing. Live's SRC is called SoX, its documentation is here: https://sox.sourceforge.net/Docs/Documentation
♥♥♥

sikdrumz
Posts: 8
Joined: Mon Feb 05, 2018 12:21 pm

Re: Sample Rate Conversion within same track

Post by sikdrumz » Tue Aug 01, 2023 7:19 pm

Best reply :D Thank you.

I’m not rejecting the idea of filtering in ADC, I just haven’t had it confirmed before. I suspect the same filtering is true of the internal SOX sample rate conversions, but the documentation is not light reading lol.

Post Reply