Home › Evil Mad Scientist Forums › LED Matrix Kits › Peggy 2.0 Audio spectrum analyzer
- This topic has 4 replies, 2 voices, and was last updated 10 years, 10 months ago by Windell Oskay.
Viewing 5 posts - 1 through 5 (of 5 total)
-
AuthorPosts
-
November 11, 2013 at 12:18 pm #20268jackluke23Participant
Hey,
Iv just ordered my peggy 2.0 and am in the process of thinking of some ideas to customize it. Would anyone have any ideas on how to turn the display into an audio spectrum analyzer?Any thoughts or ideas would be much appreciated.Regards, Jack LNovember 11, 2013 at 9:55 pm #21498Windell OskayKeymasterRunning the LED display takes a certain amount of CPU time, as would running spectrum analyzer code, so while I am certain that it can be done, I am not certain *how fast* it would be.
You might begin by looking at the Peggy2 library for Arduino and the existing FFT spectrum analyzer code out there; here’s an example that might be a good starting point to look at: http://blog.arduino.cc/2010/11/16/arduino-realtime-audio-spectrum-analyzer-with-video-out/February 27, 2014 at 10:30 am #21499jackluke23ParticipantHi again Windell,
Iv made some progress on the issue, mirror Peggy works very well and am delighted with it. At the moment im trying to display the input from my laptops microphone on my Peggy. I found this code which works well and clearly shows the different levels. Im just not too sure on how to modify it to send or mirror it to the Peggy, this is the code….import krister.Ess.*;FFT myfft;AudioInput myinput;int bufferSize=512;void setup() {size(532,400);frameRate(30);background(255);noStroke();fill(0);Ess.start(this);myinput=new AudioInput(bufferSize);myfft=new FFT(bufferSize*2);myinput.start();myfft.damp(.3);myfft.equalizer(true);myfft.limits(.005,.05);}void draw() {background(255);for (int i=0; i<bufferSize;i++) {rect(i+10,390,1,myfft.spectrum*-400);}}public void audioInputData(AudioInput theInput) {myfft.getSpectrum(myinput);}Any help you could give me would be much appreciated as always,Below is the link to where i found the code,February 27, 2014 at 10:58 am #21500jackluke23ParticipantI also found this video on Youtube of spectrum analyser working on the peggy, but i couldn’t find the code he used
February 27, 2014 at 1:56 pm #21501Windell OskayKeymasterIt sounds like you’re at a stage where you could take the data generated by the FFT program and make it so that you could put its data– instead of the data from the camera –in the data array that gets sent (1) to your screen and (2) to the Peggy in the Mirror Peggy sketch. And, that would be the most straightforward way to do so.
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.