1. Join Now

    AVForums.com uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Room Acoustics, WAV’s, FFT’s & Excel.

Discussion in 'Home Cinema Speakers' started by pwiles1968, Aug 30, 2003.

  1. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    I have been toying with ideas of ways to get plots of frequency curves for room acoustics, I have ways to get high quality WAV recordings, what I need is a program (something Free) that will perform an FFT analysis of the WAV and output the results into Excel I have some that will do the analysis but not the Excel Bit.

    Therefore all I then need to do is Play Pink noise on my system Record 30-60 seconds and do the analysis on the WAV, Hey presto a room curve:smashin: , I can keep it in excel do some room changes and compare the original curve with a new curve, no messing with meters and loads of sign waves.

    All I need is a suitable program to do the FFT and Excel conversion, anyone have any suggestions.:lesson:

    I felt Speakers & Subs was as good a place to put this thread as anywhere but feel free to move it.
     
  2. Nic Rhodes

    Nic Rhodes
    Well-known Member

    Joined:
    Mar 23, 2001
    Messages:
    17,133
    Products Owned:
    0
    Products Wanted:
    1
    Trophy Points:
    133
    Location:
    Cumbria
    Ratings:
    +1,277
    doesn't Excel do FFT? I am sure I have used it in the past
     
  3. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    It looks like it might do it on a range of data not sure how to convert a Wave file into the appropriate Excel Data, I am sure there must be a simple program that will give me the FFT as an Excel output. Worst Case I will have to get someone to show me how to do it in Matlab or MTS means I cant get a quick answer at home.
     
  4. eviljohn2

    eviljohn2
    Well-known Member

    Joined:
    Jul 8, 2002
    Messages:
    7,529
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    86
    Location:
    Near London.
    Ratings:
    +208
    I'd have thought Excel would. You might have to add the data analysis toolpak or similar though as it's not installed automatically.

    Or use Maple, Matlab or similar if you can get hold of them.
     
  5. eviljohn2

    eviljohn2
    Well-known Member

    Joined:
    Jul 8, 2002
    Messages:
    7,529
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    86
    Location:
    Near London.
    Ratings:
    +208
    Just to confirm, FFT is possible in Excel.

    You need to have the Analysis Toolpak installed. You do this from Tools>Add-ins

    If you type "fast fourier transform" without the quotes into Excel help you should find the details you need.

    Let us know how you get on though since this is an interesting exercise which many of us may be able to benefit from!
     
  6. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    I got this bit last night I am unsure of how to get a WAV file into a data form in Excel so I can do the FFT, I will have to have a look later when the wife and kids go out and I can concentrate.
     
  7. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    No Luck I can Insert an Object (WAV) into a sheet but can not select it to do any sort of analysis, I can play the sound bite from the document which would be great for a presentation but no good for what I want to do, it is basically just a link.

    Back to work and see if I can get some Mat Lab training, and do the analysis there.
     
  8. Nic Rhodes

    Nic Rhodes
    Well-known Member

    Joined:
    Mar 23, 2001
    Messages:
    17,133
    Products Owned:
    0
    Products Wanted:
    1
    Trophy Points:
    133
    Location:
    Cumbria
    Ratings:
    +1,277
    keep us posted
     
  9. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    Ok been working on this a bit and it does not look too promising about finding a cheap (free) program that will do my export to excel, did find a program called SpectraScope but the Spectrum plots were not detailed enough for my liking. I am using the Cool Edit 2000 Spectrum Analysis as a point of reference.

    Here is what I have found so far that may be of use to members, the use of pink noise is not the best choice it appears to give some extra noise to the plot, a sweep appears to be better but both will give similar results , although I have not been able to overlay these plots it is quite easy to view them using Cool Edit 2000 Spectrum Analysis tool, it is ideal as you can use the cursor to pinpoint exact frequencies and you can do a screen dump to keep a view if you want to.

    I have attached some results from my front room, I used my Radio Shack Sound Level Meter as a Microphone taking the line out from this to a Creative Labs Jukebox 3 set to WAVE recording at 48kHz, I initially used Pink Noise (-10dB average Power) then used Sound Sweeps two of which I shall try and attach the first of which is a 4Hz to 125Hz sweep (this is quite useful on its own for testing subs as it is about 2 minutes long and playback time in seconds roughly equates to Frequency in Hz) the second sweep was the standard 20Hz to 20kHz. Both of these come off the Japan Audio Society Audio Test CD-1 and are recorded at –20dB.

    You probably will not see a lot on the plots due to the resolution required to get them attached here but I have found that my room has a nasty peak at 35Hz, I do not think I can get rid of this without changing the room round bummer I was happy when I did not know it was there, I did suspect it because it shows up a little on the THX bass drop test but I have not noticed it is not too much with music though. Well more justification to buy a sub-woofer I suppose
     

    Attached Files:

  10. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    And The 20 to 20k in Log Format.
     

    Attached Files:

  11. eviljohn2

    eviljohn2
    Well-known Member

    Joined:
    Jul 8, 2002
    Messages:
    7,529
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    86
    Location:
    Near London.
    Ratings:
    +208
    Well done Paul, at least you've got some results which do show some of the room characteristics.

    After some thought, I should imagine that the best packages for this will be those designed for electronic system design. Although I don't remember how (not been at uni for months, let alone studying electronics!) I believe a SPICE simulation may be of use. Perhaps someone else has access and can advise further.

    I know I've modelled circuits using this program before and been able to print out the results as a file and subsequently into Excel for analysis.
     
  12. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    I have access to Matlab, MTS sound analysis suite and Pro Tools at work I do need someone to show me how to use them though, I also have access to £25k of Head Acoustics Binaural recording Head, a bit like using a sledge hammer to crack a walnut though thought I might be able to find a simple solution and possibly one other forum members would have access to.

    Thank you for the suggestion though Keep Em coming.
     
  13. NicolasB

    NicolasB
    Well-known Member

    Joined:
    Oct 3, 2002
    Messages:
    6,036
    Products Owned:
    1
    Products Wanted:
    0
    Trophy Points:
    136
    Location:
    Emily's Shop
    Ratings:
    +659
    Shouldn't you be using white noise rather than pink?
     
  14. Nic Rhodes

    Nic Rhodes
    Well-known Member

    Joined:
    Mar 23, 2001
    Messages:
    17,133
    Products Owned:
    0
    Products Wanted:
    1
    Trophy Points:
    133
    Location:
    Cumbria
    Ratings:
    +1,277
    have you the three room dimensions and listening position? I will check out the 25 Hz thing.

    also why pink?
     
  15. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    I have gone from Pink Noise to a flat sweep, but pink noise is weighted to the human ear which as you know is not linear through the frequency spectrum, Pink noise is often used to derive the EQ of a room or as with my job a vehicle interior.

    The problem frequency is just under 35Hz, room dimensions are 7’10” High 12’4” wide and 16’ long the Speakers are diagonally opposite my seating position 13’ away. The right hand speaker is 31” away from the back wall and 14” from the side wall, the left hand speaker is 19” from the back wall and 39” from the side wall (this is a doorway to the side). I know the positions sound weird but the speakers are equal distance from my seat and have to be pushed to the right as the door is on the left, the room is better this way round because when it is rotated by 180° the rear speaker positions are highly compromised. Thanks for any Help.
     

    Attached Files:

  16. Nic Rhodes

    Nic Rhodes
    Well-known Member

    Joined:
    Mar 23, 2001
    Messages:
    17,133
    Products Owned:
    0
    Products Wanted:
    1
    Trophy Points:
    133
    Location:
    Cumbria
    Ratings:
    +1,277
    single point null is 35.3 Hz! I will have a better play when I have more time
     
  17. rob_w

    rob_w
    Guest

    Products Owned:
    0
    Products Wanted:
    0
    Ratings:
    +0
    http://www.trueaudio.com/rta_abt1.htm

    http://www.maxim.abel.co.uk/utilities.htm (link to wavetools..)


    Don't forget that unless you have a calibration file for the spl meter, the results are not particularly accurate.

    I use a behringer ecm8000 mic and the shark pre-amp into my sound card. True audio has a file for this mic, and can be upgraded to measure at 1/24 of an octave for
    $99 - I'll be ordering this soon.

    If you do a search on yahoo for spectrum analysers + freeware, you'll get loads of hits.

    The wavetools "specanalyser" is really great for being uncomplicated. Theres hardly any settings and this makes it very plug and play.


    hth

    Rob
     
  18. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    Rob – Thanks the trueaudio looks like it might do he job but not much point in me spending that much money on it when I can do it at work for free, let me know how you get on with it though and let me know if you can export the Fourier Transforms into an excel file?

    I am well aware the SPL requires a calibration file the jukebox probably is not the best A/D converter in the world either, I was using them as a quick and dirty test to see what I can do with the data, It is accurate at pinpointing the problem frequency but I am sure the amplitude is not that accurate, having said that the file I showed is fairly close as I can hear the peaks and nulls on the slow sweep.

    Beekeeper - Thanks for the help.
     
  19. rob_w

    rob_w
    Guest

    Products Owned:
    0
    Products Wanted:
    0
    Ratings:
    +0
    the true RTA software exports the results as a .txt file - freq then Db. Can excel make use of this ? (this from the free demo - only does 1 octave resolution)



    Rob
     

    Attached Files:

  20. eviljohn2

    eviljohn2
    Well-known Member

    Joined:
    Jul 8, 2002
    Messages:
    7,529
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    86
    Location:
    Near London.
    Ratings:
    +208
    If you copy and paste the whole lot straight into Excel (from the .txt file), there's a nice function that'll do what we want:

    Data>Text to columns

    and then we have the whole lot as a set of columns from which Excel can do the FFT using the data analysis toolpak I mentioned earlier in the thread.
     
  21. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    That’s it, but you need lot more than 1 octave I would have said 1/12 which is the 99 dollar option, Good to know it is available cheers guys. Let me know what you think of the package if you go for it Rob.
     
  22. rob_w

    rob_w
    Guest

    Products Owned:
    0
    Products Wanted:
    0
    Ratings:
    +0
    I'll probably order it when next months pay arrives. I'll let you know what I think of it.

    Rob
     
  23. Rob.Screene

    Rob.Screene
    Active Member

    Joined:
    Sep 29, 2001
    Messages:
    1,124
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    51
    Location:
    Berks, England
    Ratings:
    +45
    I'm interested in looking at using a room plot to assist how well I can get the integration of mains and subwoofer.

    I found two alternative products.

    DSSF3 http://www.ymec.com/products/dssf3e/details.htm
    This includes white, pink, sweep, pulse and tone generators. It was spectral, waterfall and scope views, etc.
    I installed and tried this today, initially used white noise, then pink noise, wasn't sure which to select and was confused, as I was getting a bass heavy weighting to the results, even with the sub off, something to do with c-weighting or A-weighting on the meter itself, as I had the RTA software set to flat (not A, B or C weighted). It crashed a couple of times on my WinXP/m-audio Audiophile 2496 pc.

    ETF5 http://www.etfacoustic.com/SoftwareOverview.html
    This product's site nicely mentions that a common Radio Shack SPL Meter can be used as the mic/pre-amp, up to 500Hz uncorrected and up to 5KHz with the supplied correction data file...
    "The Radio Shack SPL meter combines a microphone and a preamp (line level) that can be used to drive the input of a sound card at the line input (not the mic input). This is a perfectly good choice for a microphone to tune low frequency acoustics and see room reflections at higher frequencies. If this is the intended purpose of the software, then the low cost RS meter is all that should be used. A calibration file link for this unit resides on our site on the support page. This file makes the microphone roughly accurate to a dB up to about 5 KHz.
    If the purpose of the software includes equalization at mid & high frequencies, a calibrated microphone is recommended. The calibrated microphone & preamp on our site costs $250.00 USD, including delivery almost anywhere in the world. Its specifications are posted on the web site."

    I shall be trying ETF5 soon.

    One thing that confuses me, is that the meter has A-weighting and C-weighting positions, which do effect the output via the line-level connector.

    I'm not sure which test tone type I should best take a flat reading?

    cheers,
    Rob.
     
  24. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    If it was me I would use 'C' and 'Pink Noise' both are weighted to best represent the non-linearity of the human ear (they are not perfectly flat a perfectly flat EQ would actually sound quite dire). Try doing an FFT on a WAV file of pink noise and see what it look like, alternatively you could use a sweep instead of pink noise.

    I will have a look at the programs later and see what they are like.

    Edit – Just had a quick look at the specs and they are only 1/3rd octave analysers they will note give very good resolution, give it a try and see but I do not think they will be that accurate.
     
  25. NinjaBrewCommando

    NinjaBrewCommando
    Active Member

    Joined:
    Aug 15, 2003
    Messages:
    87
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    11
    Location:
    Detroit
    Ratings:
    +4
    Paul,

    I just saw the thread this morning and I had a spare five minutes so thought I'd see if I could help.

    We use Matlab/Simulink quite extensively and I checked out the basic signal processing capabilities (there are specific toolboxes for this kind of thing, but they aren't cheap).

    Getting a .wav file into matrix form looks trivial (see below for Matlab 'help' description) and obviously this is then easy to get in to .csv format. I seem to remember there is a toolbox that can go straight to Excel, but I think this uses a DDE link (prone to errors in my experience, but I am a bit pants at Windows code!:blush: ).

    As you know, gubbins like FFTs are the bread and butter of Matlab and this is then easy to achieve.

    If you had Simulink, you could create a model that read the workspace, did the FFT and any other processing you wanted and did some nice graphs.

    But...in the interests of sharing with the AV community, it may be possible to create either an .exe that did the .wav reading and the FFT, then do a small macro in Excel that read the file and did the graphing so that you could use it on any computer (I need to check the Matlab licence agreement first though - I can't afford to violate this sort of thing, as we work closely with the Mathworks) OR, there is a Matlab Compiler option that allows you to create Exce code/formulae, but I need to check on this further.

    I am quite snowed under with work at the moment (but have the advantage of being the boss having access to that t'internet all day), but if you are interested, I could look at this and see what I can come up with.

    With the right toolboxes, there are hundreds of options available. Depending on how much time/money you have you can do pretty much anything with Matlab/Simulink/RTW and the right hardware. If I get some time, I may do a little research into some CPUs/DSPs, as you could generating code for a low-cost target that could do auto-calibration etc. but I don't know enough about audio signal processing yet (in fact, next to bugger all:rolleyes: ), but I do know a little about embedded software.

    I am just getting into this AV lark and it's really interesting, so I would like to learn more and this seems like a good way:clap:.

    Neil.
    (Apologies for typos/confusion/indiscriminate smilie usage, but had to hammer this out quickly:hiya: )


    ==============================================
    Matlab Help file info:

    >> help wavread

    WAVREAD Read Microsoft WAVE (".wav") sound file.
    Y=WAVREAD(FILE) reads a WAVE file specified by the string FILE,
    returning the sampled data in Y. The ".wav" extension is appended
    if no extension is given. Amplitude values are in the range [-1,+1].

    [Y,FS,NBITS]=WAVREAD(FILE) returns the sample rate (FS) in Hertz
    and the number of bits per sample (NBITS) used to encode the
    data in the file.

    [...]=WAVREAD(FILE,N) returns only the first N samples from each
    channel in the file.
    [...]=WAVREAD(FILE,[N1 N2]) returns only samples N1 through N2 from
    each channel in the file.
    SIZ=WAVREAD(FILE,'size') returns the size of the audio data contained
    in the file in place of the actual audio data, returning the
    vector SIZ=[samples channels].

    [Y,FS,NBITS,OPTS]=WAVREAD(...) returns a structure OPTS of additional
    information contained in the WAV file. The content of this
    structure differs from file to file. Typical structure fields
    include '.fmt' (audio format information) and '.info' (text
    which may describe subject title, copy right, etc.)

    Supports multi-channel data, with up to 32 bits per sample.

    NOTE: This file reader only supports Microsoft PCM data format.
    It does not support wave-list data.

    See also WAVWRITE, AUREAD, AUWRITE.


    >> help fft

    FFT Discrete Fourier transform.
    FFT(X) is the discrete Fourier transform (DFT) of vector X. For
    matrices, the FFT operation is applied to each column. For N-D
    arrays, the FFT operation operates on the first non-singleton
    dimension.

    FFT(X,N) is the N-point FFT, padded with zeros if X has less
    than N points and truncated if it has more.

    FFT(X,[],DIM) or FFT(X,N,DIM) applies the FFT operation across the
    dimension DIM.

    For length N input vector x, the DFT is a length N vector X,
    with elements
    N
    X(k) = sum x(n)*exp(-j*2*pi*(k-1)*(n-1)/N), 1 <= k <= N.
    n=1
    The inverse DFT (computed by IFFT) is given by
    N
    x(n) = (1/N) sum X(k)*exp( j*2*pi*(k-1)*(n-1)/N), 1 <= n <= N.
    k=1

    See also IFFT, FFT2, IFFT2, FFTSHIFT.:blush:
     
  26. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    Cheers for the information, do not go out of your way as I have decided not to peruse this too much further I can get a rough idea of the curve in my room with the tools I have available and we have the tools at work to do it in depth if I want to go that way. However if you are anything like me you will end up looking at it anyway just out of curiosity.:smashin:

    I have come to the conclusion it is a bad I idea to check out the curve in your room unless you have the time patience and finance's to cure any problems you find, because once you find them and you will find some they will bug the hell out of you, even if you could not hear them before. It is probably better to live in ignorance.

    Anyway welcome to the world of AV, Like I said to a friend recently about parenthood it is one of the best thinks you could ever do and the worst! :rotfl: (it applies just as well to AV) You will love your system but at the same time you will never be happy with what you have and will constantly be looking for the next upgrade, but what the hell like parenthood I would not have it any other way :devil: (unless you can fix the lottery for me?)
     
  27. NinjaBrewCommando

    NinjaBrewCommando
    Active Member

    Joined:
    Aug 15, 2003
    Messages:
    87
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    11
    Location:
    Detroit
    Ratings:
    +4
    :smashin: You've got me sussed!

    Before I saw your thread I'd seen others that sparked my interest in this. I think I'll have a play around and see what I can come up with when I have time. Should be either great fun or really frustrating (but probably both).

    I'll be having a look at Radio Shack and RS for suitable mikes. Which one do you use - is it sensible money?

    Yep, just like the computer, graphics card, Fireblade, mountain bike, snowboard and all the other gadgets/toys I've ever had and wanted to modify and upgrade...must be a personality disorder :suicide:
    (Notice I didn't mention girlfiend in things I want to upgrade...just in case she reads this :nono: :devil: ...but modifying, hmmm well...)

    Neil.
     
  28. pwiles1968

    pwiles1968
    Active Member

    Joined:
    May 15, 2003
    Messages:
    773
    Products Owned:
    0
    Products Wanted:
    0
    Trophy Points:
    21
    Location:
    Leicestershire - England
    Ratings:
    +10
    I can't upgrade my girlfriend, I married her and apparently that automatically voids your warrantee, so I'm stuck with what I have.

    With respect to mic at home I just use the output of my Radio Shack sound level meter not that accurate but it is good enough to experiment with.
     
  29. ailean

    ailean
    Guest

    Products Owned:
    0
    Products Wanted:
    0
    Ratings:
    +0
    Was looking at wide range mics for testing and found these at Maplin;

    Professional Vocal Microphone (ZA29G) 40Hz-17kHz
    Mini Tie-Clip Microphone (L48AA) 20Hz-16kHz
    Electret Lapel Microphone (LG81C) 20Hz - 29kHz

    I presume using a condencing mic is okay as that's what most sound meters have and they do seem to have better ranges.

    The last one is interesting as it's the only full range mic I could find (on paper ;) ) but comes with an XLR connector and I'm not sure how to hook this up (only adapter I could spot at Maplin didn't seem to have the impedance range for this mic (BV52G)). It's been a long time since I used anything needing XLR. ;)
     

Share This Page

Loading...