[SOLVED] Import raw file with multiple wave headers

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
Locked
Sprinterdriver
Posts: 47
Joined: Tue Jan 19, 2010 9:59 pm
Operating System: Please select

[SOLVED] Import raw file with multiple wave headers

Post by Sprinterdriver » Thu Jun 30, 2011 11:36 pm

Hi.

I have some raw audio files here that is really just several wav files that is joined, in adition to some extra metadata.
I know this because I tried to open the file in a hex editor. The header "RIFF" exists on multiple places in the file.

The first thing I tried was to use hex editor to find the first ocurrence of the header. Then extract the contents from there and to the end of the file. So I get a resulting file that is almost the same size, it does have a valid riff header AND its just several joined wav files.
When I open this file with multiple riff headers, then Audacity opens only the first sound.

That is, if file size is 20Mb, then Audacitu just reveals two second - the first sound.

Questin is: Can I extract the rest of the sounds using Audacity?
If not, is there possible other software that can do?

Thanks
Last edited by Sprinterdriver on Fri Jul 01, 2011 7:47 pm, edited 1 time in total.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Import raw file with multiple wave headers

Post by Gale Andrews » Fri Jul 01, 2011 1:45 am

The first RIFF header is still dictating the length of the file, so if you use File > Import > Audio the headers will be read and the file will only be deemed to be the length stated in the first header.

Use File > Import > Raw Data then the headers will be ignored for determining the file information (the headers will still present themselves as a visible and audible click). To avoid that, open the file in the hex editor and remove all the headers, or simply silence or delete the click in the imported raw data then export as WAV.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Sprinterdriver
Posts: 47
Joined: Tue Jan 19, 2010 9:59 pm
Operating System: Please select

Re: Import raw file with multiple wave headers

Post by Sprinterdriver » Fri Jul 01, 2011 3:13 pm

Hi. I think that wouldn't be successfull because, like you said - the first heeader determine the length.

Is there a way to obscure the header in a wav file so that the program doesn't know the length?

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Import raw file with multiple wave headers

Post by steve » Fri Jul 01, 2011 3:24 pm

Sprinterdriver wrote:I think that wouldn't be successfull because, like you said - the first heeader determine the length.
As Gale said, if you Import Raw, then the header data will be ignored and the entire file should be imported (with audible and visible clicks where the header data occurs).
Have you tried it?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Sprinterdriver
Posts: 47
Joined: Tue Jan 19, 2010 9:59 pm
Operating System: Please select

Re: Import raw file with multiple wave headers

Post by Sprinterdriver » Fri Jul 01, 2011 3:29 pm

steve wrote:
Sprinterdriver wrote:I think that wouldn't be successfull because, like you said - the first heeader determine the length.
As Gale said, if you Import Raw, then the header data will be ignored and the entire file should be imported (with audible and visible clicks where the header data occurs).
Have you tried it?
Yes. But for some reasons I got just ugly sound (suspect bit shift) for some of the wav files, when other sounds fine.

For those ugly ones, I doesn't succed to reveal the sound. I'll try a bit more

Thanks

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Import raw file with multiple wave headers

Post by Gale Andrews » Fri Jul 01, 2011 6:52 pm

Sprinterdriver wrote:I got just ugly sound (suspect bit shift) for some of the wav files, when other sounds fine.
If someone has concatenated WAV files that have different bit depths or sample rates then you could possibly Import Raw several times, adjusting the "Import Raw Data" settings each time to match each component file. Then cut and paste the correct part of each imported track to a new track and export the new track.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Sprinterdriver
Posts: 47
Joined: Tue Jan 19, 2010 9:59 pm
Operating System: Please select

Solved - using simple vbs script file

Post by Sprinterdriver » Fri Jul 01, 2011 7:43 pm

Hi.

I just like to say problem solved.

I found that windows vbs could read chunks of raw data as well as plain text. So I managed to make a vbs file to extract the wav files.

Too bad I did this in vbs. Should have choosen java. vbs is slooow.
It process the files about one third of play speed.


Thanks for your interrest.

Locked