Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 691547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:33:20+00:00 2026-05-14T02:33:20+00:00

So, I’ve been working on a little visualizer for sound files, just for fun.

  • 0

So, I’ve been working on a little visualizer for sound files, just for fun. I basically wanted to imitate the “Scope” and “Ocean Mist” visualizers in Windows Media Player. Scope was easy enough, but I’m having problems with Ocean Mist. I’m pretty sure that it is some kind of frequency spectrum, but when I do an FFT on my waveform data, I’m not getting the data that corresponds to what Ocean Mist displays. The spectrum actually looks correct, so I knew there was nothing wrong with the FFT. I’m assuming that the visualizer runs the spectrum through some kind of filter, but I have no idea what it might be. Any ideas?

EDIT2:
I posted an edited version of my code here (editor’s note: link doesn’t work anymore). By edited, I mean that I removed all the experimental comments everywhere, and left only the active code. I also added some descriptive comments. The visualizer now looks like this.

EDIT:
Here are images. The first is my visualizer, and the second is Ocean Mist.

my visualizer

ocean mist

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:33:21+00:00Added an answer on May 14, 2026 at 2:33 am

    Here’s some Octave code that shows what I think should happen. I hope the syntax is self-explanatory:

    %# First generate some test data
    %# make a time domain waveform of sin + low level noise
    N = 1024;
    x = sin(2*pi*200.5*((0:1:(N-1))')/N) + 0.01*randn(N,1);
    
    %# Now do the processing the way the visualizer should
    %# first apply Hann window = 0.5*(1+cos)
    xw = x.*hann(N, 'periodic');
    %# Calculate FFT.  Octave returns double sided spectrum
    Sw = fft(xw);
    %# Calculate the magnitude of the first half of the spectrum
    Sw = abs(Sw(1:(1+N/2))); %# abs is sqrt(real^2 + imag^2)
    
    %# For comparison, also calculate the unwindowed spectrum
    Sx = fft(x)
    Sx = abs(Sx(1:(1+N/2)));
    
    subplot(2,1,1);
    plot([Sx Sw]); %# linear axes, blue is unwindowed version
    subplot(2,1,2);
    loglog([Sx Sw]); %# both axes logarithmic
    

    which results in the following graph:
    top: regular spectral plot, bottom: loglog spectral plot (blue is unwindowed) http://img710.imageshack.us/img710/3994/spectralplots.png

    I’m letting Octave handle the scaling from linear to log x and y axes. Do you get something similar for a simple waveform like a sine wave?

    OLD ANSWER

    I’m not familiar with the visualizer you mention, but in general:

    • Spectra are often displayed using a log y-axis (or colormap for spectrograms).
    • Your FFT might be returning a double-sided spectrum, but you probably want to use only the first half (looks like you’re doing already).
    • Applying a window function to your time data makes the spectral peaks narrower by reducing leakage (looks like you’re doing this too).
    • You might need to divide by the transform blocksize if you’re concerned with absolute magnitudes (I guess not important in your case).
    • It looks like the Ocean Mist visualizer is using a log x-axis too. It might also be smoothing adjacent frequency bins in sets or something.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a bunch of posts stored in text files formatted in yaml/textile (from
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.