And so the SoT was born...
#1
Posted 06 April 2012 - 02:30 AM
http://www.sparkfun.com/news/839
Basically, it’s an audio/visual representation of various network events and other stuff going on at Sparkfun. Anyway, this thing got me thinking that I could do something similar, however much simpler, with a Netduino.
Instead of just sitting around waiting for the PCBs for my USB Audio project to arrive, I decided to go ahead and make something with some of the parts I got laying around from various other projects now torn apart:
nic.JPG 120.71KB 41 downloads 10$ ethernet board (enc28j60) from China
1053.JPG 118.8KB 46 downloads vs1053b Sparkfun BOB (the old rectified version with a tiny wire on it)
mini.JPG 115.5KB 30 downloads Good ol' mini!
I stuck the trusty Netduino mini into a breadboard, dusted of my old 10$ NIC and mashed these up with the vs1053b breakout. Thanks to the benefits of code re-use, I was able to put something together in just a few hours and I came up with this thing called the “Sound of Things” or “SoT” for short.
http://www.youtube.com/watch?v=skD6u05YQqo&context=C4c01323ADvjVQa1PpcFPx3kEZIm1eXdKhZlCV2xwBJbUOw69HJnk=
The SoT transforms network traffic on my LAN into some kind of very bad music or at least a series of very annoying sounds. It spoofs my LAN for Ethernet frames sent back and forth and converts each packet it sees into a sort of “musical” representation in the form of MIDI commands.These MIDI portions are then sent to the vs1053b for playback in Real-time mode to be heard as weird sounds Here's a short mp3 recording of the output:
...and here's the full souce code:
SoT.zip 18.21KB 12 downloads
A short explanation of which can be read here.
It’s getting really late here but luckily, the vs1053b has a built-in headphone driver and so I could listen to the “music” without waking up the rest of the family In the video I had to stick the headphones to my iPhone so sound quality is lousy but in reality it’s actually quite good.
Possible next steps could be to improve visualization (eventually I'll get bored with that blinking led) with a 16x24 green led matrix that I haven’t found use for yet. Also, I could add a MIDI jack and hook it up to my wife’s digital piano which has really great sound.
yamaha.JPG 88.04KB 14 downloads
I’m not at all familiar with computer generated music or MIDI for that matter, but if any of you guys are, maybe you could help me in writing a more decent Ethernet-2-MIDI transform? The code is really quick and dirty right now but if anyone is interested in helping with this, I could clean it up for upload.
#2
Posted 06 April 2012 - 02:52 AM
#3
Posted 06 April 2012 - 03:27 AM
I was thinking maybe one could use this to "audiolize" all kinds of stuff, like electric consumption in your house or other weird things that could be fun to listen to. Maybe hook the headphone to line-in on a PC and use VLC to stream it onto the internet If I get a better transformation routine it could really become music. BlodeJazz actually sounds pretty ok!
#4
Posted 07 April 2012 - 12:00 PM
Enjoy the sound of my network
#5
Posted 07 April 2012 - 01:48 PM
#6
Posted 07 April 2012 - 11:23 PM
Very flattering but could be an insult to some people...and still there's more melody than most of the stuff by Depeche Mode..
Anyway, I've added the complete source code now. If you want to make your own MIDI transform, either change my EthernetEventPlayer class or implement your own derivate of the EventPlayer class and change the main program to use that instead. If you like, you could post your transform here and maybe I'll make a recording of it for you.
The code is your typical asynchronous producer/consumer construct using two individual threads. One of these reads off incoming Ethernet packages from the NIC and puts them in a queue of events. The other thread eats events off the queue, transforms them into MIDI which is then played by the vs1053b.
Btw, if you are more of a shield kind of person, there are lots of MIDI stuff out there. These are only some:
http://www.sparkfun.com/products/10587
http://www.sparkfun.com/products/10628
http://www.sparkfun.com/products/9595 (a real MIDI shield)
For input you could probably use any old Ethernet shield or what have you. Why not connect a hall effect sensor to the incoming mains cable of your home and "see" what that sounds like?
#7
Posted 10 April 2012 - 05:59 PM
24x16_LED.JPG 141.51KB 26 downloads 24x16 green LED matrix from China
I'm looking to use it for improved visualization. It's a bit tricky since it uses non-standard SPI bit length but should be far more interesting than just a blinking red LED
#8
Posted 13 April 2012 - 03:25 AM
I've updated the source code and rewired h/w to free some pins in order to make room for this:
24x16_LED.JPG 141.51KB 26 downloads 24x16 green LED matrix from China
I'm looking to use it for improved visualization. It's a bit tricky since it uses non-standard SPI bit length but should be far more interesting than just a blinking red LED
Hello Hanzy!
Did you make it working? I have one similar, by Sure Electronics as well, but I dropped sooner the attempt of interfacing directly.
Maybe there's some way to light the leds, but it will be slow. AFAIK, the only decent way is using some satellite MCU as helper.
Cheers
#9
Posted 13 April 2012 - 07:13 AM
Hi Mario! No, I haven't gotten that far yet so there's no code for it.Did you make it working?
Each led is addressable in a linear address space so I'm planning on using it like a framebufffer and transfer the whole series of 24x16 on/off bits in a single (or few) SPI write.
Also, I'm looking to use a synchronized double buffering scheme on the Netduino with a separate thread acting as a kind of RAMDAC responsible for refreshing the display while the "main thread" can freely draw stuff into the other buffer. The "RAMDAC" won't have a fixed refresh rate, rather it will only refresh when the main thread signals it's done.
Refreshrate will be slow...
EDIT: Here's the "datasheet" for my LED matrix:
http://www.sure-elec...1_Ver2.0_EN.pdf
The framebuffer would be 48 bytes and thanks to the so colled "successive write mode" it should be possible to transfer the whole buffer with a single 1 + 48 byte SPI write.
#10
Posted 13 April 2012 - 11:42 AM
#11
Posted 17 April 2012 - 01:43 PM
Will do!Anyway, if you're trying on it, let me know.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users