Set phase of FFT bin

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
I have read that when I have done an FFT, I can get the phase of a bin with

Code: Select all (#)

phase = atan2(imag[i], real[i])
But I have no idea how I can set the phase while preserving the magnitude. It's two unknown variables for atan2 and I don't know how to start solving it. :(

I did find e.g. PV_copyphase from supercollider, but couldn't find a source to that function.

Post

Code: Select all

real[i] = cos(phase);
imag[i] = sin(phase);
~stratum~

Post

This was what I was missing, thank you so much!

Post

Don't forget to multiply both values by the magnitude!

Post Reply

Return to “DSP and Plugin Development”