ludo last edited by
Ah Ok! Sorry for my dumb's questions... So I could use Message.ignoreEvent(true) in the onNoteOff() function for the all drum set to emulate the one shot option, that's it?
Thanks again for your time
Yep that should work.
Digging up this old thread. I'm working on a project that needs this function, but I'm unable to make it work. My background had been in Kontakt scripting, so a lot of this looks familiar. I see there are a million different places to add scripts in software. Does each script slot affect only a specific sampler?
I've currently separated different instruments of a drum kit into containers, and placed samplers in each container for each instrument. Do I need to place this script in the midi slot of the main project container? or of the container for my hi-hat track?
I've tried both with no luck.
@christoph-hart Also want to add that I've copied/pasted Cristoph's script above into the project, only changing the notes associated with closeHiHatKey and openHiHatKey.
And yes you can add scripts at different places, which is super useful for encapsulating functionality, so in your case, it should be enough to drop this on the sampler that contains the HiHat samples.
@christoph-hart I think I'm counting the keys wrong. I had C1 as 60
Once you collect the midi note number with Message.getNoteNumber(), how do you display this in the console?
d.healey last edited by
@dustbro C4 is the usual standard for MIDI note 60 although some systems use C3. - https://en.wikipedia.org/wiki/C_(musical_note)#Middle_C
@d-healey OMG I'm so stupid... That's what I was doing, but it was returning an "unknown Function" error in the console...
I didn't capitalize the M in message!!
Still struggling with this script. I've confirmed that I'm using note 44 for closed hat, and 46 for open hat. I adjusted the numbers accordingly in onINIT and placed this script in the associated container.
In debug mode, I can see that the array is capturing the eventID, and hitting the closedHat key clears the array, but it's not stopping the note playback. Is there any specific sampler settings I need to adjust for HISE to kill the note?