I’m looking for a technique/application/algorithm to slide the pitch of an auto file, but in a very specific way.
For example, I have an 60 second audio file sampled at 12000 which contains just a 700Hz sine wave and a 1200Hz sine wave. What I want is a new file, of the same length and sampled at the same rate which starts out at 700 Hz and 1200Hz and ends up at 710 Hz and 1210 Hz (and at the 30s point is 705Hz and 1205Hz). So I want the same frequency chance (in absolute, not relative terms) for all frequencies. I want to add between 0Hz and 10Hz to all frequencies, the exact amount added being a function of time. The file may contain multiple tones, not just two. I’d want the same absolute frequency shift for all frequencies. At time “t” each frequency would become “F+f(t)” where F is the frequency concerned and f(t) is some function of t.
The only way I can think of to do this would be to split the file into multiple short segments, then, for each segment, take the FFT, shift the FFT by a small frequency step, take the inverse FFT - then stitch all the segments back together. Even then you might have phase discontinuities where the segments joined. It might even be easier to do in the analog domaine then the digital using modulation and heterodyning.
There are lots of applications that will change the pitch of an audio file by a fixed percentage while retaining the same tempo, in fact Audacity does this very well. While this is close, it’s not quite what I want. I want an absolute, not relative, pitch change and I want to vary the pitch change as a function of time. All while keeping the same tempo.
I’m 99% sure there’s no simple existing application that will do this (if there is please tell me!), but I’d be interested in any thoughts/suggestions on how it might most easily be done.
That would indeed be the best way to generate a sliding tone or set of tones.
Unfortunately I need to slide the pitch of existing audio files which have multiple tones in them, while keeping the timing (tempo) unchanged. The slide has to apply the same frequency change to each tone (e.g. +5Hz), not by a percentage (e.g. 5%).
I wasn’t aware of the Nyquist programing language, so thanks for that link. There may be something there of use.
In that case you need to look for a “frequency shift” (rather than “pitch shift”) effect. Unfortunately I don’t know of one. It is possible to do frequency shifting with Nyquist, but it’s difficult (definitely not a “beginner” project).
Freqshifter looks interesting an might almost do what I need, but I couldn’t get the file from https://www.fullbucket.de/music/freqshifter.html to work in Audacity (2.1.3 or 2.2.2). I can move the .dll file from the zip archive to the plugin directory, I can see it in the enable/disable effects dropdown and I can click to enable it, but when I click on “OK” I get an error message that it failed to register and could not load the library.
You got it running OK in Windows? Which version of Audacity and windows. I’m running Windows7 (64bit) and have Audacity 2.1.3 and 2.2.2 installed.
The application is to compensate for doppler shift in digital frequency shift codes signals reflected from the moon. Audio shifts rates of up to 60Hz/minute are possible. By compensating for changing doppler shift rates, recorded signal decoding may be easier. The change in absolute doppler shift can be compensated for at RF frequencies, but if you have an uncompensated recording of the signal you’d have to do it at audio frequencies.
I’m just playing around a little to see if can be done with existing tools. I did get the 32 bit version of Frequency Shifter to run as an Audacity plugin. It sort of can be kluges to work for this application, but it does seem to introduce some distortions which can hinder signal decoding when S/N is very low.
Yes, doppler shift is a ratio, but I’m looking at the frequency difference in demodulated audio signals of autio signals used to modulate an RF carrier. The audio signals may be, for example at 1000Hz and 2000Hz, while the RF carrier may be 1000000000Hz. If that RF carrier is shifted by 5Hz, the demodulated audio signals (using the same local oscillator to down shift it) will be at 1005 Hz and 2005 Hz. The demodulated frequencies change, but the spacing between them doesn’t. To get them back to 1000Hz and 2000Hz need a frequency shift of 5Hz, not a pitch change of 0.5%
@ka1gt I’m not knowledgeable in most aspects of audio editing but,
are you trying to create a binaural beats effect?
I ask because I am interested in doing that.
A binaural beat is when you play a tone in the left ear and you play the same thing in the right ear, but the frequency is shifted a few Hz.
Left ear: steady tone of 100Hz
Right ear: steady tone of 110Hz
I’m actually looking to get more complicated than that. I want to take a music file, change it to mono. Then make a copy, shifted by 10Hz. I then plan to take them and make a stereo file where the left channel is unshifted and the right channel is shifted.