oversampling?

ColinP
Posts: 953
Joined: Mon Aug 03, 2020 7:46 pm

Re: oversampling?

Post by ColinP »

Thanks Grant for a post that as always is thoughtful and full of good humour.

As an atheist who lives close to nature my celebrations are well over as winter solstice in the UK was on Friday at about 3 am. But best wishes to all for the holiday season. I perhaps live too close to nature really, I was trapped on-board with dwindling resources for five days due to extreme flooding recently and was beginning to get cabin fever. Which might explain why I'm coming across as a bit "anal" in this thread.

I wasn't thinking about fixed delay in the context of feedback. You are completely correct that applications like physical modelling need fractional delays.

I agree to a large extent that we are all singing from the same hymn sheet. It's mostly fairly petty linguistic argument and the differences that arise when looking at this area from the time domain compared to the frequency domain. But I think most developers reading this are looking for simple tips about how to implement their weird and wonderful ideas and many of us (myself included) are not experts in the frequency domain. I'd struggle to recognise an FFT if it slapped me in the face. So I think clear explanation is very important and that's been my goal here.
User avatar
ChR_is
Posts: 107
Joined: Wed Sep 22, 2021 5:48 pm

Re: oversampling?

Post by ChR_is »

i'm sorry Colin that i came off as aggressive. that was not my intention.
i can admit that i was frustrated that you talked about everything surrounding the evidence i provided to back up my claim but not the actual evidence itself. for my point it doesn't matter if it's a "paper" or a "student essay", it doesn't matter how old the author is/was (or what math skills they lack to make jokes about their text). it doesn't even matter if it was plagiarized. the discussion topic is and was not about the author or ethics in scientific writing. i simply found this text to be a valuable resource that shows a third party researcher's experiments lead to the same conclusions that i was drawing. plus it had nice graphics alongside the experiments. but enough of that already. i see that i have failed to make my point and that is ok for me.

a few times it has been said that i said sth. so i feel inclined to re-iterate my points that i derive from my own research and personal experience.
- LERPing (linear interpolation) does not produce aliasing. it's a linear process.
- reading from a fractional buffer at the constant same speed it was captured in does not produce aliasing regardless of where between samples the read head is placed. depending on where between samples the values are read out there might be a lowpassing effect (which depends on the actual interpolation method used; a perfect sinc interpolator would have zero effect). this effect is the strongest in the middle between two samples.
- reading from a fractional buffer at a different speed than it was recorded in might produce aliasing. this can be reduced by using higher order interpolation at the cost of increased high-frequency roll-off.

i tried to choose my words carefully to avoid ambiguity. but of course you can still disagree with any of my points. that's perfectly fine.

i'd like to give a thought experiment for the LERP aliasing discussion. an amplifier is a linear process. it's

Code: Select all

result = gain * signal
imho it's hard to argue that an amplifier can alias (a linear amplifier that is, no "analog model", no hidden saturation, just plain amplification). but you can quite literally get an aliased signal from an amplifier if you modulate the gain at audio rate. then you're producing sidebands which can be pushed beyond the nyquist frequency. so does an amplifier itself produce aliasing? LERPing is essentially two amplifiers workings against each other.

Code: Select all

result = (gain) * signal1 + (1-gain) * signal2
if an amplifier does not alias on its own. why would linear interpolation then? don't get me wrong this has nothing to do with fractional buffers. just the LERPing.

i'd also like to address some words personally at you Colin. we as devs are proud of our work and we really should be. you are making great modules. nobody can take that from you. in fact as far as i'm concerned i see your Granular Synth constantly riding the most popular train in the CA store. that's an amazing achievement. you don't need to proof anything to us, so please don't take any of this discussion personal. while i'm not always agreeing with you i still value you and your contributions.
ColinP
Posts: 953
Joined: Mon Aug 03, 2020 7:46 pm

Re: oversampling?

Post by ColinP »

Thanks for the olive branch Chris.

And sorry for me being a bit cranky.

On that essay, I went over the top and regret it. I think we have both skirted dangerously close to related polar/mirrored fallacies. What triggered me was your use of appeal to authority. This isn't much of a problem when the authority is sound but I immediately detected that several things about it were slightly iffy. Similarly what has presumably triggered you is that I'm close to deploying ad hominem by suspecting that authority when to you it's not about the authority but the information.

This is one of the many bugs in my personality. I always want people to argue their own points rather than say "check out what this other guy is saying". But obviously science and engineering would stall if we had to explain everything over and over in every debate. So that's where references come in. Without references one is expected to have faith in authority rather than being able to trace through the network of references to uncover the full picture.

Most of my thinking is spatial. Quantities whether scalar or tuples are points in space and mathematical operations are spatial transformations. Lerping is a very simple way of drawing a straight line between points in space and I understand what you mean about it "in itself" not producing aliasing but in the real-world application of using lerping as a key component in a mechanism that performs fractional buffer access it can indeed create fairly serious aliasing whereas an alternative component might produce far less aliasing. So to me your blanket statements seem to be looking at reality through such a tiny window that you are missing the picture.

It's like saying that addition or multiplication can't create distortion yet how is distortion actually created? And polynomials are after all just little machines made out of addition and multiplication. And ultimately multiplication is just addition extended into an extra dimension.

From my early background in electronics I see that all computation can be done by using just NAND gates. If we follow your argument then it's impossible for NAND gates to produce aliasing. But from my POV they can when wired up correctly. I'm sure you are familiar with the concepts of universality and emergence. Philosophically I'm an indirect realist and I think even artistic expression for instance is an emergent property of matter and energy. Some people would argue that things like molecules, electrons and photons didn't create the works of Beethoven but when viewed philosophically what did then?

As Grant observed we are broadly in agreement. Our differences are mostly about how we describe things.

Effectively, you are saying lerping can't produce aliasing, except in certain circumstances. I'm saying lerping can produce aliasing in certain circumstances.

All the best and thanks again for the olive branch.
User avatar
utdgrant
Posts: 541
Joined: Wed Apr 07, 2021 8:58 am
Location: Scotland
Contact:

Re: oversampling?

Post by utdgrant »

borkman wrote: Wed Dec 13, 2023 11:07 pm I've added oversampling to a new effect module I'm finishing up.
Were you refering to Full Thickness Tear in the OP? It sounds great, judging by the examples on the "Sounds" tab.

Out of interest, what did you end up doing when you were varying the lengths of the delay lines (via LFOs)?

Did you use fractional delays or were they always rounded/truncated to integer lengths?

If fractional, did you use Lerping or Oversampling (or some completely different approach)?
______________________
Dome Music Technologies
borkman
Posts: 51
Joined: Tue May 09, 2023 7:26 pm

Re: oversampling?

Post by borkman »

I was indeed referring to Full Thickness Tear (and an upcoming chorus module). I ended up using a fractional delay on all delays, modulated or otherwise, with linear interpolation and no oversampling. The only difference that I added (which maybe everyone does?) was rounding in the singular case of the delay being less than 1 sample. It was producing weird artifacts and, though an extreme case, the UI allows it so it needs to behave.
User avatar
utdgrant
Posts: 541
Joined: Wed Apr 07, 2021 8:58 am
Location: Scotland
Contact:

Re: oversampling?

Post by utdgrant »

borkman wrote: Tue Jan 02, 2024 6:40 pm The only difference that I added (which maybe everyone does?) was rounding in the singular case of the delay being less than 1 sample. It was producing weird artifacts and, though an extreme case, the UI allows it so it needs to behave.
That might be something to do with the order in which you 'read' the current sample vs when you read the previous [t-1] sample. With Zeit, it was easy (just one delay line to worry about), but the block diagram of Full Thickness Tear looked VERY scary indeed! I think it was a wise move to have that one special case. :)
______________________
Dome Music Technologies
Post Reply

Return to “Module Designer”