I tried copying the help file example for soundfiler, but my soundfiler keeps outputting the sample rate of the file, not the total number of samples read, unlike the example does and the documentation says it should.
(I know the output is not the total number of samples because I've used different files and it keeps outputting 44104.)
Can anyone see what I'm doing wrong?
By default,
soundfiler
has a maximum length to load. In the Pd console you will see the messagethat will alert you of the truncation. So
soundfiler
stops reading when it hits the max.To fix this, change your
read
message to include-resize
and in the properties of the array increase the size to like 400000000.Background info:
soundfiler
reads sound files to memory as fast as possible, it will not wait for other processes and therefore will stop audio playback and the GUI will be unresponsive for this time. To avoid unintended lock-up of Pd when loading a long sample this arbitrary limitation exists that the user can override.