Can you use EzFFT to edit the pitch of sounds?

BLAIR
BLAIR Member Posts: 48 Member
edited October 22 in Building With Reaktor

Hey there, I noticed that a lot of the EzFFT modules have outputs for Phase and Amplitude, however, there is no pitch outputs. Is there a way to edit the pitch of each harmonic within a sound using EzFFT or the other FFT macros from Robin Davies?

Maybe my understanding of FFT is wrong and it's not possible at all? Not sure haha

Anyways, if you know, let me know :))

Thanks|

Answers

  • BLAIR
    BLAIR Member Posts: 48 Member

    Could this have something to do with it? This is the macro for the tilt filter and it uses f2p from the index. If so, how would this calculate the frequency if the index only gives out numbers from 0 to 255?


  • ANDREW221231
    ANDREW221231 Member Posts: 349 Pro
    edited January 2022

    pitch shifting with fft --> ifft is possible, but its complicated and definitely beyond the scope of my abilities. thankfully something way easier and IMO cooler is possible, which is fft --> sine bank resyntheis instead of ifft. it allows for pitch shifting, as well as editing the harmonics within a sound together or separately, whatever you want actually


    there is an ensemble for this in the UL! this ensemble was the starting point for many of my own projects

    also, see his other ensembles, i believe there actually is one that uses proper fft for pitch shifting. basically a masterclass in FFT for reaktor altogether

  • ANDREW221231
    ANDREW221231 Member Posts: 349 Pro
    edited January 2022

    also, the only thing this module is doing is calculating the cutoff point for a spectral filter. the process for calculating frequency from bins is a little more complicated and involves unwrapping the phase to get the phase jump from frame to frame, which you'll see if you poke around inside the ensemble i posted


    as far as the bin numbers and how they correspond to frequency, basically you just multiply the bin number by the width of the bins in hz (i think around 80hz for a 256 bin fft) and that'll give you your bin center frequency


    the phase unwrapping i mentioned earlier gives 'instantaneous' frequency, which you can think of as tuning offset from center bin frequency

  • BLAIR
    BLAIR Member Posts: 48 Member

    Had a look at the ReSiner today, unfortunately didn't understand much due to my limited reaktor knowledge. Do you know where I could learn more about how phase unwrapping works? I watched some YouTube videos, from my understanding, it seems that the if the Amplitude & time were plotted on a graph , you'd be able to find the period, which could then be converted to frequency. I've probs gotten some stuff wrong about it tho, I don't really get how the phase values come into play 😅.

  • BLAIR
    BLAIR Member Posts: 48 Member

    I did figure out how to play around with the ReSiner tho, some of the features I've never seen in any plugin like the time based spectral freeze which changes after a certain period of time. Might check out his other stuff tomorrow

  • ANDREW221231
    ANDREW221231 Member Posts: 349 Pro
    edited January 2022

    ok, so.. do you have a reasonable understanding of how ffts work? the regular output of an fft is the real/imaginary output, and then we usually convert that to a set of amplitude values and a set of phase values. the amplitudes is just the volume of any given partial.. and the phase is that partials offset in time as a function of its period


    you can think of the output of a single frame of an fft like a periodic waveform, if you repeated that same frame over like a wave form all the frequency content would be harmonic. play some audio through this ensemble and click the button on and off to see what i mean, it unplugs the phase from the ifft which snaps all the frequency content to harmonics of the period that is 128 samples long



    so you can think of an fft as a bunch of single cycle waveforms stacked back to back in time, if the phase of the partials doesn't change for each cycle, all you get is a periodic waveform and all the frequency content will be snapped to harmonic overtones. phase in a waveform is not something we can usually hear, but because the phase is a different value between each frame, this becomes a kind of time distortion, and this is what generates all the frequency content that is 'inbetween' all those harmonic values

  • ANDREW221231
    ANDREW221231 Member Posts: 349 Pro

    so how phase unwrapping works, is you save all the phase values from the previous frame into a table, and then subtract those values from the current phase value for each bin in the fft. then you re-wrap them between pi and -pi, and this gives you how far above or below the actual frequency is from the fft bin's center frequency

  • ANDREW221231
    ANDREW221231 Member Posts: 349 Pro

    and if you want to get the actual frequency of any of the partials going into the sine bank, it goes like this:


  • BLAIR
    BLAIR Member Posts: 48 Member

    Okay, thank you Andrew! This should clear some things up a lot for me

This discussion has been closed.
Back To Top