L / R Frequency Analysis
Reply #5 – 2008-08-08 02:14:17
@ Dynamic: i want to output the L/R freq. differences in the range < 1kHz over time in readable numbers. i tray with cool edit pro which is great, but the output result (ascii numbers) is freq/amplitude and not freq/time. i made for ex. 2 pure simple sqare waves which differ in 10Hz (440 - 450Hz) but i can't get any output, although it's simplified example. maybe i should try matlab or octave, but i'm not too familliar with audio analysis with both programs. It sounds like you don't want a spectrogram (I was thinking of plotting the Mean-Squared Difference frequency in the old fb2k spectrogram visualisation), but to make measurements of some frequencies (not so much from music, but other signals at audio frequencies). A square wave is far from simple in conventional terms, where one looks to find sinusoidal waves in the frequency domain as component parts. The 440 Hz square wave is composed of a 440 Hz sine, the third harmonic (1320 Hz sine at 1/3 the amplitude), the fifth harmonic (2200 Hz sine at 1/5 the amplitude), the 7th harm (3080 Hz at 1/7 the amplitude), etc... So the difference between the 440 Hz square wave in channel 1, and the 450 Hz square wave in channel 2, is 10 Hz for the fundamental sine component, 30 Hz for the third harmonics, 50 Hz for the 5th harmonic, etc. Furthermore, you could find the difference between the 1320 Hz and 450 Hz and report that (870 Hz). OK, you wanted less than 1 kHz, but then what about a 110 Hz square wave and its harmonics? You might simply look for the largest peak in each channel, which is hopefully the fundamental. The other problem is time versus frequency resolution. A long Fourier Transform window is required to obtain high resolution of frequency, which limits the number of independent time intervals and hence the time resolution. If you signal is simple enough, you may be able to remove any DC offset and look at zero crossings to measure frequency. In electronics, a Phase Lock Loop (PLL) can be used to generate a clock frequency (square wave) synchronised to clock edges in the signal. It might be possible to obtain a lock to the dominant frequency in similar fashion.