Author Topic: .mat file export sample rate errors  (Read 6049 times)

0 Members and 1 Guest are viewing this topic.

possum

  • Newbie
  • *
  • Posts: 8
    • View Profile
.mat file export sample rate errors
« on: November 23, 2011, 10:07:12 AM »
Hi,

I've saved a series of .MAT files from the FFT analyzer using the default settings and when I look at the data in Matlab I get sample rate errors.

Here is what MATLAB reports for sample rate from 6 files I read in from SSPro;

 case4_top_10v.Parameters.SampleRate
ans =
       48000
>> case4_top_9v.Parameters.SampleRate
ans =
       44100
>> case4_top_8v.Parameters.SampleRate
ans =
       44100
>> case4_top_7v.Parameters.SampleRate
ans =
       44100
>> case4_top_6v.Parameters.SampleRate
ans =
       48000
>> case4_top_5v.Parameters.SampleRate
ans =
       44100

The data looks correct when I assume a 48kHz sample rate.  Any reason why the MATLAB export would report the incorrect sample rate when saving to the structure ?

If I can provide more info please advise.

SignalScopePro, iPod Touch 4G, iOS 5.0.1 (9A405), Matlab 7.11.0 (R2010b), WinXP.

Thanks

possum

FaberAST

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
    • View Profile
    • www.FaberAcoustical.com
Re: .mat file export sample rate errors
« Reply #1 on: November 28, 2011, 10:48:05 AM »
possum,

Is the data properly presented in SignalScope Pro right before you save it to a MAT file? (i.e. Does the FFT analyzer present an upper band limit of 24 kHz and/or does the cursor position represent the frequency you would expect?)

Are you connecting/disconnecting any audio input devices (e.g. a headset mic or dock connector interface)?

Are any other apps running that might access audio inputs/outputs on your iPod?

Thanks,

Ben

possum

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: .mat file export sample rate errors
« Reply #2 on: November 30, 2011, 12:25:31 PM »
Hi Ben,

I just tried repeating the .mat file export with a speaker playing a 1kHz sine wave.  SSPro reported the correct frequency on the graph.  I exported a .mat file, and when I was returned to the FFT analyzer screen (which was still running), the sine wave frequency peak drifted down from 1kHz (presumably 44100/48000 * 1kHz).  I tried exporting that curve as a .mat and SSpro crashed on me.

Restarting SSpro, I could see the frequency was correct again, but I can no longer export a .mat file, as SSpro continues to crash each time I try. Even after clearing SSpro from the background and restarting the iPod Touch, SSpro seems insistent on crashing every time I try to export a .mat file.

I tried exporting to PDF with the same results, SSpro crashes after one successful export.  I was able to capture a screenshot of before and after a .mat export to highlight the 1kHz frequency peak oddity.



I was getting the same results with and without my external headset mic plugged in.

During this session today I was careful to not be running any additional apps, audio or otherwise.  This was confirmed by checking background processes by pressing the home button twice to bring up the background screen.

Let me know if you have any questions.

possum

possum

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: .mat file export sample rate errors
« Reply #3 on: January 02, 2012, 01:34:14 PM »
little bump for the new year.

In regards to your original questions:

Are you connecting/disconnecting any audio input devices (e.g. a headset mic or dock connector interface)? 

No

Are any other apps running that might access audio inputs/outputs on your iPod?

No

Just wondering if I can provide any more info on the Matlab export issues.

possum


FaberAST

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
    • View Profile
    • www.FaberAcoustical.com
Re: .mat file export sample rate errors
« Reply #4 on: January 03, 2012, 11:20:50 PM »
Thanks for the reminder.

I have tried this on an iPod touch 4G with iOS 5.0 and iOS 5.0.1 and I haven't been able to duplicate the sample rate change. I tested it with SignalScope Pro 2.0.3 and 2.0.4.

Are you running SignalScope Pro version 2.0.4? Does it make any difference if you remove it completely from your iPod and then re-install it?

Thanks,

Ben