masterj
Newbie level 1
Hey guys!
For the past few hours I've been trying to find solution to my problem, but unsuccesfully.
The situation is this: I have transformed audio data to fft, found a peak value and then I need to find where it occurs in original data.
My script:
LOAD THE FILE:
TRANSFORM IT TO FFT:
FIND SOME VAL:
And now I need to find where in AUDIO_ARRAY1 my PEAK_VALUE occurs... Any ideas how to do this?
For the past few hours I've been trying to find solution to my problem, but unsuccesfully.
The situation is this: I have transformed audio data to fft, found a peak value and then I need to find where it occurs in original data.
My script:
LOAD THE FILE:
Code:
[AUDIO_ARRAY1 AUDIO_FS1] = wavread('AAA.WAV');
TRANSFORM IT TO FFT:
Code:
AMPLITUDE = abs(fft(AUDIO_ARRAY1));
AMPLITUDE = AMPLITUDE(1 : floor(NUMBER_OF_SAMPLES / 2)); % let's remove mirrored data
FREQUENCY = AUDIO_FS1 * (0 : floor(NUMBER_OF_SAMPLES / 2) - 1) / NUMBER_OF_SAMPLES;
FIND SOME VAL:
Code:
if max(AMPLITUDE) == 160
PEAK_VALUE = max(AMPLITUDE);
end
And now I need to find where in AUDIO_ARRAY1 my PEAK_VALUE occurs... Any ideas how to do this?
Last edited: