![]() |
Forum Index : Microcontroller and PC projects : Has anyone written an audio spectrum analyzer in MMBasic?
Author | Message | ||||
al18 Senior Member ![]() Joined: 06/07/2019 Location: United StatesPosts: 228 |
I saw this post/video about an audio spectrum analyzer for the Color Computer and was wondering if anyone has written one in MMBasic https://sonicstate.com/news/2021/10/19/a-1981-computer-spectrum-analyser/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+SonicstatecomNews+%28Sonicstate.com+News%29 |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
That's rather nice! As far as I know no-one has done anything like that in MMBasic - possibly because none of the platforms support cassette save & load so there's no audio input. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
twofingers![]() Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1593 |
I think a good substitute might be an analog input? ![]() Kind regards Michael causality ≠ correlation ≠ coincidence |
||||
al18 Senior Member ![]() Joined: 06/07/2019 Location: United StatesPosts: 228 |
On YouTube Dave's Garage channel from yesterday titled Building the C64 Audio Spectrum Analyzer shows a C64 displaying the spectrum analyzer. The hard work of running a FFT for 16 channels is actually done by an ESP32 and the data is sent via serial port to the C64. |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
This is true... ![]() Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Depending on the device your are interested i using, FFT is your friend ![]() VK7JH MMedit |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
I never got my head round FFT. As far as I'm concerned it's a form of Magik. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
It sort of is... But... it turns out mathematically (*) you can represent any waveform as a sum of sine (or cosine) waves. Doesn't seem exciting but there's lots of maths that is applicable to such. You can transform and then untransform (take the inverse) to get back but in the middle do things like remove frequencies that must be noise. Now, theoretically an infinite sum of sines may be needed, but in practice we don't measure data (signals) exactly so short-cuts can be used (smaller numbers of sines, for example). It's actually fun (I'm a geek) to approximate a waveform (say a square wave) with a sine wave, then add in another, and so on, watching the result go from a sine to nearly a square wave. You have to use different sizes (amplitudes) of sines. (*) Fourier tends to get the credit FFT is just a fast version of the original (FT) idea. I'm skipping all the complicated clever stuff! John |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
404 not found error for me... Smoke makes things work. When the smoke gets out, it stops! |
||||
al18 Senior Member ![]() Joined: 06/07/2019 Location: United StatesPosts: 228 |
To find the video, just Google adrian's digital basement audio spectrum analyzer |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7937 |
I did a simple copy/paste of the entire link into a browser search bar. It wouldn't work as an actual link. Thanks John. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |