how long is the long file? If it all fits in RAM, the process is pretty straightforward:
- load it in an array with
[soundfiler]
- read the array with two
[tabread~]
objects and crossfade between them
If the file doesn't fit in RAM, then you'll need to use [readsf~]
to read chunks of it. If you know in advance where in the file you'll start reading from, that's also kind of straightforward: prepare as many [readsf~]
objects as there are possible start location, and send the [open(
message to them. Whenever you need to start playing from a location, send a [1(
message to the corresponding [readsf~]
and crossfade it with the old one, to which you'll send a [0(
and [open (
message as soon as the crossfade is completed, so that it becomes ready for the next play.