This message has to do with audio buffer managing, copying, moving, etc. in "non realtime" (at least from the user's point of view). If the topic has already been discussed, please give me a link to it.
The basic problem is really simple: we want to load TWO audio files into ONE buffer~. The classic [read( and [replace( messages first clear the buffer so it's perhaps not the right solution.
Example with "File1" (10 seconds) and "File2" (5 seconds).
We should be able to create a 20-second buffer (for example), containing:
- nothing (silence) from 0 s to 1 s
- "File1" from 1 s to 11 s
- nothing (silence) from 11 s to 13 s
- "File2" from 13 s to 18 s
- nothing (silence) from 18 s to 20 s
The only solution I know is the following one:
- creating two buffers (B1 and B2) for storing "File1" and "File2"
- creating a third buffer (B)
- copying the contents of B1 and B2 to B, using either [peek~] or [poke~].
The trouble start here, as [peek~] and [poke~] are way too slow (or, say, adapted to realtime use):
* [peek~] works at the message scheduler speed, so I don't know the maximum speed at which you can copy information from a buffer to another, but it's not something reliable anyway
* [poke~] works at signal speed, so you can copy 44100 samples per second. Then is it possible to read faster than the sample rate ? Of course, 4x oversampling (which should be possible in a subpatch, if the sound cards supports it) is still way too slow.
All this in Max 4.6 unfortunately ...
Thanks for your help