Mute/enable a sampler when a controller value is greater than or less than
-
You haven't scripted anything for the knob or connected it through processor ID as far as I can see. But that's a different issue to the CC stuff we've been discussing so far.
-
@d-healey Oh I see, so the code is fine but the actual CC data isn't being put in correctly. You can't achieve what I wanted to do just be assigning the knob to CC 1? I want to control it as a slider really. So a slider that moves from 0 to 127 (CC1) and when it meets the 64 value the Ignore button is toggled. Need to get out of the the Kontakt way of thinking!
HiseSnippet 1448.3oc4X0saaaCElxNrs1sMasnWra1fPwtvAnKvpMMc.Ec0M+UXz5DinzfcWAiDsMWjHEnnRhaPuaOOa6Qn6QYuA8MX6PIYKZEGOWitt+7EB9b34P9wCOGd9j5JEdz3XgDYU6fgQTj0MvtC4pAaNfv3n1agrVF2gDqnR6LUaLLhDGS8QVVUetVgUskPo+d+S2fDP3dzBUHzgBlG8krPlpPa2VufEDrCwmd.Kzv50Z01Sv2TDHR.7TE2DEQ7NlzmtKQaVELx5Ja6yTBoqhnnwHK7FB+gtCDmxyr+PVL6n.pVvA4BSTl58NgJOgQOcGQfuF4ZcE+2Ag1b.Kvu6nXQLBl4tEQlpYQl6f6v7Yi0WDg97zArK7vLFYUYRHWcBH6XB4lFPdJPxx.RKkAoagc8jrHUwHZ7bcbaNbf0i.GElPIyVj0uh2T.FvUqFRNltiDDF6Pi0a17d1viUdb8dIbOESvsE7cEJ5d7FqT+750p+151kGpWuoNldcjhf.pbpCqO9kyxwF7jvinx6YeBIHgN1PX+Oq7.mKKOvKaaaXnf2lyT6EQ4WVl.JOVoO.xQEXpJM7ubd32Mf4SkHFDkuJ9EbwQNnT.ON09cutE5Us2hnHilFXFgUIhJUL8FvZK5IPgR1oZM7Vz3iUhnTaCiDb85aci+zE8rwKXqen0vhBKVKn.Nxk8FvcL1Y0lnPxYlf6TluZ.Ll0WAxCnr9CTZINHEMJVzFVnqfCSTTnrTBUjPFiV2xXVetPR2HQoDbjujzeKljldRhrpiOTuG8HAnX0P8QhgFzEyngZIgeR.QMYAl9ll7AzSqYVsN0kGyT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sXs83pkpn+.3VCzSE
-
@afinch said in Mute/enable a sampler when a controller value is greater than or less than:
@d-healey So a slider that moves from 0 to 127 (CC1)
Knobs and CCs are totally separate.
So you want a knob that can control muters when the value is over 64, and you want CC1 to do the same?Do you want the incoming CC to also control the knob? If so, is there a reason you don't want to use MIDI learn to control the knob?
-
@d-healey So what I am really doing this for is a piano library. One of the things that is often available in other piano libraries is increasing the mod wheel (CC1) to 64 to move from sustain samples to the staccato samples, this is the overall goal. On the interface I am also planning on having a slider that is always linked to CC1 just so there is a visual display of what the Mod value is. If the user decides, they could also use the slider on the interface to enable the staccato samples as well as an external CC input.
So I believe I want CC1 and the fader working in parallel. The only slight catch is that I think it may be good to give the option for the user to select a different CC using the Combobox. In this case I assume I am going to have a free CC and the slider working together and then convert from the free CC to the CC of choice for the user. Is that easy to do?
-
@afinch Like everything in programming, it's easy if you know how to do it.
Break it into three tasks.
UI Script (deferred):
In the knob's callback trigger the muter button based on the knob's value.
In the controller callback use the incoming CC value to control the knob.
In a second non-deferred script:
Use the incoming CC to trigger the muter button.
Stick with CC1 to begin with, letting the user select the CC is another task.
-
@d-healey Will do, thank you so much for all your help!