Children of Sample Length Limitation


#1

I tried to use a 2 min lenght sample in “Children of sample” patch and i couldn’t use more than the first 10 seconds. Is there any way of changing this? I’ve opened the patch but i’ve just seen [s dur] after [soundfiler]. I dont see where the limitation is on the patch?

I appreciatte your help!


#2

The sound file in this patch is opened by soundfiler and written to an array, which is just an area of RAM memory. The size of this array is dictating the max length. You can adjust this up to 90 seconds, but I think this is the maximum size (otherwise you have to stream the sound from disk which is a different process)

To adjust the length. Open the patch and click on the [pd load-sample] subpatch:

If you are running this on an Organelle you might notice the patch become sluggish. This is because it is drawing the sound in the array which takes a bunch of CPU (and which is why we put the array in a sub-patch that remains closed). Now control click or right click on the array and select Properties:

Then you can change the size in number of samples.

This number is the number of seconds times the sample rate (samples per second). It is 441000 which is 10 seconds at 44100 samples per second. You can try a higher number. One minute would be 2646000.


#3

Thank you very much for your deep explanation!!
I changed the array size and it worked, at least 90secs sample lenght…

And i found this link to increase the array size using [-maxsize]. Hope it helps too…

http://forum.pdpatchrepo.info/topic/3260/long-soundfiles-in-pd/2


#4

Hey @oweno, is there any way around this maximum sample size? I was thinking streaming from USB into recorder buffers which record this longer sample into a number of ~90 second blocks which can be played / manipulated sequentially (if this is even possible) but there may be another way I’ve not thought of.


#5

It is 100% possible to load longer files and also use a phasor to read them. But some work around has to be done… 2 steps:

Step 1- maxsize in table:
The link just above by otroamadeo shows how to work around the maxfile issue. Use it like this or check link above again:
read -maxsize 13230000 -resize birs_in_forest.wav birds01

Step 2 - reading the very long table back in chunks:
The problem is that the “quality” of the phasor degrades when using it to read very long samples in chunks, limit is around 90 seconds. Above that the quality starts to degrade.

So lets say you have a file that 3 minuts long loaded into a table. After 90 seconds the phasor will start degrading and skip numbers and this will give you a degraded playback of the sound.

There are several ways to avoid this:
The easiest is probably just to limit the range of the phasor to only playback 90 seconds at a time, and then if you want to playback the last 90 seconds of the table, you OFFSET the phasors startpoint by 90 seconds. This way you keep the audio in chunks within the 90 seconds where you have prefect playback.

So you dont need to load many tables with 90 second chunks, just load it in to one table and offset the phasor.

Second solution is, as Katjaa describes in the video below: build Katjaas version of PD which is build around double precision math. But for Organelle thats not really a solution, I guess.

So I’d say offsetting the phasor is the best solution for this problem. You could probably make a mechanism that will let you read the whole file in one chunk, that automatically offsets the phasor to next chunk of the table. I think there is an example of it in PD’s example. But to be honest I tried using it as starting point a couple of times and never really got it working 100%. I think one is better of just making ones own system for this that one understands.

(If you want an explanation for the phasor issue, check Katjaas video, it explains it pretty well):


#6

I completely missed this when reading the thread. Thanks for pointing this out and your other suggestions, will check out tonight! :+1:


#7

[tabread4~] does offset in latest pd versions. I don’t remember which pd version the Organelle ships with (i run 0.47.1). Check the B16 example file.


#8

Cool, just read the help file (B15) and it doesn’t make much sense though (yet :wink:).

Made some progress, kind of. Managed to write a 10 minute wav into an array using maxsize but hit the RAM limit (using multiple samples) so had to abandon going down this direction. Sticking with 90 second samples for now!


#9

Hey folks,
is it possible to live record a sample via the input? would be great for live performance…
unfortunately i’ve zero pd skills :confused: