Samplers as round robins?
-
Ok, this works great but there's one thing I'd like to implement, and that is MPE. Would it be possible for the three samplers to still support that even with the filter rr script?
-
Yeah, you're right, this won't work with MPE then, as it needs the channel info from the original event.
However I just thought of a much more simple solution: just use the MidiMuter module:
HiseSnippet 1154.3oc6Y01SiaDDdcBtsI8f1q8TU+nKpefHnnD35KRHDuDHmh5EHBycsRmNcZwdRxJr20c8ZJnS2+w9Sg+As650I1F7A4bKm3tl7AD6yNy5mY1YlGGk9blCDFx3HiZGeQ.fLdfo8ETwn1ivDJp6dHiEL6gCE.2RCs6EA3vPvEYXT8IJ.iZygh+b4V6h8vTGHEBgdNi3.Ok3SDon829WIddcvtvwD+LV+3s65vnsYdrHIepZ1DEfcNEODN.qLqhIx3S12kHXbaAV.gRa1k4dg8H1eR01+bRH4DOPsnExVdPZXT6QDO29ii0PDx3S6mF4U0Q9iL6QbISvSy.eY7FVodjMGXTIOklKGkZ81nTGlmq5.dKzyHC8lSSuGZZ6vIAhzcTb6qSPSYWqbzSuKpRmJlxbanv5LL2xORdeFZso0KhuqWcHHxE5KsnZYOkUsVrwJyW2pfO2pqqUdWWewFubih8c95bXnEm2k5BmKCglanQupcChnNBBiZwnGvDvgzkZT+0Zy7XNXOKxjCPiVu1.IG7k3I4mFZ7Wmd19qFBhcDBN4DoEK0bkI7361TedKubiMhM+MZuz+MwpkWdirnjAKMIL1L4YtpGPGJF0H8YlMRq+l5WKtFLPEX0qck8ZynBNyyC3EtspwieSNtDMx+DfuhrdwKBlXnrZLe4d8oqbWV6I.pHigLZWJQbX.jz5N9ZZLRKzj.LqQowUVz3vo.yRgtdOFpslSx+6Yc2CKvp1tDLocA.WPTQnwdvYxYX5lvZl6AgmJXAxoXWqCUNmf4F4gE4GdnlRlrgLEmq6rq5oERDWjcJ56vDklENQoUQQ6TR2GZ1mHbFULeqT.ekYs6Z9lLeddy8GL.bDojcNyN+dYGFWNprflJetoMgBwiwhIx2Du152vmAVOAn.WkTacCZk+0zpUFL0ZkG5HjO9i4XZX.KL2AaC9jiYTUFIE7YgPGN7GGotkyh2lg4Et0ka0QFjE5iMVDwiKW1wmEQE4JOp9uTfrn6Di4tqzuqNcz6VzrqNtNYhjVLSdP557UGWMIUZVjNUynRxPPoohX1rPx6JrajPHarItJHxPJiCIPwC6ydiilhy3KLGPN2VD4bpZdcXAGx6sQkUmt98a4xq1XNZS7C7f8omAdR8fXN9URAfA3HOwXz72i8XTVvHFk3jsE3HP9JCCGB7rbuv.R9xExW4ME4QaeD3A3rsye+1OU1Fh4x7DTxbw6Pg7Mce8slZ5ZoFMY8wgDW0+eJwcDKRPnC6gkEpmiLLOHx2Vpr3.RlPofm7AYZTQMdQutoZsVZg5Fu3ukeR1rkZsQxlsFuYYkQW6dhL5kaMSF89mL5ZyjQ+nPFcsYxnyjQmIid2Iit98kuM51eXKi179hLZy+KkQW+C.YzjialL5MHit9LYzYxnyjQmBYz2GOCerCm8JG8PKUs7mEiHiaZ7unYMydp0VsFOkxzr4pMQ9xoxuxwQkt+AY9oXeVqD9rdI74wkvmerD97SkvmetD97K2nOJAwchDLecqnDn+9w+1PFF6SwxJ43pdz+.fJy6PD
You don't need to take care of the note off events here because that will be handled by the module itself (as long as you enable Fix Stuck Notes).
-
Nice! Now one last thing - what if I want to have 6 samplers playing in each RR cycle?
So:
RR1: Sampler1, Sampler2, Sampler3,Sampler4,Sampler5,Sampler6
RR2: Sampler7,Sampler8,Sampler9,Sampler10,Sampler11,Sampler12
RR3: Sampler13,Sampler14,Sampler15,Sampler16,Sampler17,Sampler18I was able to achieve that with the filters and I'm sure it's doable with the logic here but I always sucked at maths ;-)
-
@tomekslesicki You can put them in 3 containers
-
Nice idea! Can I put the samplers into containers without copy-paste? It changes names of the modulators and I have quite a few of them...
-
This post is deleted! -
Ok, I've tried to make this like that:
On init:
const var muters_a = [ Synth.getMidiProcessor("MidiMuter1"),Synth.getMidiProcessor("MidiMuter2"),Synth.getMidiProcessor("MidiMuter3"),Synth.getMidiProcessor("MidiMuter4"),Synth.getMidiProcessor("MidiMuter5"),Synth.getMidiProcessor("MidiMuter6") ]; const var muters_b = [ Synth.getMidiProcessor("MidiMuter7"),Synth.getMidiProcessor("MidiMuter8"),Synth.getMidiProcessor("MidiMuter9"),Synth.getMidiProcessor("MidiMuter10"),Synth.getMidiProcessor("MidiMuter11"),Synth.getMidiProcessor("MidiMuter12") ]; const var muters_c = [ Synth.getMidiProcessor("MidiMuter13"),Synth.getMidiProcessor("MidiMuter14"),Synth.getMidiProcessor("MidiMuter15"),Synth.getMidiProcessor("MidiMuter16"),Synth.getMidiProcessor("MidiMuter17"),Synth.getMidiProcessor("MidiMuter18") ]; const var muters = [ [muters_a], [muters_b], [muters_c] ]; reg rrIndex = 0;
And note on:
function onNoteOn() { local index = 0; for(m in muters) { m.setAttribute(0, rrIndex != index++); } rrIndex++; if(rrIndex == muters.length) rrIndex = 0; }
But I'm getting this error:
onNoteOn() - Line 7, column 26: Unknown function 'setAttribute' {Q3ljbGVTY3JpcHR8b25Ob3RlT24oKXwxMDN8N3wyNg==}
-
You're wrapping the muterX arrays into an array again, so it doesn't reach the actual modules.
Try
const var muters = [ muters_a, muters_b, muters_c ];
-
Oh and the onNoteOn callback is also wrong. You need a nested for loop (and make sure you don't increment the index in the most inner loop, but in the outer loop so it reflects the actual RR index.
-
@Christoph-Hart I think I understood half of this sentence :D
-
If you had a bit of time to help me out so this, I'd be really grateful :-)
-
HiseSnippet 1326.3oc6a99SabCFG+tDtokrBacqZZuzCsWPTYzDHjMoJD+H.UQqAhHz1IUUUYtyIwh6ry74ieHT+eb+ov+AaO9tK4t.GPVZSEk47hn3G+X6u9w1Oe7cBZI31Deetvvrvgm2mXX9Hq1myj8p2CSYFM11vbNqlXeIQfhLs048w99DGCSy7uPYvrvLFgetb8svtXlMIwjgwq4TaxKodTYh0Va7GTW2cwNjCodo7t5FMr4r5bWd.nm7VkM5isOF2krGV4VNKCyuZGGpjKZKwRhug4LawcNucO9orH+eM0mdjKQUnhQanihLuK20QoXkUi58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rQ8LCSq8B7ZCjEaBnDFi3BCjkYNU9fnxkUkiPKLmvB+C7ItxJpxlwUVYPkSJFc46IXzKWWiQu+gQW9K.LJP.0Xz6.itrFipwnZL5zCitx8kmFcCMF89GFcEMF8AAFcEMFUiQ0XzoGFsp9k5pwn2HFsp9k59f.iVUiQ0XTMFc5gQWU+Rc0XzaDitp9oQePfQWUiQ0XTMFc5gQqoeotYgQm7i2ewiNqoQmOHPm0znSM5TiNGCz4miwvCaK3u2NJokZu7WGZAl2rv+MdJX0TUFUYPVJKqxKU1vCxJ+daaU39Wg3S1sY4InMqLAso5DzlUmf1TaBZyuMAs42u01n.haFH4dQGEACs1I7OxeSycXXXmb3tdi+EfGr3z6
Interesting part:
const var muters = [[Synth.getMidiProcessor("MidiMuter1"), Synth.getMidiProcessor("MidiMuter4")], [Synth.getMidiProcessor("MidiMuter2"), Synth.getMidiProcessor("MidiMuter5")], [Synth.getMidiProcessor("MidiMuter3"), Synth.getMidiProcessor("MidiMuter6")]] reg rrIndex = 0; function onNoteOn() { local index = 0; for(pair in muters) { for(m in pair) { m.setAttribute(0, rrIndex != index); } // Move the incrementation here or it will be incremented 6 times instead of three index++; } rrIndex++; if(rrIndex == muters.length) rrIndex = 0; }
This should be adaptable to your setup without too many hurdles...
-
Thanks! It adapted perfectly :-)
-
This post is deleted! -
Ok, just a quick follow up - the solution that @Christoph-Hart posted works great most of the time but I’m getting occasional stuck notes. Any way to remedy that?
-
Do the stuck notes occur with MPE or with normal keyboards too? And does it happen with the sine example that I posted or is it just with samplers?
-
@Christoph-Hart said in Samplers as round robins?:
Do the stuck notes occur with MPE or with normal keyboards too? And does it happen with the sine example that I posted or is it just with samplers?
Only with the Samplers, and with normal keyboards too
-
And I have fix stuck notes enabled
-
Hmm, maybe you need to send me the project so I can debug it. Not sure why this happens, but there might be a few edge cases that cause these issues.
-