I am performing some tests with files from an envelope-preserving frequency division receiver (Bat detector).
Spectrogram analysis is very easy with Audacity, but obviously the frequency scale is relative to what is recorded.
At the visualization level, is it possible to expand the frequency axis by a fixed factor equal to that used in the receiver to have a direct match with the signal picked up by the microphone ?
I’m not sure exactly what you mean, but I think you may be able to get the result that you want with resampling. Could you give an example (with Hz / kHz values) to illustrate what you have and what you want?
Such audio files are compressed in the frequency domain by a fixed factor N (i.e. a pure CW tone of F Hz is transformed in a tone with a frequency F/N), but the time axis is not modified.
If I record a pulsed waveform with a frequency divisione receiver all the time-domain parameters are preserved (pulse length, etc.), but the spectrum is compressed.
The process compresses the original frequency spectrum so that a frequency span from fo [Hz] to f1 [Hz] becomes fo/N [Hz] to f1/N [Hz].
Taking a spectrogram of such a signal, the time axis is unmodified while the frequency axis shows the compression (if compared to the original source).
So, it’ could be useful (in the spectrogram view) to be able to change the frequency axis rescaling the span (expanding it by a factor N) without resampling the data. In this way the frequency axis should be representative of the original spectrum and some bioacustic analysis could be performed directly without too much calculations.
No, but you could make a duplicate copy of the track (for visualization purposes only), and pitch shift up by a multiplier of “N”.
Some issues to note:
The absolute highest frequency that can be represented digitally is half the sample rate. You must ensure that the track sample rate is more than double the highest frequency of interest.
If the highest frequency of interest is 80 kHz, then the track sample rate must be more than 160 kHz (160000 Hz). A commonly used sample rate above 160 kHz is 192 kHz, so this would be ideal.
To change the track sample rate, use “Tracks menu > Resample”, and select 192000 from the dropdown menu.
Note that resampling does not change the pitch, it just changes the number of digital samples per second.
2. Use the “Change Pitch” effect to shift the pitch back up by a multiplier of “N”.
This is a bit tricky as “Change Pitch” was designed for music / ‘normal’ audio rather than ultrasonics.
The maximum pitch change (in one application of the effect) is 400%, which increases the frequency x5 ( “N”=5 ).
The way that the percentage is calculated is:
((“New Hz” - “Orignal Hz”) / Original Hz) x 100
So, given that you know what “N” is, you can calculate the required percentage as:
(“N” - 1) x 100
If N = 10, then that’s 900% change, but that’s beyond the range of the effect, so you need to use at least 2 passes of the effect.
So you could apply the effect once to increase by x 5 (400%), and then again by x 2 (100%).
Pitch stretching is imperfect, and the greater the amount of stretch, the greater the amount of distortion.
I expect that you will need to use the “high quality stretching” option (see: https://manual.audacityteam.org/man/change_pitch.html), because the faster algorithm will probably be too echoey.
The actual (ultrasonic) sound in the new track will only be a very rough approximation of the original sound made by the bats. Bat detectors introduce a huge amount of distortion, and the huge pitch shift adds more.