|
Kyma Forum
![]() Tips & Techniques
![]() Phase Unwrapping for arcTan
|
| next newest topic | next oldest topic |
| Author | Topic: Phase Unwrapping for arcTan | |
|
gustl Member |
I have a problem with the arcTan module. Since the values are limited to -1, 1 I need some kind of phase unwrapping afterwards. I've attached a sound concerning this, have a look at the Waveform the arcTan module (Frequency) is producing. Any suggestions? Thanks, [This message has been edited by gustl (edited 10 February 2014).] IP: Logged | |
|
SSC Administrator |
It looked like you were headed toward doing a spectral analysis using the heterodyne filter method, so we went ahead and made one for you. Phase-unwrapper is included in the Sound. We also added Bandwidth, AnalysisFrequency and a FrequencyDeviation controls. The FreqDev control (called !Scale) lets you go from normal, to monotone, to exaggerated prosody. The !BW can give some beautiful Vocoder-like ringing effects. We also made a pitch-space example, where the analysis frequencies are spaced apart by !Interval rather than harmonic frequencies. Hope you have fun with it! IP: Logged | |
|
gustl Member |
WOW Thank you so much! That was exactly what I wanted and even more!I was thinking the whole day about the phase wrapping and my approach was quite similar: delay one sample, difference, etc. but I didn't get it right. The way you did it is very clever by compensating the large jumps and integrating the result - I wouldn't have come up with that. Best Wishes, IP: Logged | |
|
pete Member |
Hi SSC Interesting stuff. I notice if you set Interval to 1.0 and scale to -1.0 you get a clean re-synthesis but it doesn't last and drifts like an accumulative error. Putting in a hot parameter in the feedback of "Integrate to get scaled phase" delay means you can move it away from 1 then back to get another hit at the clean re-synthesis. Maybe it's because I'm running 6.87f4 and you guys are using a newer release (and not getting the problem)? Also if you change the !FreqLow in the last oscillator to !FreqLow2, you can have a different pitch shifter by off setting the two !FreqLows. Thanks Pete IP: Logged | |
|
SSC Administrator |
Thanks, Pete! When !Interval is set to one, there is probably a lot of overlap of the bins (signal appears in more than one). Yes, in theory, the Feedback on the Integrator should be a number very slightly less than 1. Changing the frequency of the resynth oscillator is even more interesting than changing the analysis frequency! IP: Logged | |
|
gustl Member |
Just found this and it really helped me to understand what's going on: http://pcfarina.eng.unipr.it/Differentiation-Integration.htm IP: Logged | |
|
gustl Member |
One thing I still don't understand: Why is MaxMI of the Oscillator set to "Double pi * 4 * ?VoiceNumber" ? Also today I tried to build a Phase Vocoder using FFT. See the attached Sound for the result. I don't think it's working right but at least you can understand the resynthesized voice Greetings from springlike vienna, [This message has been edited by gustl (edited 23 April 2014).] IP: Logged | |
|
johannes Member |
hey gustl, i would love to hear and see your phasevocoder patch but when i try to run it i get an ciao and thanks, johannes [This message has been edited by SSC (edited 23 April 2014).] IP: Logged | |
|
SSC Administrator |
Hi Gustl, Could you please re-save and re-post your Sound? There is something wrong with the one you posted. Thanks! IP: Logged | |
|
gustl Member |
Seems like something went wrong during the upload... Anyway, I will post the Sound again tomorrow! ![]() Oh, and still I don't know why there is Double pi * 4 * ?VoiceNumber... [This message has been edited by gustl (edited 23 April 2014).] IP: Logged | |
|
gustl Member |
![]() Enjoy! IP: Logged | |
|
johannes Member |
iam very curious if there is a way to do phasevocoding (via fft) without using n replicated oscīs. i guess a oscillatorbank with phase access for each osc would be great for that
cioa, j [This message has been edited by johannes (edited 24 April 2014).] IP: Logged | |
|
gustl Member |
Hi Johannes, I'd rather use the "normal" spectral analysis then. The reason I wanted to do this was to get rid of the oscillatorbank and gain access to single oscillators. But anyway, I think this is possible: You have to generate a spectral signal like you get when doing the spectral analysis. By doing the square root of the sum of real and imaginary parts of the fft you extract the amplitudes. Similar as I did for the PVoc but you don't need to split and sample & hold. You should end up with a fft size sample long repeating frame where each sample contains the amplitude of its corresponding bin. Then you can use a syntheticSpectrumFromArray to generate the frequency signal. As you probably know these are number of bin * samplerate / fft size. Don't forget that the FFT's first frequency is always 0 (DC) because the bins for e.g. a 512 sample FFT are numbered from 0 to 511. IP: Logged | |
|
johannes Member |
hey gustl, ...not in front of my paca now, too (until sunday) anyway, lets see if i get the point: instead of the inverse fft i can use oscbank, fed with the converted amps (left leg), right? after creating the freq-bins via syntheticSpectrumFromArray with something like ( i-1 * ((sr/2)/(fftsize/2)) there is an extra step needed, i suppose. we will have to "fine-tune" the oscīs in the oscbank. otherwise the freqs are quatized to 256 frequencies in the spectrum. (i guess that we have to add/subtract the phases or a phase related value to/from the binfreqs in order to get the right tunings) btw: how to do the overlap of the fftframes? thanks for your input! [This message has been edited by johannes (edited 24 April 2014).] [This message has been edited by johannes (edited 24 April 2014).] [This message has been edited by johannes (edited 24 April 2014).] IP: Logged | |
|
gustl Member |
Right! You can extract the true frequency from the FFT by using the derivative of the phase but there's no need to do that - instead use the Spectral Analysis tool or the LiveSpectralAnalysis prototype. I doubt that me or you will come up with a better algorithm than SSC IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() |
|
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.