Audio to binary

All about graphics, sounds, etc...
Post Reply
User avatar
moudy
Technology Enthusiast
Technology Enthusiast
Posts: 688
Joined: 10 Feb 2009, 17:00
15
Location: Beirut, Lebanon

Audio to binary

Post by moudy »

Hey every one, how do you do ? :)
I have been wondering for a while, and really interested to know more atout this: Is there any possible way to view the binary data that an audio player interprets into sound waves ?
I was thinking that the same way text has a binary form, for example:
ascii ---> binary
"m" ---> 01101101
sound format (wav, mp3...)---> ???possible???

my inquiring mind wants to know, and if any one can interpret more... :D
also I was thinking the other way round, is is possible to change a binary string ( random ) into a audible file ? :roll: ( that would sound kinda alien language to me :lol: )

I know I come up with strange ideas some time :lol:
thanks for the provided information :wink:
mahmoud_shihab@hotmail.com

User avatar
lilrofl
Siliconoclast
Siliconoclast
Posts: 1363
Joined: 28 Jan 2009, 17:00
15
Location: California, USA
Contact:

Post by lilrofl »

Maybe I'm dating myself a bit here, but MIDI files are binary constructs into music.

Basic binary breakdown: Each 0 or 1 is a bit, 4 bits make a nibble and 8 bits make a byte.
moving right along...

In a MIDI file each 'digital word' is 10 bits (8 bits [1 byte] plus a start bit and an end bit)

When a 'digital word' is read the start bit and end bit are ignored (these are in place to let the program know where to start and where to finish) The bit at the far left is the most significant bit, while the remaining 7 bits are considered least significant bits.

(why they call 7 bits all the least significant is beyond me lol)

MIDI messages (or notes in this case) usually consist of a few of these bytes. The MIDI program reads the most significant byte, if it reads a 1 the byte is determined as a status byte while a data byte is a 0.

Channel messages are composed of status bytes that are followed by a data byte. Because data bytes start with a 0, there are 128 possible values to each channel, and each channel is one sound or 'MIDI note'

Sometimes channels contain another data byte, this stores information on how loud the sound is, a higher number is played louder.

For example:

MIDI Channel: 10010000 00111100 01110010
Hexadecimal conversion: 90 3C 72

So, status byte setting MIDI channel for data byte 3C (the 60th note) with a volume of 89.6% of maximum.

There is tons about MIDI files and programming, albeit a bit outdated... but I think it fits what you are looking for. I remember years ago a program that would make music from mathematical equations but it's name is lost to me... give a look though I'm sure you can dig up something =)

Hope this helps

EDIT: I found a MIDI key chart to help with understanding number to frequency.

Code: Select all

http://ftp.ec.vanderbilt.edu/computermusic/musc216site/midikeys.html

User avatar
DNR
Digital Mercenary
Digital Mercenary
Posts: 6114
Joined: 24 Feb 2006, 17:00
18
Location: Michigan USA
Contact:

Post by DNR »

someone is into SIGINT :wink:

DNR
-
He gives wisdom to the wise and knowledge to the discerning. He reveals deep and hidden things; he knows what lies in Darkness, and Light dwells with him.

User avatar
lilrofl
Siliconoclast
Siliconoclast
Posts: 1363
Joined: 28 Jan 2009, 17:00
15
Location: California, USA
Contact:

Post by lilrofl »

lol, and various other INTs'... what 8 years of military service will do to an otherwise normal individual I cannot explain XD

User avatar
DNR
Digital Mercenary
Digital Mercenary
Posts: 6114
Joined: 24 Feb 2006, 17:00
18
Location: Michigan USA
Contact:

Post by DNR »

normal people are discouraged from applying to suck-o - welcome lilrofl (for real this time ;) )

My fave lie from the military is MRE - Meal, Ready, To eat. For those that never tried MREs, they are NOT a Meal, NOT Ready, and To eat - is doubtful!

on topic:
maybe this?
CDP Spectral Pitch Data Information
(with Command Line Usage)
http://people.bath.ac.uk/masjpf/CDP/cptchinf.htm

Deciphering cyberspace: making the most of digital communication technology By Leonard Shyles
long url

http://www.synchrondata.com/pheaven/www/area26.htm

DNR
Last edited by DNR on 14 Oct 2009, 23:46, edited 1 time in total.
-
He gives wisdom to the wise and knowledge to the discerning. He reveals deep and hidden things; he knows what lies in Darkness, and Light dwells with him.

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Post by Gogeta70 »

DNR wrote:My fave lie from the military is MRE - Meal, Ready, To eat. For those that never tried MREs, they are NOT a Meal, NOT Ready, and To eat - is doubtful!
Lol, yeah you got that right. There are a few ok mre's out there, but they're rare (never,and i mean NEVER eat an mre omelette, it will possibly KILL you XD)
¯\_(ツ)_/¯ It works on my machine...

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

hehe, reminds me of the german equivalent to MREs: the EPA ("one-man package"):
http://www.bundeswehr.de/fileserving/Po ... a1_420.jpg


there are "yummy" variations like "italian pasta", "indian rice" and a couple more....but the fun thing is that ALL of them taste completely the same.. :lol:


I bet they make it like it is shown in a good old Louis de Funes movie:

User avatar
lilrofl
Siliconoclast
Siliconoclast
Posts: 1363
Joined: 28 Jan 2009, 17:00
15
Location: California, USA
Contact:

Post by lilrofl »

gogeta70 wrote:Lol, yeah you got that right. There are a few ok mre's out there, but they're rare (never,and i mean NEVER eat an mre omelette, it will possibly KILL you XD)
Funny knowledge... in Sapper school (probably the other ones as well) the bug eating training is induced by sending the teams into the field with a box of MRE omelettes

That's right... they coax you into eating raw bugs by offering you as many omelettes as you can eat... definitely speaks heaps about their appeal as a meal lol.

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Post by Gogeta70 »

Lol, wow, that's awesome. If i had to choose between the omelette and bugs, i would eat bugs too. :lol:
¯\_(ツ)_/¯ It works on my machine...

User avatar
moudy
Technology Enthusiast
Technology Enthusiast
Posts: 688
Joined: 10 Feb 2009, 17:00
15
Location: Beirut, Lebanon

Post by moudy »

lilrofl this a good sum of info you provided in your post :D
Im gonna dwell more on the topic :wink:
I'll also check all the provided links
thanks a lot every one for the help :)
mahmoud_shihab@hotmail.com

Post Reply