How to play a specified RR group based on the distance between two notes?
-
@d-healey yes I'm not arguing that there is a use case where it might make sense. My argument is that I don't want to incentivize people to cram everything in a single sampler by giving them the impression that this is a recommended workflow by adding convenience tools for this. Because then the next thing people will ask is how to make a FX chain per group or limit certain modulators to a range of RR groups and BAM we're back in Kontaktland.
If you realize as a power user that this is the best architecture for your project, then there's nothing against it, but then you have to live with the mild inconvenience of going a little path outside the recommended path.
-
@Christoph-Hart said in How to play a specified RR group based on the distance between two notes?:
the next thing people will ask is how to make a FX chain per group or limit certain modulators to a range of RR groups
Pretty sure I already asked for this too :beaming_face_with_smiling_eyes:
-
I rest my case your honor.
-
I think it's better to use one sample per one velocity for dealing with true legato, that way everything is in one group instead of having to deal with 127 groups, managing them an populating them.
-
@aaronventure ah so just use
setVelocity(targetNoteNumber)
instead ofsetActiveGroup()
? Yeah that could work and I also don't need to think about a solution for the UI problem of RR groups, so I guess everybody's happy now :) -
@Christoph-Hart said in How to play a specified RR group based on the distance between two notes?:
ah so just use setVelocity(targetNoteNumber)
This affects all velocity modulators further down the line - unless you use a global velocity modulator.
-
@d-healey If you put the script in the sampler it shouldn't affect its sibling samplers. If it's a global script, then sure.
-
@Christoph-Hart
When I press the key I get an error like this, what should I do?
-
@CatABC you haven't declared activeGroup.
Unlike the interface script where you can basically declare variables and constants wherever, with realtime, you should declare them in the on init part so that the note on function just needs to read them (as they would get destroyed after the function execution).
declare activeGroup in the on init part of your realtime script. Use reg, as it's faster than var.
reg activeGroup = -1;
-
@aaronventure Thank you very much, I solved this problem, but I have a new problem, how to play the correct RR group according to the interval?
-
@Christoph-Hart
Hi,Christoph, Thank you for providing me with the method,I tried using the script, but it seems like there is no way to change the group I want to play based on the interval? For example, I press C2-D2 and it plays RR48, I press C-D#2 and it still plays RR48,How can I improve this?And when my melody goes down, the descending legato should be played, which will overlap with the ascending legato RR group. This is a headache for me. Please help me. -
@CatABC
I think I found the answer, thanks a lot to everyone who helped me,I love you all -
@CatABC you know the rules, you gotta post the solution or the forum police comes knocking on your door.
-
@aaronventure Hahaha, thank you for your reminder. but I am still confirming whether it has achieved my expected purpose.
-
@CatABC I think I have confirmed that I can use fewer RR groups to achieve my purpose. I set up variables to store the key I pressed first, then calculated the interval, and set the group I wanted to play based on the interval. This should be simple for everyone. As a beginner in HISE, it took me a lot of effort. Anyway, thank you for your help!:growing_heart: Following is my test code
local a = Message.getNoteNumber(); if(Synth.isLegatoInterval()) { leginterval = a - lastNote; Message.setNoteNumber(lastNote); if (leginterval == 2) { Sampler.setActiveGroup(2); } } else { Sampler.setActiveGroup(-1); } lastNote = a;