Shop OBEX P1 Docs P2 Docs Learn Events
Frequency Spectrum Graph on a VGA Monitor/ Code — Parallax Forums

Frequency Spectrum Graph on a VGA Monitor/ Code

Hello everyone.

My project consists of converting a Analog Audio speaker or Microphone Signal and converting it to a Digital signal. From there I wish to produce a Audio Frequency Graph Spectrum involving a Propeller Board to display onto a VGA monitor. similar to how shown below: spectrum_analyzer.png

I'm looking for Code sharing or perhaps some advice on Calculating the non-linear frequency graph to create the wave form.
Y-axis = Amplitude of Frequency: Db
X-axis = Frequency Range: 20Hz - 20Khz

Any help is greatly appreciated. -Joe

Comments

  • RaymanRayman Posts: 14,640
    I'd say it's a bit early to use P2 for real projects...

    You need a VGA graphics driver (that I don't think exists), a FFT calculation (that also doesn't exist), and a ADC unit or driver (that also doesn't exist)...
  • Do you want to do this on the Propeller 1 or the Propeller 2? You posted in the P2 forum, but the P2 hasn't been released yet.

    I would think it should be possible to do this with a P1.
  • cgraceycgracey Posts: 14,152
    This will all be easy when the Prop2 and Spin are done. For now, it's possible, but difficult.
  • Thankyou for the replies.

    I am new to the Parallax Hardware, however, the Parallax facility lies within walking distance from my residence, so naturally I wish to use them to drive the my VGA Interface.

    I am not fully aware of the product availability, but according to @cgracey it may be wise to wait until the Propeller 2 is released. This Project is in no rush to be completed.

    My concern mainly is with the FFT Calculation, which I'm not sure a simple Embedded Chip will be able to process in real time. I was planning on a Pic Axe application, for which i have the most experience in. I have found several different FFT algorithms broken into code, that can be processed within 26 bytes or less. Finding the fastest working one and implementing its full spectrum to the Display is where the hard part comes in.





  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2015-10-30 06:40
    Walking distance? Go directly to Parallax. drop in and have a chat. The natives are friendly.

    You just happen to be among the lucky few that can eliminate shipping charges.

    Heater is one of the Propeller FFT mavens that might help you out with Propeller 1 code. There has been some discussion of tweaking the VGA resistors to get the best possible color fidelity. The original Propeller Protoboard values were not quite right. But it is no big deal to get really nice VGA colors.
  • Heater.Heater. Posts: 21,230
    I have an FFT for the Propeller I here : http://forums.parallax.com/discussion/128292/heater-s-fast-fourier-transform/p1. It has been used successfully in audio projects on occasion.

    If you google for "parallax propeller fft" or "parallax propeller fourier transform" you should find another one. Sorry I forget who wrote it. I have no idea how they compare in speed and or ease of use. Mine is MIT licensed the other is GPL which may or may not matter to you.

    I'm sure one and/or the other of these will get tweaked for the PII when the time comes.

    I don't know how "real time" you want it but the Propeller can do a 1024 point transform in about 30ms. Will be interesting to see how the PII improves this.
Sign In or Register to comment.