Jump to content

Converting MP3/WAV to Hex and back

Krocket

If you take a random MP3 from your music and open it using Notepad++ (just like many programs that weren't meant to be opened this way) it'll open up displaying all of its ASCII. Is there a way for me to convert an MP3 file (or .wav since MP3 is lossy* where .wav isn't) into editable Hex or binary? I'd like to see how it's all done and maybe create some little sounds from scratch.

 

See Modulation on this Wiki page. Although I know this is unconventional and not very efficient I'm doing this to see how things like a human voice can be represented in code.

 

Creates a hit song by mashing 1 and 0 on his keyboard.

Link to comment
Share on other sites

Link to post
Share on other sites

If you take a random MP3 from your music and open it using Notepad++ (just like many programs that weren't meant to be opened this way) it'll open up displaying all of its ASCII. Is there a way for me to convert an MP3 file (or .wav since MP3 is lossless where .wav isn't) into editable Hex or binary? I'd like to see how it's all done and maybe create some little sounds from scratch.

 

See Modulation on this Wiki page. Although I know this is unconventional and not very efficient I'm doing this to see how things like a human voice can be represented in code.

 

Creates a hit song by mashing 1 and 0 on his keyboard.

since when is mp3 lossless?

Linus Sebastian said:

The stand is indeed made of metal but I wouldn't drive my car over a bridge made of it.

 

https://youtu.be/X5YXWqhL9ik?t=552

Link to comment
Share on other sites

Link to post
Share on other sites

since when is mp3 lossless?

Sorry meant to say lossy*. Fixed it.

Link to comment
Share on other sites

Link to post
Share on other sites

Sorry meant to say lossy*. Fixed it.

http://www.brothersoft.com/binary-viewer-download-32474.html

 

 binary viewer can show hexadecimal values of an audio file.

 

6D2KEQu.png

Linus Sebastian said:

The stand is indeed made of metal but I wouldn't drive my car over a bridge made of it.

 

https://youtu.be/X5YXWqhL9ik?t=552

Link to comment
Share on other sites

Link to post
Share on other sites

i don't think it's doable to work with sounds looking at numbers, not really

 

edit: the big problem with mp3 isn't the fact that it's lossy, but the fact that it's compressed, so you're actually just reading numbers with no "audio" mean

but yeah, you just can't get any information by watching the numbers, a wave analysis would be much more interesting imo, so you can take a look at the frequencies of your voice and stuff

Link to comment
Share on other sites

Link to post
Share on other sites

You could (in principle) write a WAV file in Hex, no problem, since you're just writing LPCM values which correspond to voltage levels on the output analog signal. At 44,100 samples per second, though, it's unlikely you'll get much written by hand any time soon. You'll want to write a program to write the file for you. Generating an LPCM wave form is not necessarily too difficult depending upon the complexity you want.

Writing an MP3 ain't gonna happen, though... Well, you could if you worked it all out beforehand but it's really impractical and would take forever. You might as well write the WAV file and then compress it to an MP3 file.

I mean, editing preexisting compressed files isn't out of the question... I have cut and edited video files with Notepad++ (plus a Hex editor plugin) before... but you're not going to change the actual content, about all you can do is shorten the stream by cutting off the excess... perhaps edit some of the header information...

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×