Help creating a simple keyswitch between two samplers
-
Hi friends, I want to create a simple keyswitch that switches between two samplers. I’ve watched a tutorial by David but I can’t get it to work. I think it’s easy. Can someone help me? Thanks!
//keyswitches const var sampler1 = Synth.getChildSynth("sampler1"); const var sampler2 = Synth.getChildSynth("sampler2"); const var sampler1 = [36]; const var sampler2 = [35]; function onNoteOn() { local n = Message.getNoteNumber(); if(sampler1.contains(n)){ sampler1.setBypassed(false); sampler2.setBypassed(true); } else if(sampler2.contains(n)){ sampler1.setBypassed(true); sampler2.setBypassed(false); } } -
@lijas90 his video for 2 groups, I solved this by an old Dan snippet to do with midi muters recently that works amazing.
Search the phrase
Here is an example of how to do it. For some reason, which I'm hoping Christoph can explain, it only works when the script is deferred. -
@lijas90 use midi muters instead of bypassing the samplers. I put a video about this on Patreon recently I think
-
@d-healey Thanks you!