Trying to get ml_synth_sampler_example to work... #48
-
Any help appreciated! I’m trying to get ml_synth_sampler_example to work on my setup:
With the ml_epiano_example I was able to get the functionality that I need, after some experimenting on this exact setup, but with the sampler I'm unable to get any sound output at all. Below is a description of my process - maybe someone can easily spot my stupid mistake. But on the other hand, maybe I’m completely misunderstanding the issue. Is the current version of ML_SynthTools even able to use the sampler, or should I wait for a future version? Anyway, here goes: I had to comment out some things in the example.
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
Hi, I've checked the current status of the project. Some updates were missing. I've moved the file access to the library to avoid copy and paste. Did you run the following code, before calling the NoteOn?
The sample is very short. In addition to that, did you call 'Sampler_SetSampleBuffer(storage, storageBytes);' with a local memory storage? Best regards, |
Beta Was this translation helpful? Give feedback.
-
SetSampleBuffer is required to keep some space for a sample or multiple samples. In case you are loading just one sample the size of the sample would be sufficient like 16k. You could code like this:
storage shall be used in global scope. The sampler is currently precompiled to avoid any side effects and compiling issues. I plan to keep the sampler open source. There are some modules which will be linkable only. |
Beta Was this translation helpful? Give feedback.
-
Thanks Marcel. I hesitate to mark this topic as closed, because I will now transition to trying to plug in some of my own sf2 and wav samples, and I might have some more questions. Anyway, your help is much appreciated Marcel! |
Beta Was this translation helpful? Give feedback.
-
Hi again Marcel. I'm back with more noob questions, sorry... I swapped out:
I adjusted the sample buffer size to fit. I also included wav_to_sampler.h of course While the code does compile, I'm not getting any sound output. Thanks!! |
Beta Was this translation helpful? Give feedback.
-
Thank you Marcel. So I'm almost ready to start making instruments and super excited about that, but I do have one last question to pester you with. The maximum sample size that I'm able to fit in memory using your library on the Lolin32 lite boards that I use, is something like 28KB. When trying to fit bigger samples, I get the following errors:
Like I mentioned, these boards don't have PSRAM. If not, then I'll have to change to a Wrover-based board (which have PSRAM). They're a bit more expensive, but it seems worth it, given that your library is pretty much ideal for my project in every other way. Thanks again! |
Beta Was this translation helpful? Give feedback.
SetSampleBuffer is required to keep some space for a sample or multiple samples. In case you are loading just one sample the size of the sample would be sufficient like 16k.
You could code like this:
storage shall be used in global scope.
The sampler is currently precompiled to avoid any side effects and compiling issues. I plan to keep the sampler open source. There are some modules which will be linkable only.