Wavosaur home Wavosaur
Wavosaur free audio editor support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reading a WAV/MP3 file in order to draw an oscilloscope ?

 
Post new topic   Reply to topic    Wavosaur Forum Index -> Misc
 
Author Message
Cow



Joined: 23 Jun 2007
Posts: 2

PostPosted: Sat Jun 23, 2007 3:55 pm    Post subject: Reading a WAV/MP3 file in order to draw an oscilloscope ? Reply with quote

Hi guys,

I'm actually trying to update my Flash jukebox script and I'd like to have a very simple 'oscilloscope' of the playing mp3 file... I discovered yesterday how to read a wave file but I haven't really understood how to draw an oscillope (I read the file with PHP... not really as fast as Wavosaur, but it works Razz).

First, I'd like to know if I'm reading it correcty, if anyone could help me Wink :
- I read the header (works fine)
- Then each 2 octets of the data chunk (assuming I'm working on a 16bit mono file): 0x[O1][O2] => correct value is : 0x[O2][O1]
- I finally convert my hex value to dec, which gives me a number between 0 and 65 535.

Well, I read it should be a signed integer but in that case I always get negative values...

Am I correctly analyzing it ?


Finally, since my jukebox only plays mp3 files, could you give me a hint to read directly mp3 files ? I actually have to use your (wonderful) program to convert my mp3 files in wave in order to analyze them with my script... Tooks me quite a lot of time, yes :p


By the way, thanks a lot for your audio editor... quite nice, fast and above all, it's free :>


P.S. : I'm from Switzerland (french, not german if you were wondering), sorry about my english mistakes Surprised
Back to top
View user's profile Send private message
Rex
Site Admin


Joined: 05 Oct 2006
Posts: 796

PostPosted: Sat Jun 23, 2007 3:58 pm    Post subject: Reply with quote

Hi cow ! welcome to the forum.
If you know french you can post in the french section of the forum bigrin

http://www.wavosaur.com/forum/divers-f5.html

when the main developer will connect i'l sure he'll find some hints for you about the wav header !
Back to top
View user's profile Send private message
Cow



Joined: 23 Jun 2007
Posts: 2

PostPosted: Sat Jun 23, 2007 4:09 pm    Post subject: Reply with quote

Rex wrote:
Hi cow ! welcome to the forum.
If you know french you can post in the french section of the forum bigrin


Thanks, it just seems that the english section is more populated Razz

Quote:
when the main developer will connect i'l sure he'll find some hints for you about the wav header !

Er, rather about the data chunk, I got no problem with the wav header bigrin
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Wavosaur Forum Index -> Misc All times are GMT
Page 1 of 1

 
Other topics :





Powered by phpBB © 2001, 2005 phpBB Group