Planning to study a way to port sampler modules I couldn’t find this infos: is the working audio samplerate of mm fixed? Or what else?
And what about memory size to store data?
(I already read about avoiding dynamic memory allocation of vectors)
Nice to see you here! Many users have requested your modules be ported.
The samplerate is user-selectable from 24/36/48/96kHz. The rack-interface adaptor tries to mimic VCV as much as possible, so the onSampleRateChange()
callback will get called, and also the args.sampleRate
parameter of process()
is set correctly.
As for memory, there is no per-module limit, but in total around 256MB is reserved for the entire patch (all modules in the patch). With sample players, one consideration is whether to share sample data between modules. That is, if a sample player module loaded 100MB of samples into RAM, then a user could only add two of them in a patch. But if there was plugin-wide const static storage for samples (global, as far as the plugin is concerned), then any number of sample modules could be loaded into a patch. As long as the sample data is read-only, it should work fine.
Plugins can read files that were loaded from their plugin assets dir, using fopen()
, fread()
, etc. When compiling the plugin, put any needed files in the assets/
dir and the cmake script will automatically package them into the .mmplugin
file (which is just a tarball of the plugin shared object and the contents of assets/
).
I’m working on allowing general filesystem access to the SD Card and USB drive, but it’s a bit more complex and not done yet.
I’m happy to help as much as you need, it would be excellent to see your plugins running on the MM hardware!