Simple Polyphonic Sample Player
Jan 09 2020 | 5:39 pm
Dear all, I hope you had a wonderful start into the new decade. For a quite complex upcoming project I'm currently searching for a dead simple poly-sampler. Unfortunately I tried to write it couple of attempts on my own but it's much more tricky than expected. I played around with poly~ / and regular poly objects and voice stealing and adsr~ trigger methods. What I want to build is a polypohnic sampler that allows me to simple add one wav sample per midi pitch value within the range of two octaves. (no re-pitching, just playing, nothing fancy) These samples should be triggered via global ADSR settings that would count for all notes. And if I trigger one sample multiple times it should be smart enough to do some "voice stealing magic" to avoid any "click-noises" when jumping back to beginning of the sample.
Right now it just gives me headache. Maybe I'm having a major design concept flaw: How do I solve the follwing situation: my poly~ sampleplayer has 4 voices for the same long ambient sample: 1. MIDI Note on, comes in. ---> first poly starts playing 2. MIDI Note on, come in. ---> second poly starts playing 3. MIDI Note on, come in. ---> second poly starts playing 4. MIDI Note on, come in. --> fourth poly starts playing
all good so far.
now if I would send another MIDI ON note of course all polys would be still occupied. What would happen is that poly steals one voice and jumps back to sample-startposition and would start with the playback again. This moment of course would be heard as a short "hickup". In a way I need to have a more dynamic solution but I'm not sure how to solve it. How can I avoid this? It should pretty much work as the simplest version of the ableton sampler.
I'm sure I'm not the only one who had the problem to trigger multiple wavs hat the same time. Maybe someone has solved this puzzle? Or has somebody a hint of decent max for live sampler that does the job? that would be the easiest way.
I attached a maxpatch describing my misery. Maybe I'm just tired. Maybe someone can give me a hint?
all the best Christian