[PD] Is asynchronous but fast loading possible?
Matteo Sisti Sette
matteo.sistisette at email.it
Wed Mar 7 13:27:25 CET 2007
Hi,
Well, I still have to look at the [sndfile] everyone is talking about, but
anyway, with regard to the general discussion about sound playing and
loading,
please let's distinguish between two completely different problems:
-PLAYING audio files (i.e. reading them in real time)
-LOADING audio files (storing them into a table).
[readsf] is for playing. In my opinion its only "flaw" is that you never
know exactly how much you have to wait before you send it a [1( in order to
be able to trust on its output. A "fix" would be an outlet that bangs when
the buffer is full or something like that...... Or even something more
sofisticated, such as being able to know at any time how much of the buffer
is full - so one may have a bigger buffer for security, but start playing
when a smaller portion is full......... obvioulsy I'm talking of an object
that wouldn't be called [readsf].
It would be marvallous to have an object capable of *immediately* start
playing, but I suppose that loading a sufficient portion of a file in a
1/44100 of a second is impossible in most platforms, or isn't it?
[soundfiler] is for loading. Its limit is that it blocks everything untill
it finishes loading. Reading a file in realtime is NOT an alternative. The
alternative would be an object capable of "threaded" loading, but still,
loading as fast as possible, not reading at a certain realtime speed; and
banging when finished.
I dunnow if [sndfile] is such an object but I suppose it isn't since it has
been said to be a "bad hack" and not to be the solution to my problem....
however I'll have a look at that.
Hope I've not been too pedantic, but I had the impression that the problems
of playing and loading were a bit mixed up, and I thing it's key to
distinguish them or a "solution" is far to come.
Talking about PLAYING (real time reading):
it would be grate to be able to override the sample rate of the file (or
read it at a given speed, which is the same in this context) which afaik
from documentation, is not possible with readsf. Even varying playing speed
during playing would be desirable....
Bye
M.
More information about the Pd-list
mailing list