Previewing segments of the same sample
-
Hi!
I am currently implementing a sample slicer (aka sample chop) and I want to let the user preview each slice individually.
What would be the most straightforward approach for this purpose:
- Map a
ModulatorSamplerSound
referencing the same sample over a range of MIDI notes (1 per slice), each sound having a specificSampleStart
/SampleEnd
- Simply set the
SampleStart
andSampleEnd
right before triggering the portion of the sample - Use
SamplePreview
from theSampleEditorHandler
I believe all methods would work but some might have advantages over others.
Thanks in advance for any help,
E. - Map a
-
Alright for those interested, the most straightforward solution (in my case) was to map one
ModulatorSamplerSound
per MIDI note and set the Sample start/end accordingly.It would be really cool to be able to synchronously set the sample start/end positions without killing the voices when the sample is loaded entirely in memory (no streaming).
E.
-
Note that I had to disable the pool "search mode" when loading the same sample over a range of MIDI notes, otherwise updating the start/end positions would be mirrored on every sample.
auto pool = sampler->getSampleMap()->getCurrentSamplePool(); jassert(pool); pool->setDeactivatePoolSearch(true);
I believe this is why this pool mode exists, @Christoph-Hart, i.e.: to allow each duplicate sample entry to have its own properties?
E.