RAM Disk vs. buffer~

Florent Ghys's icon

Hello,
In terms of speed of access to a file (like super precise trigger), I was wondering if there was any difference between accessing an audio file from a RAM Disk with an sfplay~ object or from a buffer~ with a groove~ object.

I would guess it is exactly the same, but I was just wondering if someone had some insight about that.
thanks
Florent

Evan's icon

groove and buffer for sure.
sfplay~ reads from disk.
buffer~ loads the file into RAM which is generally quicker than reading from the disk.

Florent Ghys's icon

Thanks Evan for your answer.
But if the files are on a RAM Disk, they are basically in a block of RAM. http://en.wikipedia.org/wiki/RAM_drive
So sfplay~ would access the file at the same speed as groove~, right?

pdelges's icon

sfplay~ can preload cues in RAM, and you can even trigger the cues with a signal to get sample accuracy. There is no need for a RAM disk.
Do you hear latency when triggering a preloaded sound file?

Florent Ghys's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Thanks a lot Patrick, I totally forgot about that option for sfplay~
and it sounds like there is no difference in triggering a pre-loaded sound with sfplay~ and groove~ that way:

my "latency" was actually coming from the looping function of sfplay~ that is not super accurate (apparently only within multiples of its disk buffer size)

petcode's icon

you also could use a fast ssd.

Florent Ghys's icon

thanks Petcode
the wikipedia article about RAM drives seems to mention that RAM is faster than SSD though

Evan's icon

But why the need to use sfplay~ in the first place?

Florent Ghys's icon

just because I have this huge old patch using sfplay~ objects and I am trying to find an easy way to make it work better without having to re-patch everything