Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Reading JPGs as Sound - An Odd Question (http://www.programmingforums.org/showthread.php?t=12600)

formasfunction Feb 17th, 2007 10:00 AM

Reading JPGs as Sound - An Odd Question
 
I have a fairly odd question. A band I'm in is putting out a 12" vinyl record, a double LP in fact, but we've found ourselves with an extra side of a LP (we only needed three sides for music) and I was hoping to make creative use of it by filling it with sounds that, when fed back into a computer and run through a simple utility could be translated into images. A good example of what I mean can be found at http://vinylvideo.com/. For the sake of simplicity I was looking into static images rather than video.

Talking to a friend of mine with experience in streaming media, he said it might be possible by taking an image file like a jpg, stripping out the headers on each block and replacing them with the headers of a sound format. The result would be abstract and ugly but just might work.

I'm going to be honest, I have very little knowledge in this realm as I'm mostly a web programmer, but alas I think it would be a great art idea so I'm willing to embarass myself on a forum to at least see if it's plausible.

Thanks in advance for any help or redirection.

LOI Kratong Feb 17th, 2007 11:42 AM

There was a project posted on this site a few years ago (possibly by DaWei) which did this. There is a handy button in the top right corner labelled search. I may also have it on my computer - if you're lucky i'll dig it out...

DaWei Feb 17th, 2007 11:58 AM

Not Beethoven, but....

LOI Kratong Feb 17th, 2007 12:01 PM

Darn you beat me to it...

Anyhoo, just make sure you don't have your speakers turned up when you first play it!

formasfunction Feb 17th, 2007 12:35 PM

Thanks!
 
This is exactly what I need, thanks so much. I apologize for not finding it in my earlier searches, I wasn't quite sure what I was looking for.

DaWei Feb 17th, 2007 1:14 PM

"Beethoven" and "one .exe clapping" aren't exactly search terms you'd consider, right? ;)

formasfunction Feb 17th, 2007 7:00 PM

Translating back
 
So compiled that code (I'm on a mac but I don't suppose that mattered) and it worked perfectly on a tiff I sent it but now I'm wondering what the best way to translate the sound back into a picture would be. The problem will be that listeners will be pulling these sounds off of a vinyl record and back into their computer so I need a way to interpret the incoming data. How can I pull the relevant data out of the resulting analogue to digital wav file? Am I making any sense? Thanks in advance.

DaWei Feb 17th, 2007 7:55 PM

You don't have an analog file. You have a digital file tacked onto sound headers. The analog was generated by the player. Just remove the headers and recover the rest of the data; it's right there where you left it.

formasfunction Feb 17th, 2007 8:06 PM

Vinyl analogue
 
Well, the concept was to press the resulting sound onto a vinyl record and then allow people who buy the record to feed the sound into their computer, from their record player, and then use a small utility to convert the newly re-digitized sound (it could be limited to a specific sound type like a wav) back to an image. Thats, in part, what http://vinylvideo.com is doing, though I'm sure their method is quite different.

DaWei Feb 17th, 2007 8:11 PM

I leave that as an exercise for the reader (don't you just love to say that!) :D


All times are GMT -5. The time now is 2:01 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC