-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic Memory Allocation (making ESP32 external RAM work) #36
Comments
There are two ways that you can do it depending on your needs. In situations when I have to allocate or reserve a big chunk of memory, for example when creating a delay, I usually access it with external functions. For example:
That way your Vult code can access the buffer. The second option would be if you want to put all the memory used by your Vult code in the external memory. For example:
|
@modlfo Thank you! Maybe it would make sense to make a template? I've started one for https://github.com/garygru/yummyDSP yummyDSP.ml
|
Also, how would this adaptation look for examples/effects/short_delay.vult? |
Ok, got it working and my template is working. How do i add process arguments to my C++ process wrapper?
|
@modlfo I am thinking of following additions / todo.
|
Some of the things that you mention could be achieved by creating a Vult library (a file) that declares the functions and makes it available to your code. One possible issue could be the strictness in Vult Language when working with arrays.
What do you mean here? I recently added a feature to prefix all the generated code. Maybe that's what you mean. Have you tested the template? If it works, I can integrate it. |
@modlfo Regarding the prefix, I get the following if generating code with:
So Short_delay_controlChange etc. is missing the oscNode:: class prefix. |
Finally I got a ESP32. I will test how thing work here when I have some time. |
Hi @modlfo: Did you get it working? It is working quite nice like this on my platform. |
I'm running Vult generated code on my ESP32, but internal RAM is limited to 520K (minus WiFi Stack etc), so in order to use more, I need to use dynamic memory allocation to use the external PSRAM.
This is how I do it in non-vult DSP code.
ps_malloc allocates memory on external PSRAM.
Do I need to write a custom generator?
The text was updated successfully, but these errors were encountered: