Choke Group script Help
-
Hello everyone,
i searched on the forum for ways to have choke groups for the hihat, and i found a snippet that is only partly working for me. The hihat chokes each of its articulations correctly, but ALL the other drums get choked too (actually don't play at all). I have some samplers that are mixed, they contain samples from multiple drum parts, so i need to put the script processor under the master chain (and i need it to stay that way for routing reasons)this is the "half-working" script on "oninit" interface
const var HihatFT = 44; const var HihatSO = 45; const var HihatO = 46; const var HihatSC = 41; const var HihatC = 42; const var HihatProcessor = Synth.getMidiProcessor("Hihat Processor");oninit (script processor)
const var HihatFT = 44; const var HihatSO = 45; const var HihatO = 46; const var HihatSC = 41; const var HihatC = 42; const var HihatArt = [HihatFT, HihatC, HihatSC, HihatSO, HihatO]; const var evtList = []; evtList.reserve(64);onNoteon (script Processor
function onNoteOn() { for (i = 0; i < 5; i++) if(Message.getNoteNumber() == HihatArt[i]) { // Always use the for ... in loop if you don't need the index for(eventId in evtList) { // Send the note off command for the given event id Synth.addVolumeFade(eventId, 30, -100); } // Clear all notes evtList.clear(); // This is necessary because you will kill the note artificially and HISE // can only kill artifical notes for stability reasons Message.makeArtificial(); // Add this ID to the list (it'll add the artificial event ID) evtList.push(Message.getEventId()); } if(Message.getNoteNumber() != HihatFT & Message.getNoteNumber() != HihatC & Message.getNoteNumber() != HihatSC & Message.getNoteNumber() != HihatSO & Message.getNoteNumber() != HihatO) { Message.ignoreEvent(true); } }I tried to make an array and name it evtListHH to tell hise to kill only the notes coming from the Hihat note numbers, but that did not work (or maybe the idea was right but i did it wrong).
how can i make it work?
Thanx in advance!
-
@ScreamingWaves Are you using the built in choke group processor script?
-
@d-healey
no, i tried it but it didn't work. as far as i understood that works within a sampler or container, doesn't it? -
@ScreamingWaves I think so. There's probably examples on the forum, I haven't tried it myself. I think you need to put each type of drum into a separate sampler to use it.
-
@d-healey but how can i make multiple event lists that contain only certain note numbers, so that "evtList.clear()" does not mute all the notes? at least that's what i think it's happening now
-
@ScreamingWaves You could use multiple arrays, one for each drum type.
-
@d-healey
does this make sense? or how would it work?evtList1 = []; { Message.getEventId(41,42,43,44,45) } -
@ScreamingWaves said in Choke Group script Help:
does this make sense?
Nope, that's not going to work.
I think you might benefit from going through this doc
-
@d-healey
I figured it out and now it works! the only issue is that if i transpose the choke groups don't work anymore. how can i fix that? -
@ScreamingWaves I'm not sure, like I say I've never used it