niedz., 24 lut 2019 o 23:34 Christian Schoenebeck <schoeneb...@linuxsampler.org> napisaĆ(a): > Then it might make sense to extend the existing key group handling code by > optionally using the number provided by the patch. You might want to have a > look at AbstractEngineChannel::HandleKeyGroupConflicts().
That method was my starting point, but I don't understand exactly what's going on inside: // send a release event to all active voices in the group RTList<Event>::Iterator itEvent = ActiveKeyGroups[KeyGroup]->allocAppend(pEngine->pEventPool); *itEvent = *itNoteOnEvent; This is my understanding 1. there's a new event created using pEventPool memory 2. it's appended to the ActiveKeyGroups at the KeyGroup index 3. it's set up as the copy of the note on event, which caused this voice to be launched 4. why does it make all active voices in the group killed? I suppose it's because the condition itEvent->Param.Note.Key != HostKey() is true in sfz::Voice::ProcessGroupEvent, but I don't understand the logic behind It's a good question whether extending key group handling is the way to go. I don't know if there are similar capabilities in gig or sf2 formats. In sfz format group opcode makes a group "exclusive" only if off_by is set to the same value. Setting group without off_by doesn't mute consecutive hits, but it does with polyphony=1. However, default polyphony is not 1, but is limited to sampler maximum voice limit (at least in sforzando vst player). If you can point out similar properties in other engines, i'll refactor the patch to use more common code. I'm going to implemet http://www.sfzformat.com/index.php?title=Note_selfmask opcode as well. Please tell me how to mute a voice using an event instead of direct calling EnterReleaseStage method. If there is no other way, would you accept declaring sfz::EngineChannel class as a friend inside sfz::Voice? Regards Jacek Roszkowski _______________________________________________ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel