-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use the same Sample object for tables of different lenght #293
Comments
Hi, What would be wrong with having several instances of |
Let's imagine this situation:
With the current implementation, given that the tables have all different lengths, it requires me to instantiate 30 Sample objects when, in practice, only 3 can play at a time. On top of that, I cannot have an array with all the |
Indeed, but having 30 Indeed, you can't have one array of known type with this… But maybe a way to go (if you don't want to have all your samples of the same size) would be to create a |
Indeed, in my case, I wouldn't change frequency often. I think that I'll go for having all the tables with the same length extending the shorter ones with some silence or I'll just create a custom variant of the |
Sorry for not a more tailored solution :/. Performances is a must in Mozzi (especially as we are trying to keep everything running on low-end platforms like AVR) and a break in compatibility is not to be taken lightly… That being said, that triggered some internal reflection on my side, thanks :)! I'm sure you will figure an easy workaround between the different solutions (custom Can I close this? |
Yeah, feel free to close it :) |
Sorry for hijacking this Issue but I have a few more questions/suggestions and I don't think it makes sense to open a new Issue for them:
|
No problem at all! Some of this have to be discussed with the others (and hence might deserve an issue) but here is a start:
This (and the same for
Please do! Some of these have been around for some time and any update is welcome!
Please do also add it as a PR for another script if you think that can be useful for others. Same actually goes for good wavetables if you want to share them :) |
In the
examples/08.Samples/Samples_Tables_Arrays/Samples_Tables_Arrays.ino
example, 11 tables of the same length are being used. This is a very specific scenario and, when dealing with drums for example, it's almost impossible to have kicks, hats, ... all of the same length. Is there a way of having thatNUM_TABLE_CELLS
changeable on-the-fly so that the same Sample object can be reused with samples of different length? I guess that it has been made like this so that many operations can be done directly in compilation but, MCU like the RP2040 can easily handle performing those calculations on the fly IMO.The text was updated successfully, but these errors were encountered: