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!