MP3 I/O

Discussions for GoldWave plug-in development

MP3 I/O

Postby eojeda1375 » Tue Dec 13, 2016 3:34 pm

Hi !!!

I intend to develop an algorithm to process MP3 audio packets. I am not interested in processing MP3 tags or any other MP3 data besides audio packets.

Would it be possible to use GW's I/O already developed capabilities in a way that:

1.- I pass the path and filename to GW
2.- GW opens the MP3 and returns me an array of MP3 audio data packets of variable size
3.- I process those Audio Data Packets without modifying the array structure; only the contents of each packet
4.- I pass the array back to GW
5.- GW writes the output MP3 file

Thanks, Ed
eojeda1375
 
Posts: 2
Joined: Tue Dec 13, 2016 3:22 pm

Re: MP3 I/O

Postby GoldWave Inc. » Thu Dec 22, 2016 12:41 pm

GoldWave does not process or handle MP3 packets. It just passes binary data to the MP3 codec. It is the MP3 codec (such as LAME) that creates or figures out where the packets are.
User avatar
GoldWave Inc.
Site Admin
 
Posts: 3759
Joined: Wed Mar 10, 2004 6:13 pm
Location: St. John's, NL

Re: MP3 I/O

Postby eojeda1375 » Mon Dec 26, 2016 6:35 pm

Thanks for the reply. I understand what you say.

Question: when GW applies normalization or EQ to an opened MP3 file, I guess GW would have to process each audio data packet to accomplish normalization or EQ, right?

If correct, I would assume that GW, at certain points in the process of audio, must have access to individual audio data packets, right?

Or does GW also pass audio data packets to a third party piece of code that does normalization or EQ and returns the audio data packets with the updated result?

Thanks,

Ed
eojeda1375
 
Posts: 2
Joined: Tue Dec 13, 2016 3:22 pm

Re: MP3 I/O

Postby Moonmist » Tue Dec 27, 2016 4:44 am

I'm not a developer or anything like that, just a regular user, but I believe I know the answers to your questions and I'll answer them now, and then Chris (the developer) can correct me if I'm wrong on anything.

eojeda1375 wrote:Question: when GW applies normalization or EQ to an opened MP3 file, I guess GW would have to process each audio data packet to accomplish normalization or EQ, right?


No, it doesn't have to process any audio data packets in the MP3 stream because when an MP3 file is opened in GoldWave, the program first calls up the MP3 codec (whichever is installed on your computer, usually LAME) to decompress the stream to a temporary file (not a .wav file but a .tmp file that has a special header that GoldWave reads) with IEEE 32-bit Floating Point, Signed, Little Endian, PCM format (with the same sample rate as the input MP3 file). GoldWave actually does this to every single file that is opened I believe, so GoldWave does all it's work in 32-bit Float PCM format, never touching any packets, just the raw PCM samples of the decompressed temporary file that the codec created.

It is then that the program does all the processing on the temporary .tmp file, and it works with the 32-bit Floating Point PCM samples directly. If you were to save it, the program would once again call up the MP3 codec, this time to encode the processed Floating Point PCM data back to MP3 format using the same codec that was used to decompress it I believe. Since the processed temporary PCM file would have the original MP3 artifacts as were in the input MP3 stream, and encoding it again would add new artifacts, this process should ideally be done by clicking "Save as..." and not "Save", and then save it to a new MP3 file and do not overwrite the original one (which clicking "Save" would do. So keep that in mind! :wink:)

If correct, I would assume that GW, at certain points in the process of audio, must have access to individual audio data packets, right?


No, it only accesses the raw PCM samples of the temporary 32-bit Floating Point PCM file that the codec created when it decompressed the MP3 stream, when the MP3 file was first opened.

Or does GW also pass audio data packets to a third party piece of code that does normalization or EQ and returns the audio data packets with the updated result?


Once again no, the only thing that ever works with the audio packets is the MP3 codec installed on your system when the MP3 file is first opened. The MP3 codec decompresses it to a temporary IEEE 32-bit Floating Point PCM file and GoldWave then does all it's work with that file. GoldWave does all the normalization, EQ, and other processing with either it's own internal effects or with a third party module (like the DX, VST, and GWAmp modules), but whatever module is used, all the processing will be done on the temporary Floating Point PCM file and not the MP3 file itself.

Hopefully this clears things up for you... I would advise you come back to this thread again though at some point because Chris (the developer) usually always replies eventually, and he would be able to correct anything I said that was incorrect (if anything). I'm not trying to speak as the developer of the program, I'm just a regular user who is pretty confident they understand what GoldWave is doing. It's the Holidays right now and Chris might not reply for a while so I'm just replying so that if you come back to this thread before he replies, you'll have something to go by in the meantime until he does eventually reply. Cheers! :D
Moonmist
 
Posts: 30
Joined: Sat May 16, 2009 1:54 pm
Location: The Milky Way Galaxy


Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest

Google Ads

Keywords: sound editor, song editor, audio editor, sound converter, sound recorder, itunes, mp3, cassette, tape recording software, vinyl, LP, restoration, noise reduction, clean, filter, visual, speech