Re: Float array to Memin could restart , and selector....
Posted: Thu Aug 25, 2022 7:59 am
Tepeix wrote:
... I wanted a delay that keep the same maximum time in any sample rate, but reinitialize the memory size to not use too much. (even if it's not a big amount of memory in most situation)
But the memories is not reset using selector in this way..
You may know this already, but just in case…
All the DSP and ASM delays assign a maximum number of samples, not time. So a memory size of 44100 samples would give a maximum of 1 second at a sample rate of 44.1 kHz. If you go to 96 kHz sample rate the maximum time would be about 0.46 seconds. So I would be inclined to set a maximum number of samples based on the maximum expected sample rate. Of course the actual time set should make used of the sample rate prim so the delay time adjusted will not be affected by the sample rate. That means if the sample rate increases, the number of samples requested in the delay input would increase in proportion.
Something to be aware of is using stream delays in the poly white path. The voice count (number of notes sounding) will have to create new memory allocation and for longer delays that can cause clicks. In mono blue the memory allocation is done on loading or recompilation and remains fixed.
The mono delay prim might have no limit or be sensitive to sample rate, but I never tested it because, apparently, it’s not very CPU efficient.