buffer~ help file error

Mar 16, 2006 at 4:07am

buffer~ help file error

The help file for buffer~ seems to be incorrect in it’s documentation of the read message.

it states that “read foo.aiff 500 500″ will read all channels of the file foo.aiff for 500ms from 500ms into the file

When in fact it reads all channels of the file foo.aiff from 500ms into the file for 500ms

I suggest that the help file should be updated to give two values which are different and it should reference a file which actually exists (and is included in the standard distro of max) to aid the user in testing this message. I have altered the help file and it is included below.

Best,

John.

buffer~.help

max v2;
#N vpatcher 172 139 928 671;
#P origin 0 21;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 550 491 156 196617 waveform~;
#P message 658 474 48 196617 poke~;
#P message 658 457 48 196617 peek~;
#P message 550 440 56 196617 record~;
#P message 608 474 48 196617 sfplay~;
#P message 658 440 48 196617 cycle~;
#P message 608 423 48 196617 play~;
#P comment 505 408 194 196617 see also: Max Tutorial 3 , 12 , 13;
#P message 658 423 48 196617 wave~;
#P message 550 474 56 196617 sfrecord~;
#P message 608 440 48 196617 lookup~;
#P message 550 423 56 196617 groove~;
#P message 550 457 56 196617 2d.wave~;
#P hidden newex 608 515 64 196617 prepend help;
#P objectname phelp;
#P hidden newex 608 535 45 196617 pcontrol;
#P window setfont “Sans Serif” 18.;
#P comment 15 12 106 196626 buffer~;
#B frgb 26 8 57;
#P window setfont “Sans Serif” 9.;
#P comment 15 38 292 196617 Multichannel sample buffer;
#P user panel 10 8 400 50;
#X brgb 226 250 200;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P message 232 269 45 196617 clearlow;
#P newex 541 181 81 196617 prepend filetype;
#P button 436 222 15 0;
#P message 63 121 38 196617 import;
#P message 386 313 139 196617 read drumLoop.aif 500 1000;
#P message 422 272 60 196617 read 0 -1 1;
#P window linecount 2;
#P comment 633 201 62 196617 default int16;
#P user umenu 633 160 53 196647 1 64 176 0;
#X add int8;
#X add int16;
#X add int24;
#X add int32;
#X add float32;
#X add float64;
#X add mulaw;
#X add alaw;
#P user umenu 543 160 60 196647 1 64 176 0;
#X add aiff;
#X add sd2;
#X add wave;
#X add au;
#X add raw;
#P window linecount 1;
#P message 477 115 51 196617 writeraw;
#P message 478 94 43 196617 writeau;
#P message 478 73 55 196617 writewave;
#P button 147 189 15 0;
#P message 45 104 41 196617 replace;
#P message 28 84 51 196617 readagain;
#P message 261 117 49 196617 writesd2;
#P message 261 95 49 196617 writeaiff;
#P message 220 252 31 196617 clear;
#P flonum 53 213 43 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 31 266 55 196617 set george;
#P message 30 239 45 196617 size 500;
#P message 262 73 33 196617 write;
#P message 19 64 28 196617 read;
#P newex 53 151 104 196617 buffer~ helpbuf 1000;
#B color 5;
#P window linecount 2;
#P comment 93 75 97 196617 Messages for reading (see below);
#P window linecount 1;
#P comment 301 74 159 196617 save , select file format and name;
#P window linecount 3;
#P comment 161 145 360 196617 arguments are buffer name , optional filename to read or optional initial length in milliseconds , and optional number of channels (1 , 2 , or 4). The actual number of samples depends on the sampling rate.;
#P window linecount 1;
#P comment 78 240 166 196617 resize the buffer (in milliseconds);
#P window linecount 2;
#P comment 61 171 76 196617 ? double-click to see contents;
#P window linecount 1;
#P comment 92 267 100 196617 rename the buffer;
#P window linecount 6;
#P comment 22 292 345 196617 buffer~ works in conjunction with many different objects , including play~/groove~ (to play the buffer) , record~ (records into the buffer) , info~ (to report information about the buffer) , peek~ (to write into/read from the buffer like the table object) , lookup~ (to use the buffer for waveshaping) , cycle~ (to specify a 512-point waveform) , and wave~ (to specify a waveform).;
#P window linecount 2;
#P comment 99 209 305 196617 when clicking or dragging over a sample , left outlet reports the mouse position in milliseconds. Can be used for “scrubbing.”;
#P window linecount 12;
#P comment 22 369 267 196617 The read message takes several optional arguments. The first is a filename–if not present an open file dialog will be presented. The second is an offset into the file in milliseconds , the third is the size of the file to read in milliseconds , the fourth is the number of channels to read from the file. The default values for these arguments: offset is 0 , duration is the current size of the bufer (if you supply a negative argument for the duration , the file resizes the buffer to the specified duration , and a duration of -1 reads the entire file and resizes the buffer). The default number of channels is the number of channels in the file.;
#P window linecount 1;
#P comment 254 253 123 196617 set all sample values to 0;
#P comment 313 96 91 196617 save as AIFF file;
#P window linecount 2;
#P comment 312 113 140 196617 save as Sound Designer II file (Mac Only);
#P window linecount 3;
#P comment 298 369 201 196617 The replace message is the same as read except the buffer is always resized to the size of the data being read.;
#P window linecount 7;
#P comment 297 408 204 196617 The readagain message takes the same optional offset , duration , and number of channels arguments as read and replace , and reads from the most recently used audio file. The negative duration argument (or -1) resizes the buffer to the size of the data being read from the file.;
#P window linecount 1;
#P comment 166 191 345 196617 right outlet sends bang when buffer~ has finished reading/writing a file;
#P comment 539 73 100 196617 save as WAVE file;
#P comment 526 95 124 196617 save as NeXT/Sun format;
#P window linecount 2;
#P comment 533 114 155 196617 save in headerless format (buffer~ cannot read these files);
#P window linecount 1;
#P comment 528 144 206 196617 set file format and sample characteristics:;
#P comment 543 201 62 196617 default AIFF;
#P comment 422 250 118 196617 read message examples:;
#P window linecount 2;
#P comment 487 268 157 196617 read all of one channel of the file selected by an open file dialog;
#P comment 530 308 192 196617 read all channels of the file drumLoop.aif from 500ms into the file for 1000ms;
#P comment 505 369 196 196617 The import message decompresses MP3 files and the audio tracks of movie files.;
#P window linecount 1;
#P comment 454 223 125 196617 bang redraws the contents;
#P newex 633 181 89 196617 prepend samptype;
#P comment 283 269 100 196617 clear at low priority;
#P message 608 457 48 196617 buffir~;
#P hidden connect 2 0 28 0;
#P hidden connect 47 0 28 0;
#P hidden connect 46 0 28 0;
#P hidden connect 50 0 28 0;
#P fasten 29 0 28 0 24 145 58 145;
#P hidden connect 37 0 28 0;
#P hidden connect 48 0 28 0;
#P hidden connect 38 0 28 0;
#P fasten 31 0 28 0 35 257 21 257 21 145 58 145;
#P fasten 34 0 28 0 225 283 21 283 21 145 58 145;
#P fasten 32 0 28 0 36 283 21 283 21 145 58 145;
#P hidden connect 35 0 28 0;
#P hidden connect 36 0 28 0;
#P hidden connect 40 0 28 0;
#P hidden connect 41 0 28 0;
#P hidden connect 42 0 28 0;
#P hidden connect 30 0 28 0;
#P hidden connect 49 0 28 0;
#P fasten 51 0 28 0 237 287 21 287 21 145 58 145;
#P connect 28 0 33 0;
#P connect 28 1 39 0;
#P fasten 43 1 50 0 598 178 546 178;
#P hidden connect 66 0 56 0;
#P hidden connect 63 0 56 0;
#P hidden connect 64 0 56 0;
#P hidden connect 65 0 56 0;
#P hidden connect 61 0 56 0;
#P hidden connect 60 0 56 0;
#P hidden connect 59 0 56 0;
#P hidden connect 58 0 56 0;
#P hidden connect 57 0 56 0;
#P hidden connect 0 0 56 0;
#P hidden connect 68 0 56 0;
#P hidden connect 67 0 56 0;
#P hidden connect 69 0 56 0;
#P hidden connect 56 0 55 0;
#P fasten 44 1 2 0 681 178 638 178;
#P pop;

#24906
Mar 23, 2006 at 12:28am

On Mar 16, 2006, at 4:07 AM, Leafcutter John wrote:

>
> The help file for buffer~ seems to be incorrect in it’s
> documentation of the read message.

also i’ve been meaning to say that the little helpful hints when you
hover over an inlet or outlet are missing for the outlets of the
buffer~ object.
Jonathan Segel — 4014 Brookdale Ave. Oakland, CA 94619
MAGNETIC — http://www.MagneticMotorworks.com

#72671

You must be logged in to reply to this topic.