# Controlling a kontakt instrument's volume slider



## windshore (Jan 13, 2012)

Seems like this should be embarrassingly easy, but I have searched and can't find a good solution.

Is there a way to get control (by automate or cc) of the volume slider in an individual kontakt instrument without using midi assign?

To be clear, I'm not talking about "Kontakt" volume but an individual instrument within a multi. There's got to be a more efficient way than having to use midi assign for each volume slider within a multi.

thanks


----------



## windshore (Jan 13, 2012)

k, 25 views, no answers, I guess my fears are realized, you can't do it. 

More proof is that if I move the slider while logic is in latch mode, looking at event data shows nothing and my movement with mouse doesn't play back.

Seems like there should still be a way around this without assigning each slider.


----------



## studioj (Jan 13, 2012)

weird my post went away.

anyway, I think you can attach kontakt automation #'s to volume sliders to show up as automation in an AU host like logic?

oh i see you're trying to avoid the assign thing all together not just MIDI assign. Yeah I don't think so. many instruments are pre-programmed to respond to cc11 and 7 this way but def not all.


----------



## windshore (Jan 13, 2012)

yep, I've been having to do it that way for years, but now using Kontakt in VEP more and more, I hate having to switch programs, digging up the Kontakt instruments finding the particular instance, assigning a CC etc. I know you can do this and save as a template, but there are times where you still need to re-balance. (And some developers are not using cc11 so it would be nice to access the K instrument slider by default.)


----------



## Tod (Jan 13, 2012)

windshore @ Fri Jan 13 said:


> Is there a way to get control (by automate or cc) of the volume slider in an individual kontakt instrument without using midi assign?



I'm sure I'm misunderstanding your question windshore, but there are options in both the global and instrument for both CC7 Volume and CC10 Pan. 

If you haven't set those up then that might be what you need to do. In the Multi global options you can set up the default volume amount and in Instrument options you have to first check mark it so that it's on and then set the value.

I sure that's not what your asking, sorry.. 

Also you can add CC11 to each group of an instrument and then save the file.


----------



## windshore (Jan 13, 2012)

Thanks Tod,
Yeah, those settings you mention are only for default volume, so you can set volume and range on load. The volume slider does work with cc7 in stand-alone mode, but when inserted in a track like Logic or PT, cc7 controls the DAW channel strip and does nothing to the Kontakt slider.


----------



## mk282 (Jan 14, 2012)

Then you need to link sending CC7 from your DAW track volume fader to the instrument track that holds the Kontakt instance. It should work when you do that.


----------



## Signoaudiodesign (Jan 16, 2012)

In Logic make a new track with one instance of Kontakt. In Logic's side menu put the MIDI channel to 1. In Kontak drag the Host automation CC on a knob. In Logic make other tracks with track menu "New track with next MIDI channel", put the tracks automation mode to touch, record and move knob.
Reply With Quote


----------



## windshore (Jan 16, 2012)

Sorry, maybe it's tough to be clear about this. mk282, if you link sending CC7 from DAW to the instrument track, you affect the volume of ALL instruments in the Kontakt Multi.

Signoaudiodesign you've described how to create multi tracks in Logic, but they all exist on a single volume fader in logic. 

I'm wanting to have access to individual volume sliders within a multi in Kontakt and though you can midi-assign once for every instrument within a multi, it seems silly to have to assign 16 and potentially more instruments. I know you can then save the multi, but with the number of Libs I have it's not practical.

It appears that any workaround is too cumbersome and that this is simply the only way that NI deems it necessary for us to have that functionality. oh well...


----------



## mk282 (Jan 16, 2012)

I guess you'll then need to have a separate MIDI track that sends CC7 for every instrument you have loaded in Kontakt. You can also automate the instrument sliders to any CC you want - or even use host automation for that (which is a preferred option).

Would a multiscript that controls instrument volumes help you, perhaps? Try pasting this script into Kontakt's multiscript editor:


```
on init
	set_ui_height(5)

	declare $i
	declare $j
	declare $sel

	declare ui_label $CH1 (1,1)
	declare ui_label $CH2 (1,1)
	declare ui_label $CH3 (1,1)
	declare ui_label $CH4 (1,1)
	declare ui_label $CH5 (1,1)
	declare ui_label $CH6 (1,1)
	declare ui_label $CH7 (1,1)
	declare ui_label $CH8 (1,1)
	declare ui_label $CH9 (1,1)
	declare ui_label $CH10 (1,1)
	declare ui_label $CH11 (1,1)
	declare ui_label $CH12 (1,1)
	declare ui_label $CH13 (1,1)
	declare ui_label $CH14 (1,1)
	declare ui_label $CH15 (1,1)
	declare ui_label $CH16 (1,1)

	declare ui_slider $1 (0,1000000)
	declare ui_slider $2 (0,1000000)
	declare ui_slider $3 (0,1000000)
	declare ui_slider $4 (0,1000000)
	declare ui_slider $5 (0,1000000)
	declare ui_slider $6 (0,1000000)
	declare ui_slider $7 (0,1000000)
	declare ui_slider $8 (0,1000000)
	declare ui_slider $9 (0,1000000)
	declare ui_slider $10 (0,1000000)
	declare ui_slider $11 (0,1000000)
	declare ui_slider $12 (0,1000000)
	declare ui_slider $13 (0,1000000)
	declare ui_slider $14 (0,1000000)
	declare ui_slider $15 (0,1000000)
	declare ui_slider $16 (0,1000000)

	declare ui_value_edit $CC1 (0,119,1)
	declare ui_value_edit $CC2 (0,119,1)
	declare ui_value_edit $CC3 (0,119,1)
	declare ui_value_edit $CC4 (0,119,1)
	declare ui_value_edit $CC5 (0,119,1)
	declare ui_value_edit $CC6 (0,119,1)
	declare ui_value_edit $CC7 (0,119,1)
	declare ui_value_edit $CC8 (0,119,1)
	declare ui_value_edit $CC9 (0,119,1)
	declare ui_value_edit $CC10 (0,119,1)
	declare ui_value_edit $CC11 (0,119,1)
	declare ui_value_edit $CC12 (0,119,1)
	declare ui_value_edit $CC13 (0,119,1)
	declare ui_value_edit $CC14 (0,119,1)
	declare ui_value_edit $CC15 (0,119,1)
	declare ui_value_edit $CC16 (0,119,1)
	
	declare %ID[48]
	%ID[ 0] := get_ui_id($CH1)
	%ID[ 1] := get_ui_id($CH2)
	%ID[ 2] := get_ui_id($CH3)
	%ID[ 3] := get_ui_id($CH4)
	%ID[ 4] := get_ui_id($CH5)
	%ID[ 5] := get_ui_id($CH6)
	%ID[ 6] := get_ui_id($CH7)
	%ID[ 7] := get_ui_id($CH8)
	%ID[ 8] := get_ui_id($CH9)
	%ID[ 9] := get_ui_id($CH10)
	%ID[10] := get_ui_id($CH11)
	%ID[11] := get_ui_id($CH12)
	%ID[12] := get_ui_id($CH13)
	%ID[13] := get_ui_id($CH14)
	%ID[14] := get_ui_id($CH15)
	%ID[15] := get_ui_id($CH16)
	%ID[16] := get_ui_id($1)
	%ID[17] := get_ui_id($2)
	%ID[18] := get_ui_id($3)
	%ID[19] := get_ui_id($4)
	%ID[20] := get_ui_id($5)
	%ID[21] := get_ui_id($6)
	%ID[22] := get_ui_id($7)
	%ID[23] := get_ui_id($8)
	%ID[24] := get_ui_id($9)
	%ID[25] := get_ui_id($10)
	%ID[26] := get_ui_id($11)
	%ID[27] := get_ui_id($12)
	%ID[28] := get_ui_id($13)
	%ID[29] := get_ui_id($14)
	%ID[30] := get_ui_id($15)
	%ID[31] := get_ui_id($16)
	%ID[32] := get_ui_id($CC1)
	%ID[33] := get_ui_id($CC2)
	%ID[34] := get_ui_id($CC3)
	%ID[35] := get_ui_id($CC4)
	%ID[36] := get_ui_id($CC5)
	%ID[37] := get_ui_id($CC6)
	%ID[38] := get_ui_id($CC7)
	%ID[39] := get_ui_id($CC8)
	%ID[40] := get_ui_id($CC9)
	%ID[41] := get_ui_id($CC10)
	%ID[42] := get_ui_id($CC11)
	%ID[43] := get_ui_id($CC12)
	%ID[44] := get_ui_id($CC13)
	%ID[45] := get_ui_id($CC14)
	%ID[46] := get_ui_id($CC15)
	%ID[47] := get_ui_id($CC16)

	{ starting CC values }
	$i := 0
	while ($i < 16)
		set_control_par(%ID[32 + $i],$CONTROL_PAR_VALUE,101 + $i)
		set_control_par(%ID[16 + $i],$CONTROL_PAR_VALUE,get_engine_par_m($ENGINE_PAR_VOLUME,$i,-1,-1))
		inc($i)
	end while

	make_persistent($1)
	make_persistent($2)
	make_persistent($3)
	make_persistent($4)
	make_persistent($5)
	make_persistent($6)
	make_persistent($7)
	make_persistent($8)
	make_persistent($9)
	make_persistent($10)
	make_persistent($11)
	make_persistent($12)
	make_persistent($13)
	make_persistent($14)
	make_persistent($15)
	make_persistent($16)
	make_persistent($CC1)
	make_persistent($CC2)
	make_persistent($CC3)
	make_persistent($CC4)
	make_persistent($CC5)
	make_persistent($CC6)
	make_persistent($CC7)
	make_persistent($CC8)
	make_persistent($CC9)
	make_persistent($CC10)
	make_persistent($CC11)
	make_persistent($CC12)
	make_persistent($CC13)
	make_persistent($CC14)
	make_persistent($CC15)
	make_persistent($CC16)

	move_control($1,1,2)
	move_control($2,2,2)
	move_control($3,3,2)
	move_control($4,4,2)
	move_control($5,5,2)
	move_control($6,6,2)
	move_control($7,1,5)
	move_control($8,2,5)
	move_control($9,3,5)
	move_control($10,4,5)
	move_control($11,5,5)
	move_control($12,6,5)
	move_control($13,2,8)
	move_control($14,3,8)
	move_control($15,4,8)
	move_control($16,5,8)
	move_control($CH7,1,4)
	move_control($CH8,2,4)
	move_control($CH9,3,4)
	move_control($CH10,4,4)
	move_control($CH11,5,4)
	move_control($CH12,6,4)
	move_control($CH13,2,7)
	move_control($CH14,3,7)
	move_control($CH15,4,7)
	move_control($CH16,5,7)
	move_control($CC7,1,6)
	move_control($CC8,2,6)
	move_control($CC9,3,6)
	move_control($CC10,4,6)
	move_control($CC11,5,6)
	move_control($CC12,6,6)
	move_control($CC13,2,9)
	move_control($CC14,3,9)
	move_control($CC15,4,9)
	move_control($CC16,5,9)

	$i := 0
	while ($i < 16)
		set_control_par(%ID[16 + $i],$CONTROL_PAR_DEFAULT_VALUE,631000)
		set_control_par(%ID[$i],$CONTROL_PAR_TEXT_ALIGNMENT,1)
		set_control_par_str(%ID[$i],$CONTROL_PAR_TEXT,"Ch " & $i + 1 & ": " & get_engine_par_disp_m($ENGINE_PAR_VOLUME,$i,-1,-1) & " dB")
		set_control_par_str(%ID[32 + $i],$CONTROL_PAR_TEXT,"CC")
		inc($i)
	end while

	message("")
end on



function Vol
	set_engine_par_m($ENGINE_PAR_VOLUME,get_control_par(%ID[16 + $sel],$CONTROL_PAR_VALUE),$sel,-1,-1)
	set_control_par_str(%ID[$sel],$CONTROL_PAR_TEXT,"Ch " & $sel + 1 & ": " & get_engine_par_disp_m($ENGINE_PAR_VOLUME,$sel,-1,-1) & " dB")
end function


on midi_in
	if ($MIDI_COMMAND = $MIDI_COMMAND_CC)
		$j := 0
		while ($j < 16)
			if ($MIDI_BYTE_1 = get_control_par(%ID[32 + $j],$CONTROL_PAR_VALUE))
				set_control_par(%ID[16 + $j],$CONTROL_PAR_VALUE,$MIDI_BYTE_2 * 7875)
				$sel := $j
				call Vol
			end if
			inc($j)
		end while
	end if
end on


on ui_control ($1)
	$sel := 0
	call Vol
end on

on ui_control ($2)
	$sel := 1
	call Vol
end on

on ui_control ($3)
	$sel := 2
	call Vol
end on

on ui_control ($4)
	$sel := 3
	call Vol
end on

on ui_control ($5)
	$sel := 4
	call Vol
end on

on ui_control ($6)
	$sel := 5
	call Vol
end on

on ui_control ($7)
	$sel := 6
	call Vol
end on

on ui_control ($8)
	$sel := 7
	call Vol
end on

on ui_control ($9)
	$sel := 8
	call Vol
end on

on ui_control ($10)
	$sel := 9
	call Vol
end on

on ui_control ($11)
	$sel := 10
	call Vol
end on

on ui_control ($12)
	$sel := 11
	call Vol
end on

on ui_control ($13)
	$sel := 12
	call Vol
end on

on ui_control ($14)
	$sel := 13
	call Vol
end on

on ui_control ($15)
	$sel := 14
	call Vol
end on

on ui_control ($16)
	$sel := 15
	call Vol
end on
```


Now you get 16 sliders for 16 MIDI channels, you can learn them to MIDI CCs and control them from your DAW.


----------



## windshore (Jan 16, 2012)

mk282 @ 1/16/2012 said:


> I guess you'll then need to have a separate MIDI track that sends CC7 for every instrument you have loaded in Kontakt. You can also automate the instrument sliders to any CC you want - or even use host automation for that (which is a preferred option).
> 
> Would a multiscript that controls instrument volumes help you, perhaps? Try pasting this script into Kontakt's multiscript editor:
> 
> Now you get 16 sliders for 16 MIDI channels, you can learn them to MIDI CCs and control them from your DAW.



Well, thanks, I'll have to check this out!


----------



## mk282 (Jan 16, 2012)

Just a slight correction - you cannot right-click MIDI learn the sliders in a multiscript - but use the value edits to enter the CC you want to use for that respective slider.


----------



## windshore (Jan 16, 2012)

The script is functional, and thanks, but I was hoping to use the same CC for each track. (so as I select a track I can quickly make a volume adjustment with the same controller.)

You set me on the right course though. I found a simple answer by using the Mulit-Script Transformer preset. I've attached a screenshot. All I had to do was tell the Multi what CC (in this case 3) to use instead of CC7 for all instruments.

There is still a wrinkle though and maybe someone can help figure it out. 

With this method when sending midi value of 127 (Max) only goes to Zero DB. If I mid-assign a controller to the slider, it'll go to +12DB??? 

thanks!~


----------



## windshore (Jan 16, 2012)

I see, CC7 value of 127 brings it up to whatever the default Volume Range is in each of the instruments. 

It's still odd that if you actually midi-assign a controller to the fader it'll go up to +12 regardless of what the default range is....

I'm pretty happy with what I've got so far, but it'd be nice to get the extra range. Any ideas?


----------



## mk282 (Jan 16, 2012)

Below every slider you have a value edit which chooses which CC is going to be used for that slider. So, you can set all 16 sliders to CC7, without any problems. I think. No need to use any other scripts along this one.


----------

