If Reaktor says it doesn't support over sampling then...

Discussion in 'Building With Reaktor' started by Studiowaves, May 28, 2021.

  1. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    Makes perfect sense. You guys are genius at this stuff, When you start slowing down in your old age I hope you don't end up living in the past like me. Seem like after 60 it's a downhill battle, I asked a doctor who was 64 once if he thought he could make it thru med school again. He laughed big time and said no way. lol I use ZDF on everthing after you told me about them a while back. And now it appears you guys have figured out a way to multiply the nyquist frequency. I get the jist of it and in a way it seems silly to oversample a single sample but I have a feeling the output of the filter is cumulative when you consider the stream of samples going in and out. To put it another way the stream changes the working values within the oversampled filter and it's not really a single sample process with the a delay like the old filters. It's pretty far over my head but it's pretty fun watching you guys develop new things. It brings back old memories of my prime, we came up with some analog stuff like parametric filters and thought it was the cats meyow. lol I made all of the electronic crossovers, time delays for our pa and put active electronics in our electric guitars. Simple shelving filters and buffered the pickups with a high impedance load, noiseless fet switches and compressors with noise gates. Then playing gigs with all the stuff turned out pretty good. Then the Commode 64 came out and started to make a light show with it for the band. Then the party took a turn and I had to fix broken electronic stereo's and musical equipment until I retired. Hard to believe we were so self sufficient back in the days. So ya, later when computers started getting good the old band made some recordings and thought it was great compared to tape recorders. We started going to town with filters and it didn't take long to notice a big difference on slow sample rates. It's cool to see it all get better and I get a kick out of watching it grow even though it's technically way over my head. later, time for dinner.
     
  2. Laureano Lopez

    Laureano Lopez NI Product Owner

    Messages:
    408
    Oh, you meant the oversampling filters! Those come from here. The fractions of SR are the corner frequencies. For example, for the AP4 SR/3, this is the response at three levels of zoom:
    ap4sr3.png
    It's almost flat up to SR/3, then goes to -3 at SR/2, and the stopband starts at 2/3 SR. This is the AP3 SR/4: ap3sr4.png It's almost flat up to SR/4, then goes to -3 at SR/2, and the stopband starts at 3/4 SR. The "magic numbers" are the coefficients for each of the 1-pole allpasses to get the desired response for the whole filter. They're got through an iterative numerical approximation. For example, for the AP3 SR/4:
    method.png
    The /4 at the end is because each downsampling stage doubles the amplitude. There are two stages, so we normalize dividing by 4. I use different corner frequencies for each stage because there's no need to use the steepest filters for all stages, I explained why here.
     
    Last edited: May 30, 2021
    • Like Like x 1
  3. Laureano Lopez

    Laureano Lopez NI Product Owner

    Messages:
    408
    I'd say the problems start above SR/4. The space between these lines is a measure of the warping done by the bilinear transform:
    warping.png
    We're pretty ok up to 1/4, then it goes up. That's because the digital filter has to reach at Nyquist what in analog is reached at infinity. This matters only if you need high cutoffs, above say SR/4, and not really for all filters: I'd say bandpasses, or resonant filters. For a flat LP or HP it doesn't matter much. As Colin said, oversampling is mostly used to tame aliasing for waveshapers, and it's kind of a last resort, when anything else won't do it, because it's expensive.
    I never understood this. The bilinear transform is not really new, and properly discretized filters are not that more expensive. It would seem that at some point (which I didn't live through) people just made crappy filters :oops:
    I live in the past for like ten minutes twice a week, then I give myself a gentle smack and get on with stuff :D
     
  4. colB

    colB NI Product Owner

    Messages:
    3,823
    I first started dabbling with this stuff back in maybe 2001 (maybe 2000)... Back then I had no knowledge of any DSP topics at all. I bought Sync Modular and started playing around with it. When I first tried making a filter, I did loads of internet research, found some papers and implemented a ladder model from one of those papers. It was pretty basic with a unit delay in the feedback line. The thing is that back then there really was very little educational information available to someone trying to teach themselves - heavy tomes on DSP with an expectation for an existing grasp of the maths, and mostly geared at telecommunications rather than audio for music, so searching out academic papers was it, at least for me, and since realtime synthesis and audio processing was really very new, there wasn't much out there.
    I get the feeling that quite a few of the early plugin developers were also making it up as they went along, and I suspect that what happened is that they put a lot of time and effort into finding ways to 'fix' the problems with those early models rather than start from scratch. There were probably a few gurus who did do it properly, but they didn't publicise their ideas... or at least it wasn't coming up in any of my searches - or I didn't understand it...
    Obviously there were plenty of engineers around with all the required knowledge, but how many were working on music software? and how many of those were trying to re-invent the wheel or build a better mousetrap rather than working on getting products into the marketplace.
    Also got to remember that back then, cpus were weak, so the extra processing required from even a pretty basic ZDF type filter would have made it unrealistic in a polyphonic context. And of course, it's not an issue until someone gets it together and starts doing it so much better that everyone else has to catch up.
    So yeah, at some point people just made filters that were crappy by todays standards :). And digital stuff had a reputation for sounding thin and cold.
     
  5. Catman Dude

    Catman Dude NI Product Owner

    Messages:
    761
    I had to study these a while to get everything to slot into place, but eventually it all made sense.
    The code to get the coefficients has its own mind-bending aspect.
    As I once heard Pierre Boulez say, before performing another composer's work in a relatively informal concert setting: "I have not enough hats to take off to you, sir."
     
  6. Laureano Lopez

    Laureano Lopez NI Product Owner

    Messages:
    408
    That makes sense. I always forget the Internet hasn't always been there, lol. I was doing schoolwork back then, didn't get into this stuff until much later.
     
    • Like Like x 1
  7. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    That's the attitude old boy. Today I worked in the garden for 5 hours, this equates to 10 minutes at age 30. lol The funny thing is I was thinking about your project while leveling a 10 by 6 foot area. After transplanting all of the plants to another garden to make room for a shed I had to break up the ground and grind it up with a rake. While I was raking it flat I pictured the rake lines like samples and started raking in a parallel followed by perpendicular lines. The ground was slowly flattening out then I oversampled it by raking between the rake lines. Finished it up by raking back and forth on 45 degree angles. I figured that was aliasing lol. I started laughing when I realized every pass was like another filter pole so I probably raked the ground with a 100 pole filter. lol Now equate that into a filter and you'll be able to flatten the frequency response of any speaker system. lol
     
    • Funny Funny x 1
  8. Laureano Lopez

    Laureano Lopez NI Product Owner

    Messages:
    408
    I miss my yard, it kept my madness at bay... I live in a flat now, I don't think my neighbor would appreciate me raking her roof :(
     
  9. Catman Dude

    Catman Dude NI Product Owner

    Messages:
    761
    You never know. You could tell her you're cleaning her gutters for her?
     
    • Funny Funny x 2
  10. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    Ya, know what ya mean. The wife loves to garden , we live in a little house they made for baby boomers. One of those planned subdivisions they made right after WWII ended. It musta been an easy insight knowing all those guys would go after the girls after the war and make babies. And that they did. lots of em. Me, Catman dude, Paule, and the zillion kids crammed into the schools growing up. Well there's no law keeping you in a flat but as beat up as I right now, I'll trade you. lol At least the project turned out ok. The shed has several concrete blocks in it right now on one side to flatten the unpacked soil under the shed. It's only a 1/2 inch off an it will be level in a week if that long, If not i'll just hose some water under it to help it along and pull the blocks out when it's level. Not much water, easy does it other wise it's take all summer to dry out. Maybe your neighbor will let you plant some tomato plants, Fresh ripe tomatoes are so good, especially those giant ones. Big Burpees of something. As long as the dog don't piss on it. lol
     
    • Like Like x 1
  11. Studiowaves

    Studiowaves NI Product Owner

    Messages:
    587
    I took a look at the that. It does makes sense to offset the filters, I see your point. Each successive filter is in effect helping the first filters slope. Good thinking! Were you able to calculate the exact cutoff for each filter to ensure a gradual slope? Also you were saying something about if only be good for some special wave the Colin mentioned. I'm not so sure that's the case, I rolled off the operators in that fm thing to filter jagged edges being fed into the carriers. I think I set the filter frequency to the 88th note on my keyboard. It removed some distortion and cleaned it up a bit at 32k sr but no so well at 24k. It was a single pole lpf , almost sure it was a zdf too. Now that I see the rolloff is not that great without oversampling I'm curious if your filter has advantages preempting anything that modulates something else. I also tried a LR 4 pole there to see what would happen and the last octave started aliasing terribly bad about mid scale. Seems it was a 24k sample rate but the 1 pole was fine. I've been trying to figure out why it did that. The Fc is under 1/4 of the sample rate but ya it was so bad you couldn't tell one note from the next. Maybe in a sense higher order filters somehow effectively tower the true nyquist. Kind of like looking at something from a different angle. Any ideas on why? Seems like group delays of phase shifts wouldn't cause that type of sound.