Is there already a way to get sample properties by mapping?
-
The isNoteNumberMapped() function is a bit unique, as it operates on the sample map level which is generally more "ground truth" than getting samples via the createSelection() type functions.
For example, in a legato script, I want to be able to adjust the SampleStart and SampleEnd of each legato sample, and automatically have my script play the sample for just that amount of time before fading in to the sustain, leaving some buffer for the envelope to release of course. I want to get the sample length when the sample is played, without worrying about how things are mapped, so I added a function that accepts rrGroup, velocity, and note, and returns the SampleEnd, which works great.
However, when I tried to expand this to a getSamplePropertyByMapping() function that accepts any Sample parameter, calling it crashes HISE.
I ran into some issues building HISE debug, so in the interest of (my) time I come to you asking if anyone wants to glance at my newbish modification for anything obviously wrong: https://github.com/davidhealey/HISE/compare/development...minosimo:HISE:development
Otherwise, I can just add separate functions for each parameter I need to get and call it a day.