[mirtoolbox] Re: Question about fluctuation patterns

  • From: Olivier Lartillot <olivier.lartillot@xxxxxxxxxxxxx>
  • To: mirtoolbox@xxxxxxxxxxxxx
  • Date: Thu, 6 Aug 2009 13:19:07 +0300

Hi Igor,

Igor Vatolkin kirjoitti 3.8.2009 kello 15.51:

If I calculate fluctuation patterns:
--------
res=mirfluctuation(f);
resData=mirgetdata(res);
--------
- I get a matrix of 24*1903 values. I guess 24 is the number of bands, but I cannot understand where is the number 1903 from. It is not divisible by 231 at any rate. What I exactly want to know is which fluctuation pattern feature vector corresponds to which time window (or time period) from the original song. Is it possible?
The mirfluctuation operators computes the spectrum within each of the 24 bands separately. Each FFT here is 1903 samples long. Why? mainly because in mirfluctuation, the mirspectrum along bands is performed for the range 0-10 Hz and with a minimal frequency resolution of .01 Hz.

So these 1903 samples are calculated from the complete song? Is the number of bands constant? (E.g. for another wave I become only 23 bands..)

Yes, the 1903 samples are calculated from the complete song. The number of bands is constant, but will still vary depending on the original sampling rate of your audio file. I guess you obtained 23 bands for audio file with low sampling rate.

Since I want to extract FP data from different intervals of the complete music piece (e.g. for 10 second frames), I guess I should make something in this direction (please correct me if I'm wrong):

a = miraudio('test.wav');
f = frame(a, 'Length', 10, 's');
fluct = mirfluctuation(f);
peaks = mirpeaks(fluct,'Total',5);

However I do not get the exact amount of data which corresponds to N peaks x M bands x K frames (5x24x30, if 5 fluctuation pattern peaks from 24 bands for each of 30 10-second frames are calculated).

OK. Now I understand the problem. If you want a frame-decomposed fluctuation curve, showing the temporal evolution of fluctuation frame after frame, you can *not* use mirframe or the 'Frame' option. Why? because mirfluctuation already implies frame decomposition from the start, so mirframe will not toggle on the frame decomposition (already toggled on), but just control the frame parameters.

If you want to get the temporal evolution of fluctuation, here is the trick:

s = mirsegment('test', 0:10:100); % segmentation every 10 s. You can put any large number as last argument (100s, or whatever).
fluct = mirfluctuation(s);
peaks = mirpeaks(fluct, 'Total', 5);

Then you get a date of the desired form N peaks x K segments x M bands.

Notice: the graphical display of the results does not work due to a bug. I will look at the problem. Meanwhile, you can get graphical deplay if you use the 'Summary' option in mirfluctuation, i.e.:

fluct = mirfluctuation(s, 'Summary');

Regards,

Olivier


Other related posts: