DSPRelated.com
Forums

frequency shifting (compressing?)

Started by kreuters March 14, 2006
kreuters wrote:
> hey everyone > > thanks for the posts, i shall reply below: > > >>If I follow you correctly, material on http://www.dspdimension.com/ >>should help. > > > yes, i had a look on this site, but i did not find anything that would > help me solve the problem, maybe need to check some more.
One of the techniques that Stephan teaches is pitch shifting, which I believe is exactly what you want to do. He shows how to shift pitches and formants together and how to shift pitch while keeping a singer's formants constant. In his examples, duration is unchanged. I'm not optimistic that the technique will work with small enough latency to be called "real time", but that's for you to decide. Here are some descriptions of some code that he has made available for download: DIRAC LE - Library plus example project DIRAC is a free cross-platform C/C++ object library that exploits the advantage of time-frequency transforms to build an algorithm for time and pitch manipulation that uses an arbitrary time-frequency tiling depending on the underlying signal... [read more] Pitch Shifting using the Fourier Transform - Source Code Explains how to do pitch shifting using the short-term Fourier transform. smbPitchShift.cpp contains the DSP code, there is also an example main() function implementation that illustrates how to call smbPitchShift() using the miniAIFF library calls... [read more] miniAIFF Library Implements a simple interface to read and write AIFF audio files. This library is a prerequisite for most of the example programs found on this site. Complete reference is also available, please use the below link. The library comes with demo projects for Microsoft Visual C, Codewarrior and Xcode... [read more] Download Tutorials as PDF Files From the below link you can download all the tutorials as individual PDF files for reading them offline. * "The DFT � Pied" Tutorial * "On the Importance of Formants in Pitch Shifting" * "Time Stretching and Pitch Shifting Overview" Tutorial * "Pitch Shifting Using the DFT" Tutorial ############################### I suspect that you will first shift the signals into the audible range using the techniques Stephan teaches (and gives code for), then reduce the sample rate to simplify the presentation. It may be possible to combine those operations to save some processing time, but implementing it first and making it efficient later would be my suggested course. It's always possible that someone will be moved to expose my ignorance by telling you how to do that right away. I hope so; that would be good for both of us. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������

kreuters wrote:

> am i correct in thinking that if i band pass filtered the stream between > 30 - 80 kHz, then took every eighth sample the audio would be aliased into > the audible range?
No, undersampling is not the nature of your problem. You wish to scale one base band down to fit in a smaller base band rather than just aliasing everything down in a circular fashion, which is what raw undersampling will do. This is a classic frequency scaling problem as discussed at dspdimension.com by Stephan Bernsee who is probably the leading authority in this area. It is a very difficult problem to do well because it doesn't have an analytic solution, just heuristic ones of varying quality. If I were you I'd contact Stephan about your application and see where he might point you. If there is a DX or VST plugin which can do a decent job of scaling down at 8:1 I suggest the use of Adobe Audition as the processing framework since it works seamlessly with arbitrary sample rates. I've long wondered about the very thing you are attempting. If you ever succeed in getting good results please come back here to share them. Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein