Kontakt Mapping multiple sample in the same key and ability to manage volume per subgroup

madsteex
madsteex Member Posts: 12 Member
edited December 2022 in Scripting Workshop

Well it's a very long title and maybe confusing but let me explain what I'm trying to get.


I'm developing a drum library to be able to use with kontakt.


I've already did in the past but was simpler, I had 3 velocity for a kick and for snare for example, and multiple samples per each velocity so I've mapped using different group per each variation and basically used the random feature inside kontakt and all worked fine.


This time is a bit more complicated, at least for me.


I've multiple sample "type" per each midi notes: for example for the KICK I've to layer all on the note number 36 (C1) the DRY KICK, the ROOM KICK, the COMP KICK, and the TRIG KICK.

Each of these "type" has its own variation and velocity.


Let's say you play te key C1, should sound the DRY KICK + ROOM KICK + COMP KICK + TRIG KICK. According to the velocity played should be kept the correct velocity mapping.


About the room/trig/comp, should also be chosen the right samples related to the name of the dry signal. So if randomly played the KICK_variation_3 also the room/trig/comp should play the "variation_3".


Additionally I want to write a script to create knobs really basic (Iknow how to do that) to control the volume per each sample "type" so a knob for the COMP VOLUME, TRIG VOLUME, DRY VOLUME, ROOM VOLUME.


I can write the script to create the knobs and labels but which parameter should control?


Cause the real problem is how I have to map all and group all, can I control the bus? How to send to bus properly? I really do not know how to control all of these.


I've already recorded everything and named properly.


Please help. Thanks

Fabio

Comments

  • Paule
    Paule Member Posts: 1,328 Expert

    During K5 it was named as Multi Instrument


  • Gablux
    Gablux Member Posts: 71 Member

    Hi Fabio,

    What you are explaining is usually done with multiple groups.

    Each microphone sample is set in its own group, for example: Kick Room, goes to key 36 on group Room, Kick Dry goes to key 36 on group Dry and so on.

    Then you have ease control of each group pan, volume and other parameters you may need to control.

  • Gablux
    Gablux Member Posts: 71 Member

    Connecting parameters to knobs or other ui controls is done via script as well.

    first you declare the ui control as for instance

    on init
      declare ui_slider $room_volume(1,100)
    end on
    

    Then further in the script on a section called ui control callback you connect that control to whatever you want it to do, in this case to change the volume of a certain group:

    on ui_control($room_volume)
      set_engine_par($ENGINE_PAR_VOLUME, $room_volume * 100000, 0, -1, -1)
    end on
    

    Of course there's a lot more to it, since you may want that control to set a number of groups at the same time, you may want solo / mute functions. You just have to learn how to do each thing one at a time.

  • madsteex
    madsteex Member Posts: 12 Member

    Ok I did days ago and all is working...now I've the custom graphic knob which substitute the regular kontakt knob. The problem is that I'd like to show the amount in db while the knob is turning (actually are all sliders) and then will disappear... so basically a label text that appears and tells me the db in real time while turning.

    Help?

  • Gablux
    Gablux Member Posts: 71 Member

    use

    get_engine_par_disp($ENGINE_PAR_VOLUME, 0 [[group]], -1 [[slot]], -1 [[generic]])
    

    to get the display value of that engine parameter. In the example above you would obtain the volume of group 0. Use the same method to obtain any display value of any engine parameter.

    I don't recall for all parameters but for some (or maybe all) you may need to append the unit into the string returned from get_engine_par_disp, for example

    on init
    	declare ui_label $cutoff_label (1, 1)
    	declare ui_slider $cutoff(1,1000)
    end on
    
    on ui_control($cutoff)
    	set_engine_par($ENGINE_PAR_CUTOFF, cutoff*1000, -1, 2, $NI_INSERT_BUS)
            {note the appending with '& " hz"' }
    	set_text($cutoff_label, get_engine_par_disp($ENGINE_PAR_CUTOFF, -1, 2, $NI_INSERT_BUS) & " hz")
    end on
    
    
    
Back To Top