Using dropfile and gathering sample size of a file loaded into it
Ok guys,
this may be strangely phrased. But I want to use dropfile, and once a file has been loaded into sfplay its current file length is known so that sfplay then knows when to loop the file again. If that makes sense? Let me try to rephrase it again I want a file that is loaded in by the dropfile object to automatically update its current length in samples so when looped the sample knows when to begin looping again.
Would it be best to use sfinfo for this? and where should i load it too (sfplay's right outlet?).
At the moment I am using a gate as a looping method I know I can use the loop message for this but I once the toggle gas been selected I want this to then trigger both pitch and amplitude envelopes and to do this the samples length needs to be known, which may in turn trigger a bang to both the amplitude and pitch envelopes.
Hope this makes sense and thanks for the help in advance.
Hi,
From what i uderstood it's better to use a buffer like in the patch below. I do not know if you need to use sfplay for some reason but i would take this route. And still if you have to use sfplay just use the buffer only for the info.
Good luck!
FRid
Thank you for your very fast reply FRid your solution seems a lot more appropriate for solving my problem. Just curious as to whether it is possible using it with sfplay though, I much rather work with groove! Cheers once again mate.
No problem,
You got me curious too. Haven't found a way though (but i'm on it :) this playbar seems to adjust itself in a magical way to the sample loaded?
Yep,
Sfinfo seems the only way to go. But the mystery of the playbar still exists :) Would this be the only object that connects to an inlet adjusting itself automatically to the object it is connected to? Would this be "javascriptable" :) ?
FRid
you mean something like this?
cheers guys :)