Nice tutorial on best practices. As a long-time programmer myself, i can attest that these basic principles serve well regardless of the language or platform. On another note, I have a pretty down-in-weeds question regarding using Group MIDI CC modulation for equal power volume crossfades between 2 groups of samples. Since the GUI that I am developing has a menu allowing the user to select from a number of ui_sliders to control with the modwheel, I need to have some control in script over the modwheel when it drives group volume crossfades. The other sliders that a user can choose for modwheel control drive various engine parameters such as envelope depth, lfo pitch depth, etc. I tried creating a pair of arrays based on the built-in pwr() function to allow the modwheel to drive group volume for equal power crossfade but I still get that mid-point dip in volume that doesn't occur if assigning MIDI CC modulators directly to group volume with the second one inverted. So, how can I disable these group MIDI CC modulation assignments in script for when the user chooses something other than "Crossfade" for the modwheel assignment from the GUI modwheel "target" menu? Your assistance would be greatly appreciated!
@StephenOConnellCmdShiftNew2 жыл бұрын
Hey, thanks so much and great question. I have found that same mid point dip too in scripting, but not in the modulators themselves as you describe. I think the easiest solution to your problem may be to use the $ENGINE_PAR_MOD_TARGET_INTENSITY parameter and set it to 0% when your "menu" doesn't included those modulators and 100% when your menu does include them. That way, by reducing the intensity it should remove the control the modulator has over that volume control. You could even create your own function and then call back that function when needed to save on code lines. Hope this helps.
@rawl7472 жыл бұрын
@@StephenOConnellCmdShiftNew Thanks so much for the suggestion. I will try this on "for size". Otherwise, we believe we have a RC1 ready for beta testing.
@rawl7472 жыл бұрын
@@StephenOConnellCmdShiftNew For those interested, here is essentially the code I ended up using: if ($NUM_GROUPS >1) $count := 0 while($count < $NUM_GROUPS) set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,0,$count,find_mod($count,"CC_VOLUME"),-1) inc($count) end while end if This sets the Intensity to 0 for when another parameter is being driven by the Modwheel. $count sets the Group number. Since there are Instruments in this library that don't have Crossfade as an option so they also don't have any Group External Modulator Source set to MIDI CC #1. Therefore the "find_mod($count,"CC_VOLUME"),-1)" statement is likely to return a 0 leading to the Intensity of some other Modulator used for a group to be inadvertantly set in this case to zero. The test for more than one Group insures that those single Group Instruments will not see this while loop ever excercised. This is just safe programming. There is of course a corresponding statement that sets the Intensity to 100% for both groups when the Instrument DOES include a Crossfade between two groups of dissimilar samples. No more Crossfade volume dips as the Modwheel transits the midpoint!
@ronnyb58902 жыл бұрын
as always,a great tutorial Stephen,i have two questions,1) why writing the init block in slot 4 in stead of slot 1,slot 1 is read first first i presume,so in slot 4 it will be read last,or am i wrong?...2) can you explain on how to make labels for readout when you have a skinned knob (slider) with the normal kontakt knobs the labels are already there,but with skinned knobs you must make your own would like to know how to create them and asign the readout of an effect into the label with extension like %,db,etc,cheers mate
@StephenOConnellCmdShiftNew2 жыл бұрын
Ah, I’m so glad you asked about labels, I’m working on a project at the moment that uses these and I am definitely going to be showing these off as soon as I can, hopefully in the next month. There is a ui_label variable that you can use to make these. As for the slots, it is largely due to convention, a bit of a habit. Kontakt has some script presets, for harmonisers or arpeggiators for example, that can be called up in the other script slots. You then want your GUI to be in the final slot, so that the arp can be called into being first and then you can affect it from the GUI slot. So, the order is definitely important and you are right, it reads left to right first. Ultimately, if you just have one script you can place it anywhere you like, I’m just sticking to an old habit that was a best practise that I was taught.
@ronnyb58902 жыл бұрын
@@StephenOConnellCmdShiftNew thanx Stephen looking forward to your video,ok for the slots,now i know why you put the GUI in the last one,have a great evening,cheers mate