Minor AIFF bug

Discussion forum for Amadeus users

Moderator: Martin Hairer

Post Reply
bob38
Posts: 3
Joined: Sat Jan 11, 2014 4:54 am

Minor AIFF bug

Post by bob38 »

Hi,

Thanks for Amadeus!

I seem to have found a minor bug which I don't need fixed because I have a workaround. I post the bug here so others know to watch out for it. However, you'd probably never notice unless you're taking Amadeus's output and processing it further with some other software, like I am.

My setup: Amadeus Pro Version 2.1.5 (1563), Mac PB 17" Intel, Mac OS X 10.9.1

The bug: when Amadeus saves an AIFF file it seems to add 4 samples of silence (zeroes) at the beginning, and effectively deletes the last 4 samples of good data. I've tested only mono, 16-bit, 44.1 KHz, AIFF.

Details: the first 4 samples of added silence make the saved AIFF file 8 bytes longer than it should be, but since the numSampleFrames field of the COMM block is correct (or would be correct if there were no added silence), the last 4 samples are effectively deleted. So the beginning of the file is 4 samples too long, and the end is 4 samples too short.

Best regards,
Bob38

User avatar
Martin Hairer
Site Admin
Posts: 1975
Joined: Wed Nov 08, 2006 11:49 am
Contact:

Minor AIFF bug

Post by Martin Hairer »

Hi, I have tried to reproduce this and had no success. Could you please send me a sample file and *precise* step-by-step instructions on how to reproduce it? Thanks,

Martin

--
HairerSoft
http://www.hairersoft.com/



_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list

bob38
Posts: 3
Joined: Sat Jan 11, 2014 4:54 am

Post by bob38 »

Martin,

How do I send you a file?

Sorry, this is all I have time for right now. I'll get back to this tomorrow (Sunday).

With the instructions below, I reproduce half the problem: the incorrect beginning silence samples are there, but the file size is fine. Tomorrow I'll recreate for you the file size problem, too.

1. Launch Amadeus Pro Version 2.1.5 (1563).
2. Select menu: File / New Sound Document
3. Select menu: Tracks / Split to Two Mono Tracks
4. Single-click-select top track.
5. Select menu: Tracks / Delete Track
6. Select menu Effects / Generators / Waveforms
7. In window "Simple Waveform Generator" choose:
Duration: 0.01 sec
Frequency: 440.00 Hz
Amplitude 75%
Type: Triangular
8. Select menu: File / Save As
9. In popup save window choose:
Save As: tri.aif
Format: AIFF
In poppopup window "AIFF Settings" choose:
Compression: Uncompressed
Bit Depth: 16 bit
10. Save
11. View file tri.aif in hex editor, e.g., emacs in hexl-mode.
12. Note that emacs shows the first 4 samples are zero (bytes \x002F through \x0035, offset from the beginning of the file), which is incorrect, because tri.aif as it appears in Amadeus does not start with silence samples; instead, it starts with a high negative number, \xA000, consistent with the selected amplitude of 75%.

Thanks,
Bob

User avatar
Martin Hairer
Site Admin
Posts: 1975
Joined: Wed Nov 08, 2006 11:49 am
Contact:

Minor AIFF bug

Post by Martin Hairer »

See the AIFF specifications at

http://www-mmsp.ece.mcgill.ca/Documents ... FF-1.3.pdf

in particular the description of the SSND chunk on page 10. You see that the 8 first bytes of that chunk are *not* sound data but an offset and a block size, which are mostly disused nowadays and therefore set to 0. As far as I can see the file is correct. Any software that would delete the last 4 samples and replace them by 4 samples of silence at the beginning would misinterpret the AIFF specifications. Regards,

Martin

--
HairerSoft
http://www.hairersoft.com/



_______________________________________________
Amadeus forum mailing list
Unsubscribe / change settings at http://two.pairlist.net/mailman/listinfo/forum_list

bob38
Posts: 3
Joined: Sat Jan 11, 2014 4:54 am

Post by bob38 »

Martin,

Thanks for your explanation. You're completely correct; the problem is not in Amadeus; my software is indeed misinterpreting the AIFF spec.

Thanks again for such a great product.

My apologies for the extra work I caused you,
Bob

Post Reply