Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 06-09-2024, 04:35 AM   #1
Hermetech Mastering
Human being with feelings
 
Hermetech Mastering's Avatar
 
Join Date: May 2019
Location: Milan, Italy
Posts: 554
Default Question About FX & FX Chain Oversampling

I always work at 96k. Recently I've been experimenting with oversampling FX and FX Chains with Reaper's built in OS, rather than using the plugins' individual OS (if they have it).

The anomaly is, I'm presented with the option of, "Oversample up to 88.2k/96k", even though I'm already working at 96k. Does this mean the effect will be the same as when I select "No oversampling"? Or does it actually mean oversample x2 the current sample rate? In which case, the labelling of the options is not accurate, and I feel it would make more sense for the options to be "OS x2 current sample rate", x3, x4 etc., instead of using actual kHz figures.

Am confused, please enlighten!

Latest Reaper release on Windows 11.
Hermetech Mastering is offline   Reply With Quote
Old 06-09-2024, 07:09 AM   #2
elcalen
Human being with feelings
 
elcalen's Avatar
 
Join Date: Sep 2019
Location: Finland
Posts: 1,057
Default

The wording should be quite literal. If it says oversample to 96k and you're already at 96k, then it should not do anything, as far as I understand it.

I think noting it as a multiplier could potentially be more confusing, because project sample rates can change. This way the sample rate for the plugin remains the same even if you later decide to change the overall sample rate. Say for example you're working on a project in 48k, but you think a certain plugin works better at 96k. If you later decide to increase the overall sample rate to 96k, it wouldn't make sense to have that one plugin's oversampling jump to 192k, that would be redundant...
__________________
Artist name Ben Enkindle. Making electronic music exclusively with Linux software.
elcalen is online now   Reply With Quote
Old 06-09-2024, 07:21 AM   #3
Hermetech Mastering
Human being with feelings
 
Hermetech Mastering's Avatar
 
Join Date: May 2019
Location: Milan, Italy
Posts: 554
Default

Quote:
Originally Posted by elcalen View Post
The wording should be quite literal. If it says oversample to 96k and you're already at 96k, then it should not do anything, as far as I understand it.

I think noting it as a multiplier could potentially be more confusing, because project sample rates can change. This way the sample rate for the plugin remains the same even if you later decide to change the overall sample rate. Say for example you're working on a project in 48k, but you think a certain plugin works better at 96k. If you later decide to increase the overall sample rate to 96k, it wouldn't make sense to have that one plugin's oversampling jump to 192k, that would be redundant...
Thanks, agree and agree!

It SHOULD be quite literal, I'm just wondering if it is. If it says OS to 88/96 and it's actually OSing to 192, then that's a problem that needs sorting.

I see what you mean about displaying actual project sample rates, which may be clearer in some circumstances (not mine, as I said, I always work at 96k), but then Reaper should know what sample rate it's currently set to, and give you the correct options. IMO there shouldn't be an option to OS to a rate that you are currently at, along with "No oversampling", as it just adds confusion, hence this post.

I guess ideally it would display OS multiplier AND OS sample rate, correctly.
Hermetech Mastering is offline   Reply With Quote
Old 06-09-2024, 07:31 AM   #4
elcalen
Human being with feelings
 
elcalen's Avatar
 
Join Date: Sep 2019
Location: Finland
Posts: 1,057
Default

Quote:
Originally Posted by Hermetech Mastering View Post
IMO there shouldn't be an option to OS to a rate that you are currently at, along with "No oversampling", as it just adds confusion, hence this post.

I guess ideally it would display OS multiplier AND OS sample rate, correctly.
Well, in theory one could set it to the current sample rate and then if they later lower the project sample rate, the oversampling would kick in and keep that plugin at the original rate. I don't think that's a common scenario, but theoretically possible

I personally don't find it confusing, because it's worded in literal terms. But you're right, ideally it would probably display both the target sample rate and the current effective multiplier.
__________________
Artist name Ben Enkindle. Making electronic music exclusively with Linux software.
elcalen is online now   Reply With Quote
Old 06-09-2024, 07:33 AM   #5
ScuzzyEye
Human being with feelings
 
ScuzzyEye's Avatar
 
Join Date: Apr 2021
Posts: 629
Default

It is literal.

If you are working at or above the requested oversampling rate, Reaper does nothing. You're setting the minimum rate you want the plug-in to run at, and Reaper will up-sample to make sure it is at least that rate. Though, it may already be higher depending on the project rate, the chain oversampling, or the individual FX oversampling.

The FX window title bar does show the current multiplier. If you have an FX set to 96k, and you're working at 96k, it shows nothing. But if you then set the oversampling to 192k, it'll show [2x] in the title bar.
ScuzzyEye is online now   Reply With Quote
Old 06-09-2024, 07:43 AM   #6
Hermetech Mastering
Human being with feelings
 
Hermetech Mastering's Avatar
 
Join Date: May 2019
Location: Milan, Italy
Posts: 554
Default

Quote:
Originally Posted by ScuzzyEye View Post
It is literal.

If you are working at or above the requested oversampling rate, Reaper does nothing. You're setting the minimum rate you want the plug-in to run at, and Reaper will up-sample to make sure it is at least that rate. Though, it may already be higher depending on the project rate, the chain oversampling, or the individual FX oversampling.

The FX window title bar does show the current multiplier. If you have an FX set to 96k, and you're working at 96k, it shows nothing. But if you then set the oversampling to 192k, it'll show [2x] in the title bar.
Brilliant, thanks, that's all I wanted to know! I want to oversample the FX Chain at 96k x 2, so I'll set the oversampling to 192. Hadn't noticed the title bar thing either, so thanks for that too.

I still think it should automatically remove the option that does nothing (same as your current sample rate), when you already have the "No oversampling" option, but at least now I trust that when I set it to 192k, it really is.
Hermetech Mastering is offline   Reply With Quote
Old 06-09-2024, 08:14 AM   #7
Hermetech Mastering
Human being with feelings
 
Hermetech Mastering's Avatar
 
Join Date: May 2019
Location: Milan, Italy
Posts: 554
Default

Another maybe strange thing. As expected, if you click the Chain "+" box to the right of the preset select, or right click on the Chain header, and set your Chain Oversampling, restart playback, the header does show 2x, or whatever, great.

But, if you right click the blank area to the left where the FX chain is listed as separate plugins, and then select Chain Oversampling there, when you select 2x or whatever, press stop and restart, the 2x doesn't appear in the header, it appears in the info area below the FX list. Just wondering why that is. Are the two oversampling options doing different things? One is Track based, the other is Chain based or Container based?
Attached Images
File Type: jpg Clipboard01.jpg (240.4 KB, 33 views)

Last edited by Hermetech Mastering; 06-09-2024 at 08:23 AM.
Hermetech Mastering is offline   Reply With Quote
Old 06-09-2024, 08:34 AM   #8
Hermetech Mastering
Human being with feelings
 
Hermetech Mastering's Avatar
 
Join Date: May 2019
Location: Milan, Italy
Posts: 554
Default

OK I unfloated the Container window to make it clearer. I now have three different places where I can set the Chain OS. The two places on the left show up as 2x in the info panel under the FX list, the one on the right shows up in the window's top border/header. What's the difference? I just really want to grok this stuff to make sure I am not oversampling twice etc.
Attached Images
File Type: jpg Clipboard01.jpg (194.0 KB, 21 views)
Hermetech Mastering is offline   Reply With Quote
Old 06-09-2024, 09:25 AM   #9
ScuzzyEye
Human being with feelings
 
ScuzzyEye's Avatar
 
Join Date: Apr 2021
Posts: 629
Default

I think this is where thinking about it as requesting a rate, rather than an oversample multiplier makes more sense. Oversampling will only be applied if you've requested a higher rate.

Chain oversampling has the up-sample applied at the start of the chain, and then down-sampled after the last effect. But only if requested rate is higher than the project rate.

FX oversampling has the up-sample applied before the effect, and down-sampled right after it. And again, only if the requested rate is higher than the chain, and the project rate. There is one thing to know about this, is if you oversample two effects in a row, it is still true that up-sampling is applied before the first, and the signal is down-sampled and then re-up-sampled before the second. That might seem wasteful, but if you don't want that, the chain is a better idea. Because the use-case of removing inaudible harmonics created by a distortion effect before additional processing that might also add harmonics prevents unneeded inter-modulation distortion.

I will admit I've not investigated how containers play into this, because I don't use them.
ScuzzyEye is online now   Reply With Quote
Old 06-09-2024, 09:35 AM   #10
elcalen
Human being with feelings
 
elcalen's Avatar
 
Join Date: Sep 2019
Location: Finland
Posts: 1,057
Default

Oversampling a container should oversample all the plugins inside the container. Oversampling an individual fx inside a container should only apply it to that fx.

Using the + button in the corner should apply the setting to the currently selected fx (or container, etc), I believe. It should be functionally the same as right clicking the fx and doing it via its context menu.

If there are multiple instances of oversampling, such as could be the case with containers, or if using both chain and fx oversampling, it will use the *highest* of all the applicable oversampling settings for the individual fx. The sample rate will always be what the oversampling menu says, they won't further multiply.

So if you set a container to oversample at 192k, all the plugins inside it should be running at 192k. If you then set an individual plugin inside the container to 192k, it will still run at 192k, the setting would not do anything (*unless* you later change the container's sample rate back to 96k or lower). But If you set an individual plugin inside a container to run at 384k, then that plugin will be running at 384k, while any other plugins inside the container would still be (in this example) running at 192k.

This is why it's actually really important to list the options as sample rates. If this was all multipliers, it would get really confusing. But the way it actually works is dead simple: you just set the sample rate you want the thing to run at, and you're good to go.

Disclaimer: I never really use the oversampling features myself, so I'm not an expert. But I did a tiny bit of testing just now, and I'm pretty sure that's how it's supposed to work...
__________________
Artist name Ben Enkindle. Making electronic music exclusively with Linux software.

Last edited by elcalen; 06-09-2024 at 10:00 AM. Reason: additional examples and clarifications
elcalen is online now   Reply With Quote
Old 06-09-2024, 09:45 AM   #11
ScuzzyEye
Human being with feelings
 
ScuzzyEye's Avatar
 
Join Date: Apr 2021
Posts: 629
Default

I'm forever curious, so I just did investigate what happens with a container.

It's as you describe. But it's presented oddly (probably to prevent having to add another set of oversampling menus for containers).

If you set a container to FX instance oversample, from the track FX chain, it indicates that all the FX inside the container are set to instance over-sampling. But if you float one of those FX windows directly, it won't show any over-sampling there. But it is definitely running at the higher rate (noise generator into a spectrum analyzer like Tokyo Dawn Labs Prism, which supports above 20k display to test) . Additionally there's no down-sample between FX in a container set to instance oversampling. So that makes it behave like chain oversampling.

So even if it isn't complete clear in the UI what's happening. That is a way to get a series of FX to oversample without down-sampling between them. Put them in a container. Maybe I will have a use for them now.
ScuzzyEye is online now   Reply With Quote
Old 06-09-2024, 10:01 AM   #12
Hermetech Mastering
Human being with feelings
 
Hermetech Mastering's Avatar
 
Join Date: May 2019
Location: Milan, Italy
Posts: 554
Default

Great, thanks so much guys. I think you can basically oversample the Chain from the Chain FX list, or from the Container menu bar, and it'll do the same thing, it just shows up in different places. I think it probably all works as it should, it's just pretty confusing in the GUI having it show up as x2 in two different places. It only shows up in the header when you float the Container window, otherwise it's always below the FX list.

Yes, I want a Container (so it just "looks" like one plugin), where just that Container is OS x2, upsampled before the Container, 192k throughout the Container, then downsampled to 96 after the Container, before it joins the rest of the chain at 96. I think I'm finally getting there!

Thanks once again. Hopefully they'll find a way to streamline it a bit UI wise in future.
Hermetech Mastering is offline   Reply With Quote
Old 06-09-2024, 10:07 AM   #13
elcalen
Human being with feelings
 
elcalen's Avatar
 
Join Date: Sep 2019
Location: Finland
Posts: 1,057
Default

Quote:
Originally Posted by Hermetech Mastering View Post
Yes, I want a Container (so it just "looks" like one plugin), where just that Container is OS x2, upsampled before the Container, 192k throughout the Container, then downsampled to 96 after the Container, before it joins the rest of the chain at 96. I think I'm finally getting there!

Thanks once again. Hopefully they'll find a way to streamline it a bit UI wise in future.
Yeah, as I understand it, setting the container to oversample to 192k should do exactly that.

And I'm honestly not sure how it could be more streamlined than having the ability to easily set the desired sample rate for each individual plugin, container, or chain. They have to take into account all these various nesting options, after all. I guess the one thing they could improve on is the visual representation of the currently active sample rates...
__________________
Artist name Ben Enkindle. Making electronic music exclusively with Linux software.
elcalen is online now   Reply With Quote
Old 06-11-2024, 06:33 AM   #14
Hermetech Mastering
Human being with feelings
 
Hermetech Mastering's Avatar
 
Join Date: May 2019
Location: Milan, Italy
Posts: 554
Default

OK last SRC/OS question for now, I promise!

When using OS for plugins, containers, chains etc., I understand it's doing real time SRC. Is there a way to select different resamplers, or is it set in stone? I see the options under Project Settings for resampling, but I had assumed they were just for Item/Track resampling when you have different items at different sample rates, or for Rendering only.

So, do the Project Settings for SRC also apply to the OS functions?

It would be cool to select your own resampler for OS, I've had great success with SoX, and also bought Voxengo R8Brain Pro, so would be nice for the Pro users/owners to be able to select the higher quality options. I know it probably wouldn't make much/any audible difference, but I'm paid to obsess over this stuff.
Hermetech Mastering is offline   Reply With Quote
Old 06-11-2024, 07:21 AM   #15
ScuzzyEye
Human being with feelings
 
ScuzzyEye's Avatar
 
Join Date: Apr 2021
Posts: 629
Default

Those project resampling settings are used any time Reaper needs a different number of samples in vs. out. This can be because you've imported a file at a different rate than the project, or you've stretched audio to a different length, or enabled oversampling. The different options is applied depending on if you're playing back in realtime or rendering, for any of the above cases.

I think it would be difficult to integrate an external resampler, because of the "realtime" nature of Reaper's processing. Even during a render it's only processing a buffer of audio at a time. Sox and r8brain Pro both need access to an entire file. (Well, SoX can work with a pipe, but most programs are given files to process.)

I also have r8brain Pro, and while the precise minimum-phase that's not in the free version is interesting, in the end I preferred the linear-phase version anyway. You could definitely compare yourself. Find higher rate content that includes ultrasonics. Make a new 48k project, and import it, so Reaper resamples. Also run it through r8brain Pro to reduce it to 48k, and import that into the project too. Then you can ABX or delta and see if you can hear anything you don't like in one version or the other. I know what I found when I did this test, but I won't describe it as to not bias what you may or may not hear.

I will add that the reason that r8brain free is in Reaper is because the source code is available, and could be adapted to run as Reaper needs. It isn't calling the external program.
ScuzzyEye is online now   Reply With Quote
Old 06-11-2024, 07:49 AM   #16
Hermetech Mastering
Human being with feelings
 
Hermetech Mastering's Avatar
 
Join Date: May 2019
Location: Milan, Italy
Posts: 554
Default

Thanks, yeah I should do a null test for sure.

So yes, basically, those Project Settings affect all OS and SRC within Reaper, real time or render. Good to know!

I always use the Lin Phase SRC in R8Brain Pro too, but was under the impression "Precise Lin Phase" was not an available option in Reaper.
Hermetech Mastering is offline   Reply With Quote
Old 06-11-2024, 09:13 AM   #17
ScuzzyEye
Human being with feelings
 
ScuzzyEye's Avatar
 
Join Date: Apr 2021
Posts: 629
Default

Quote:
Originally Posted by Hermetech Mastering View Post
I always use the Lin Phase SRC in R8Brain Pro too, but was under the impression "Precise Lin Phase" was not an available option in Reaper.
I too figure that Reaper uses the same process as the r8brain free program. But I don't know how much "worse" it is than the precise algorithm in Pro. Also I believe that Reaper is maxing out the precision available from the source version by using a 30-tap filter.

Guess I need to compare a few more things. Including running sweeps and impulses through all of them to see if I can even spot a difference there.
ScuzzyEye is online now   Reply With Quote
Old 06-11-2024, 02:43 PM   #18
ScuzzyEye
Human being with feelings
 
ScuzzyEye's Avatar
 
Join Date: Apr 2021
Posts: 629
Default

OK. I ended up with two tests that both showed the same interesting results. A sine sweep from 0 to 96k Hz in a 192kHz 32-bit float file. And pink noise rendered into a 192kHz 32-bit float file.

Next I took that 192k file and resampled it in r8brain Pro using both the Fast and Precise Linear Phase methods. (I also check the Minimum Phase, and mathematically it shows what I was hearing and not liking, and since we agree on linear phase being preferred, I'll leave it out from here on just to simplify things.) I also imported the 192k file into a 48k Reaper project, and rendered it to a new stem.

I collected the files and opened them in iZotope RX. I copied the Precise Linear file, and pasted it using invert and mix over top of the Fast Linear, and Reaper render. I got the same thing for both the sweep and noise. The difference between the Fast and Precise is a file with a peak level of -144.49. Basically rounding errors in the 24th bit. So when Voxengo says "precise" they mean it in terms of floating point precision, not more accurate. The difference in the Fast and Precise noise resamples is a file with a -40.45 dB peak at the start and then it fades to -138.47 after 12 ms. That's likely due to the first half of the FIR kernel not be applied to virtual zeros before the file starts, and it didn't show up in the sweep since it started with a zero sample that slowly ramped up. So as long as your audio starts with a bit of silence it'll be fine.

The interesting thing shows up with the Reaper render. The sweep also has a delta of -144.49 dB for almost the entire file. It's just the last part of the sweep from about 23200 Hz to 24000 Hz that doesn't null completely. That means Reaper is using the same interpolation as the Fast Linear, but a ever so slightly less steep filter. (I don't know how that's possible because the resampling filters I'm familiar with do the decimation and low-pass filtering in with the same kernel, but that's why my dsp code isn't in Reaper I suppose.) The noise resampling shows exactly the same thing. A thin band from from about 23200 up to Nyquist, and virtually nulling completely below.

I just had a thought. Could Reaper be using the 98% bandwidth filter? Let me check... The answer seems to be...maybe? 98% gets closer to nulling than 99%, and 96% seems to be going the wrong way.

In conclusion it seems that Reaper is using something that's very close to r8brain Pro's Fast Linear Phase with 98% bandwidth. And the Precise Linear Phase is so very close to Fast its not even worth worrying about. So as long as you can accept a less than -144 dB difference and maybe 600 Hz lower start into the high-cut, Reaper's r8brain free algorithm should be fine.
ScuzzyEye is online now   Reply With Quote
Old 06-11-2024, 10:26 PM   #19
Hermetech Mastering
Human being with feelings
 
Hermetech Mastering's Avatar
 
Join Date: May 2019
Location: Milan, Italy
Posts: 554
Default

Thanks for doing these tests, that's amazing. Yes, seems to me it's not worth worrying about the differences between the Pro mode LP, and the Free/Reaper mode LP. The differences are below the human hearing range in level and frequency.
Hermetech Mastering is offline   Reply With Quote
Old 06-12-2024, 05:00 AM   #20
ScuzzyEye
Human being with feelings
 
ScuzzyEye's Avatar
 
Join Date: Apr 2021
Posts: 629
Default

I had one more thought.

The slightly shallower low-pass filter might even be preferred. It's still far from the human hearing range, so you're not losing anything you'd notice. And the one complaint that people have about linear phase filters is that they pre-ring. Even the steepest 99% doesn't produce audible artifacts (to me) even on the clickest sounds. But a less steep cut will have even lower amplitude pre-ringing.
ScuzzyEye is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:20 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.