I finally have the streaming sampler to a place where I’d like some testing.
This is a bare-minimum ultra-simple sampler that streams instead of pre-loading wav files. What this means is it can start playing any size .wav file immediately (or almost immediately). It only loads as it goes, so you have to keep the SD Card or USB drive containing the file you’re playing inserted the whole time.
The module will probably get renamed! Also there is no VCV version of it yet. MetaModule-only.
You can change the Buffer Threshold, which sets how much data it should try to keep ready to go in RAM. Higher values mean longer latency from when you start/trigger playback until you hear sound. Lower values mean less latency but more likely to get a glitch (buffer underrun) if the SD Card or USB drive takes too long to provide the next block of data.
Known issues:
Navigating to pages that access the filesystem like the patch list or scanning for plugins can sometimes cause the audio to stutter. With a large enough pre-buffer size, it should be fine, but I recommend stopping the patch before doing things like loading new plugins.
SD Card and USB drive quality are extremely important. For critical usage (e.g. live performance) you should use a good quality drive (USB 3.0) or card, format it cleanly, then copy only the files you need.
Pulling out the SD Card or USB drive while it’s streaming from them can do bad things. Don’t do it!If the red light on the module is flickering, then it’s reading from disk, so don’t eject the disk. Right now it may crash your patch but I’ll make it handle this error better in the future.
super awesome can’t wait to try this out when back b in the studio. is the sdc that came with the mm good enough for critical usage? if not which would be a really good one?
id love to be able to stream/loop multiple wav stems at the same time at any given moment during live performances
Yeah the SD Card included with the MM works well. I found that formatting it as FAT32 and then copying in only the files I was using helped with performance a lot (my tests involved 4 x samplers streaming large files continuously overnight).
Yeah, what I did was create a framework for streaming files from disk. So this module is a basic implementation to test and demonstrate that framework. I’m hoping this is useful for other developers who want to either convert a VCV Rack sampler to MetaModule or create a new sampler for MM.
But as I made this, I had in mind places to add similar controls as the STS has: Pitch, Start Position, Length. Also addding Envelopes (for looping and one-shot) and selecting samples/banks with CV/knobs would be the next step after those features.
Nice. Ok looking forward to trying it out during the week. I loved the basic but solid functionality of the original STS. Here’s a few feature requests:
Overdub recording
ability to share buffer with other modules (for example if this sampler had a Granular sibling).
u,v,w,x,y,z - start stop the sample
A-F controls vol for the 6 tsp
edit: seems promising so far! had 6 very long (upwards of an hour in one case) wavs loop at once. didn’t seem to be underrunning. buffer at 80% for each instance of the tsp
The latency will depend on the disk itself – how long it takes for the disk to provide the raw wav file data. At minimal, it tries to play after only 1024 frames, so ideally that will only take 10-20ms.
Yeah, the red light only flashes when the disk is being read. So sometimes depending on sample size and disk speed it might pre-buffer enough and then not need to use the disk at all.
With small samples (under 11 seconds stereo I think) you can fully buffer the sample, so once it plays entirely once you won’t need to load it from disk again. Meaning, that the latency will go down to <1ms after the first time you play the sample.
So for percussive sounds, you get no latency penalty no matter what the buffer threshold is set to.
@danngreen - couple of strange behaviors i’m noticing:
using the “stop” retrig option, there are times when the sample will play a little after the beginning and cause a glitch when i press the play button. i double checked in the daw, there is a 10ms volume curve right at the beginning. restarting the mm seemed to fix the issue.
also i noticed in a couple of cases, when pressing stop then play, the sample would start towards the end, and then loop with a pop. whereas i dont hear any clicks in canard w the same sample at the loop point. again restarting mm and the patch seemed to fix.
im not sure yet what was causing those. will report if i can find specific steps to repro.
couple of down the road improvement ideas (sorry for any feature creeping here):
could the “load sample” option possibly be at the bottom of the options list? that way when loading a new sample while performing live, all you have to do is quickly once spin the function knob and the load sample will be quickly/easily highlighted. as it is now, its a bit more difficult/fidgety to target that load sample option quickly.
also curious if we might be able to have a “click free” option toggle in there at some point? would be nice to be able to have a clean sound when start, stopping and pausing.
OK, thanks. I did have an issue like this on an earlier revision. I’ll see if I can reproduce. Are you using samples that are under 22 seconds or 44 seconds mono (I had previous said it was 11 seconds stereo but forgot I increased that)? When I had something like that happening before it only happened with samples shorter than this.
Yeah I had that same thought. It was at the bottom originally… then I added more stuff
Definitely. On the STS it’s done with short envelopes at the beginning and end, and crossfading while looping. This module is essentially just proving that we can stream samples from disk without adding extra features (I guess “Loop” is technically an extra feature, but it let me test things like streaming for 24 hours without needing actual 24-hour samples).
Here’s an updated firmware with the TSP included. I fixed a bunch of issues with retriggering (or stopping and re-starting) that now handles a variety of situations.
I’m working on sdk api-v2.1 which has some new features for plugin devs, so that’s why the version is bumped up here…