Forums > MaxMSP

buffer~ sfinfo~ can't handle filename lengths > 127

June 2, 2010 | 8:19 pm

Just came across a problem with buffer~ and sfinfo~ and long (>127 char) filenames.

Specifically, when filename length exceeds 127 characters (not counting the .wav or .aif extension), the header number_of_channels chunk appears not to be read correctly.

The following works correctly, reporting a 44.1 kHz, 24bit, 2 channel file.

buffer~ replace test.aif
sfinfo~ open test.aif

——-
Fails:
Simply renaming the file to > 127 chars fails, reporting 0 channels. Varying the file name length above 128 chars has the effect of changing the reported number of channels seemingly at random.

Fails:
buffer~ replace test4567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567.aif

Fails:
sfinfo~ open
test4567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567.aif

MaxMSP Version 5.1.3 (41767)
OS X (10.6.3)

A colleague reports similar behaviour under Windows.

Attached is a 1 second aif file created in Soundtrack Pro that demonstrates the problem.

Workaround: limit filenames to 127 characters.


Viewing 1 post (of 1 total)