au files format specification
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
au files format specification
Dear All,
I'm new to this forum.
Does anybody know where one can download a specification of the structure of .au files in the data folder of an Audacity project?
I mean headers, data format and so on.
Thank you in advance
Federico Miyara
I'm new to this forum.
Does anybody know where one can download a specification of the structure of .au files in the data folder of an Audacity project?
I mean headers, data format and so on.
Thank you in advance
Federico Miyara
Re: au files format specification
As far as I'm aware the .au files are headerless one channel PCM audio. The bit format and sample rate is defined by the .AUP file.
Note that the .au files in Audacity projects are "Audacity data files" and not directly related to the "Sun Microsystems" format of the same file extension.
Note that the .au files in Audacity projects are "Audacity data files" and not directly related to the "Sun Microsystems" format of the same file extension.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: au files format specification
I've been trying to examine the contents of the .au file (sort of reverse engineering). In fact it has a header, it starts with sdn. (I guess it is short for "sound"), then the length of the header, then some information about Audacity, then the samplig rate, then the IEEE 754 32 bit floating point representation of min, max and rms declared in the aup (rms doesn't seem to be actually rms, I'm afraid). Then the same information is repeated except that rms is shifted 4 bits (multiplied by 16). Then there comes some unrecognized dark matterAs far as I'm aware the .au files are headerless one channel PCM audio. The bit format and sample rate is defined by the .AUP file.
However, this is the result of analyzing a few cases, so I'm not quite certain it is the whole story.
By the way, I need the format so as to be able to generate/read/analyze Audacity porojects with other software, particularly mathematical software such as Matlab, Octave or Scilab. Of course one could use the export/import feature, but I think it is better to do it directly.
-
kozikowski
- Forum Staff
- Posts: 69357
- Joined: Thu Aug 02, 2007 5:57 pm
- Operating System: macOS 10.13 High Sierra
Re: au files format specification
We warn people that Audacity is not a WAV editor but an audio production editor. Data sacrifices and deviations are tolerated in order to produce a pleasant sounding show. Scientists are routinely dismayed that sucking a show into Audacity and blowing the same show back out will not always produce a bit-accurate match.
Koz
Koz
Re: au files format specification
Here is the official (but very brief) documentation that I could find: http://manual.audacityteam.org/man/Glossary#au
To import into Matlab etc. it will probably be easiest to export as raw pcm.
What sort of analysis do you want to do?fmiyara wrote:By the way, I need the format so as to be able to generate/read/analyze Audacity porojects with other software, particularly mathematical software such as Matlab, Octave or Scilab. Of course one could use the export/import feature, but I think it is better to do it directly.
To import into Matlab etc. it will probably be easiest to export as raw pcm.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
Re: au files format specification
Thank you for that link. However, I agree that this information is too brief.
I need also to convert back and forth metadata information, such that one can get a wav file with cues and labels readable by other software such as cool edit or adobe audition, or read a wav file and include such metadata as labels in an Audacity project
I want, for instance, to get the audio, modify it and save it in the Audacity native format. Now I know how to retrive de samples, but I'm not sure that if I just save the output (modified) ones where I think they go, I always will get compatible au files.What sort of analysis do you want to do?
To import into Matlab etc. it will probably be easiest to export as raw pcm.
I need also to convert back and forth metadata information, such that one can get a wav file with cues and labels readable by other software such as cool edit or adobe audition, or read a wav file and include such metadata as labels in an Audacity project
Re: au files format specification
I think that being an audio production editor is not incompatible with being an excellent tool for any kind of sound processing, including scientific research and advanced measurement. However, I was simply asking for the technical specification of au files. I mean, for instance, something akin to the wav or flac or even the highly proprietary mp3 format that can be easily found on the web.We warn people that Audacity is not a WAV editor but an audio production editor. Data sacrifices and deviations are tolerated in order to produce a pleasant sounding show.
2) Would you please be more specific, providing some example of a transparent processing such as importing and exporting which yields a different result?Scientists are routinely dismayed that sucking a show into Audacity and blowing the same show back out will not always produce a bit-accurate match.
Re: au files format specification
Audacity works internally in 32 bit float format.fmiyara wrote:2) Would you please be more specific, providing some example of a transparent processing such as importing and exporting which yields a different result?
By default, when exporting to a lower bit format the output has dither applied. This is usually beneficial for audio work, but for detailed analysis work you may want to turn dither off, or export in 32 bit float format. Dither can be disabled in "Edit > Preferences > Quality".
Just out of interest - why?fmiyara wrote:I want, for instance, to get the audio, modify it and save it in the Audacity native format.
It would be much simpler to work in raw PCM format.
Audacity handles metadata in the .AUP file, not the .AU files.fmiyara wrote:I need also to convert back and forth metadata information,
Audacity handles labels in the .AUP file, not in the .AU files.fmiyara wrote:or read a wav file and include such metadata as labels in an Audacity project
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
kozikowski
- Forum Staff
- Posts: 69357
- Joined: Thu Aug 02, 2007 5:57 pm
- Operating System: macOS 10.13 High Sierra
Re: au files format specification
Audacity always does everything internally at 32-bit floating. Audacity defaults to Export Dither (noise) to help mask bit translation errors that might otherwise "add up" in an output show and produce audible distortion.
There is a technique whereby you import a "perfect" WAV (for example) show, set Audacity for that exact wav specification, turn dither off and export an identical show except for the filename and datestamp. But then, why bother?
This doesn't work with compressed file types like MP3 or m4a because they always become damaged in the transition through 32-floating. Audacity is not an MP3 editor.
Koz
There is a technique whereby you import a "perfect" WAV (for example) show, set Audacity for that exact wav specification, turn dither off and export an identical show except for the filename and datestamp. But then, why bother?
This doesn't work with compressed file types like MP3 or m4a because they always become damaged in the transition through 32-floating. Audacity is not an MP3 editor.
Koz
Re: au files format specification
Thank you all for the example and its solution.
I hope in a future to have all processing done inside Audacity, but for the time being, some processing must be done using specific software such as Matlab, Scilab or Octave. I find it cumbersome having to export and import audio in whatever format (wav, pcm) to have it available outside the Audacity environment, when a script out there could read and process an Audacity project and return a valid Audacity project.Just out of interest - why?
It would be much simpler to work in raw PCM format.
I'm aware of that. However, importing a WAV file with, for instance, cues or notes, doesn't result in the inclusion of cues as labels in the .AUP; and, conversely, .AUP labels are not exported to .WAV. Cues or whatever time-related marks are most interesting for measurement documentation purposes, musical analysis, phonetic analysis, bioacoustics, and so on.Audacity handles metadata in the .AUP file, not the .AU files.
Audacity handles labels in the .AUP file, not in the .AU files.