Changing NoteNumber Modulator parameters via script
-
@ulrik I mean if you use an individual sample for each note
-
@ulrik Unfortunately Array Modulator doesn't work for me either. When you change a note, the previous one immediately takes on the value of the new played one.
But anyway, thanks for the advice! -
@ulrik Accessing the sample's pan value is what I need if there is no way to change the pan of a single note. Perhaps you can tell me how I can access the panorama of a sample through a script?
Sorry if this is a stupid question, I'm just new to HISE and before that I wrote scripts only for KONTAKT. -
It's not possible but it should be, I'll add a feature request.
-
Actually if you look in this thread Christoph offers a solution - https://forum.hise.audio/topic/2315/change-specific-samples-pan/9?_=1624631954795
-
@d-healey Thank You, I will definitely try this!
-
@Evan-Splash with this script you're able to set pan per sample, if you have the sample mapped on several notes, all will be affected
HiseSnippet 1335.3oc4X80aSbDD+t3bHrKFUP7PeoRqh5CNRTvFBPqppvDmDjUIfUt.s7Ri1b2b1q3tcOs2dI3h3qR+LzOB4iDeCZmcu67s1XBoQMTTadxyL6Lyuclc9ykQRQ.jkIjNtM2eZJ33dEO+ob0jASnLtyvsP9dJHSkR4NaNMklkAgNttMdrVrayUcL+8tGtIMlxCfZVNNuPvBfmvRXpZti5+Sr33cngv9rDqSuQ+gAB9.QrHGgRCutNozfWQGCOkpO1JdNtWZ6PlRH8UTDONtqtoHbp+Dww7hy+BVF6vXPSzywGMTA6cDwgZDq45LXBKNbT0UNyww0aTc.nQQ.3Fd6xBYy3WGH9Ri.RsF1wC2UNM30yFdcO6vy0BdqV.uq44GHYopZIZr8EdC4JPFQwTfMrJNqyJ+9JdCD3I3pakPeEriDIloQm60s6MIazs65+P6Vsac6aSHJzWgjLZRZLHIYFqPjPDHALK2tElrxTjinRhewY5Q9Qh4gysFCpRdcVqR3Z0VdXDYpHmbLkqHJAAOMQMAH36q1sz1C+g1TkJZrlHmqCKofTMsyLIin7aRrfrODCAEFq.2y4mfIT9XfLR6lYlHynhw9YcVKkFmbvg.O7.a75i.jCGav0Qz3bPaMiSLJOKJ0tEiGy3.IJmGnXBNQvQuoi5RQbm.QRpfiw+aVXk0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ZBOJWIRJZRhLFscwCK2sm8vpgyego9dS+
-
@Christoph-Hart is this a good/bad way to change the sample properties?
I know you shouldn't use it in the NoteOn callback but else, is it ok? -
@Evan-Splash I use this setup for controlling pan values
It's 15 panknbs and 15 notes
To find the samples to change I use theSampler1.getSoundProperty(3, i);
to get the "Root" of the sample and then it's simple to iterate over all samples selected
In this instrument there is 4 round robin groups
// Pan -------------------------------------- // Selects all samples Sampler1.selectSounds(""); // get number of samples selected var NUMSelected = Sampler1.createListFromScriptSelection().length; // lookup array (note numbers) var indexList = ["48", "50", "52", "53", "55", "57", "59", "60", "62", "64", "65", "67", "69", "71", "72"]; inline function onPanKnbsControl(component, value) { local index = PanKnbs.indexOf(component); { if (value) { for (i = 0; i < NUMSelected; i++) { // property 3 = sample "Root" local root = Sampler1.getSoundProperty(3, i); if (root == indexList[index]) { Sampler1.setSoundProperty(i, 9, value); } } } } } for (p in PanKnbs) { p.setControlCallback(onPanKnbsControl); }
-
@ulrik This is what I need! Thank you so much!
-
@Evan-Splash and instead of using "magic" numbers for the attributes
// Pan -------------------------------------- inline function onPanKnbsControl(component, value) { // Selects all samples Sampler1.selectSounds(""); // get number of samples selected var NUMSelected = Sampler1.getNumSelectedSounds(); // lookup array (note numbers) var indexList = ["48", "50", "52", "53", "55", "57", "59", "60", "62", "64", "65", "67", "69", "71", "72"]; for (i = 0; i < NUMSelected; i++) { local index = PanKnbs.indexOf(component); local root = Sampler1.getSoundProperty(Sampler1.Root, i); if (root == indexList[index]) { Sampler1.setSoundProperty(i, Sampler1.Pan, PanKnbs[index].getValue()); } } } for (p in PanKnbs) { p.setControlCallback(onPanKnbsControl); }
-
@ulrik Thank you so much, I will try it tomorrow!
-
@ulrik This works great, this is what I was looking for! Thanks again for the help
-
@Evan-Splash I'm glad it worked for your case!