AIFF-FIX |
|
AIFF-FIX
Program to verify and correct headers of AIFF audio files.
More English details below the German.
AIFF-FIX
Programm zur Prfung und Korrektur der Header von AIFF-Audiofiles.
½ 1998 Klaus Heyne
Anmerkungen zum Thema AIFF
Immer wieder gibt es Unstimmigkeiten in der Interpretation der Header
von AIFF-Audiofiles, was vor allem beim Austausch zwischen verschiedenen
Applikationen zum Ausdruck kommt.
Meistens geht es um die L„nge der Audiodaten, die Probleme bereitet. Im
Header von AIFF-Files gibt es mehrere Eintr„ge, aus denen ein
"Importeur" die entsprechenden Werte lesen bzw. errechnen k”nnte - laut
offizieller AIFF-Spezifikation sollte die Soundl„nge aber immer aus dem
"COMM"-Chunk mit dem entsprechenden Eintrag "Frames" abgeleitet werden
(L„nge in Bytes = Frames * Anz. der Kan„le * 2).
Programme, die die Datenl„nge aus dem "SSND"-Chunk entnehmen, vergessen
dabei meist, daž der "SSND"-Chunk neben den Sounddaten auch einen
Offset-Wert (inklusive der n”tigen Fllbytes) enthalten kann, um die
Sounddaten auf eine 512-Byte-Blockgrenze zu bringen. Genauso fehlerhaft
ist es, die Soundl„nge dem ersten, bergeordneten "FORM"-Chunk (oder gar
der Dateil„nge) zu entnehmen, da ein AIFF-File beliebig viele Chunks
beliebiger Gr”že enthalten kann und die gesammte Datenl„nge deshalb
keine Rckschlsse auf die L„nge der Sample-Daten zul„žt.
Auf der TOS-Plattform hat sich (wohl durch Cubase Audio) eingebrgert,
daž AIFF-Header 512 Bytes lang sind (wovon brigens nur meist 54 Bytes
fr Informationen dienen, der Rest sind Leerbytes), damit die Sounddaten
zur besseren Performance bei Datei-Operationen auf Disk-Blockgr”že
angepažt sind. Trotzdem sollte dies nicht vorausgesetzt werden, denn es
soll ja vorkommen, daž ein Datenaustausch zwischen verschiedenen Platt-
formen stattfindet. Aus diesem Grund lesen meine Programme AudioTracker,
WaveMaster und AIFFPLAY sehr sorgf„ltig die Daten im AIFF-Header und
laden nicht mehr Daten, als im "COMM"-Chunk angegeben ist.
Das Programm AIFF-FIX...
...analysiert den Header einer AIFF-Datei, und prft ob die Chunks
"FORM", "COMM" und "SSND" in Bezug auf die Dateil„nge stimmig sind.
Falls Differenzen auftreten, wird ein neuer Header mit korrekten Daten
aufgebaut. Obwohl es nicht im Einklang mit der obigen Ausfhrung zu
stehen scheint, wird hierfr die Dateil„nge als Maž benutzt, da AIFF-FIX
ja nicht "weiž", welche Headereintr„ge nun stimmen und welche nicht und
keine Sounddaten verlorengehen sollen. Daraus ergibt sich natrlich, daž
auf diese Weise nur AIFFs korrigiert werden drfen, die aužer Samples
keine anderen Daten enthalten (Anm.: Mir sind noch keine AIFFs unter-
gekommen, die andere Daten enthielten). Wenn AIFF-FIX Anpassungen vor-
genommen hat, erscheint eine entsprechende Meldung mit der Option den
neuen Header zu speichern.
ACHTUNG!
Da ein neuer Header aufgebaut wird, gehen Informationen, die in uner-
kannten Chunks stehen k”nnten (wie z.B. MIDI-Noten-Zuordung oder
Kommentare) verloren!
Das Ergebnis ist ein Header, in dem alle L„ngeneintr„ge aufeinander
abgestimmt sind. Ein solches File sollte von jedem AIFF-Importeuer
korrekt gelesen werden.
Natrlich bernehme ich keine Haftung fr irgendwelche Sch„den oder
Verluste, die durch das Programm entstehen k”nnten.
(Das bliche halt. Den ersten Versuch sollte man nicht unbedingt mit
einer unwiderbringlichen Abmischung, fr die man mehrere Wochen im
Studio gesessen hat, durchfhren!)
24.04.1998 Klaus Heyne
Again and again, there are disagreements in the interpretation of the headers
of AIFF audio files, especially when sharing between different ones
Applications are expressed.
Mostly it's about the length of the audio data that causes problems. in the
Headers of AIFF files, there are several entries that make up a
"Importer" could read or calculate the corresponding values - loud
official AIFF specification, the sound length should always be out of the
"COMM" chunk with the corresponding entry "frames" derived
(Length in bytes = frames * number of channels * 2).
Forgot programs that take the data length from the "SSND" chunk
most of the time, the "SSND" chunk has a sound as well as a sound file
An offset value (including the required fill bytes) may be included in the
To bring sound data to a 512-byte block boundary. Just as faulty
is it the sound length of the first, higher-level "FORM" chunk (or even
the file length), as an AIFF file any number of chunks
can contain any size and the total data length therefore
no feedback on the length of the sample data allowed.
On the TOS platform has been (probably by Cubase Audio),
AIFF headers are 512 bytes long (which is usually only 54 bytes)
for information, the rest are empty bytes), so that the sound data
for better performance in file operations on disk block size
are adapted. Nevertheless, this should not be assumed, because of it
should happen that a data exchange between different platforms
takes place. That's why my programs read AudioTracker,
WaveMaster and AIFFPLAY very carefully the data in the AIFF header and
Do not load more data than specified in the "COMM" chunk.
The program AIFF-FIX ...
... parses the header of an AIFF file, and checks if the chunks
"FORM", "COMM" and "SSND" are consistent in terms of file length.
If differences occur, a new header with the correct data will be generated
built up. Although not in accordance with the above embodiment to
stands for the file length as Maž, because AIFF-FIX
yes, do not know which header entries are correct and which are not and
no sound data should be lost. It follows, of course, that
In this way, only AIFFs may be corrected, other than samples
do not contain any other data (Note: I have no AIFFs yet
come containing other data). If AIFF-FIX adjustments are required
has taken a message appears with the option the
save new header.
ATTENTION!
Since a new header is being set up, information that
Chunks could stand (such as MIDI note assignment or
Comments) lost!
The result is a header in which all length entries are consecutive
are coordinated. Such a file should be from any AIFF importer
be read correctly.
Of course, I take no responsibility for any damage or damage
Losses that could be incurred by the program.
(The usual halt. The first attempt should not necessarily with
an irresistible mix for which you spend several weeks in the
Studio has done, perform!)
24.04.1998 Klaus Heyne
File |
Info |
Date |
SoundPool Updates |
aiff_fix.rar | SoundPool AIFF-FIX | 24.04.1998 |