Jules?fcluson wrote:Jules
thanks - let me have a go and I'll come back to you - really appreciate the help
No, have a look at https://ccrma.stanford.edu/~jos/
Anyway, that's irrelevant for now.
Let's simulate the first part of the method.
Our sample sound could be narrow-band noise (400 - 500 Hz) with a gradually rising sine burst (at 450 Hz).
Create a new track (e.g. silence) of 2 minutes duration.
Open the Nyquist prompt and enter the following code:
Code: Select all
(setf noise (notch2 (highpass8 (lowpass8 (noise) 500) 400) 450 10))
(setf burst (sim 0.5 (mult 0.5 (hzosc 2))))
(setf fade-in (pwl 1 0.1 1))
(print (linear-to-db (snd-sref fade-in 32)))
(print (snd-samples (linear-to-db (rms noise 2)) ny:all))
(sim noise (mult fade-in burst (hzosc 450)))You can now view/export the plot spectrum (Analyze menu) with Spectrum, Size 2048, Hanning window.
As you will see, the bins are at intervals of 2.5 Hz which is very convenient for further calculations.
If you copy the content of spectrum.txt into a spread sheet, you can easily see:
- The maximum is at $B$181. The lines above and below it have some high values too and would also be counted as "Tones" in the proposed procedure.