1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

K5 Instrument bank multi script bug?

Discussion in 'Technical Issues - KOMPLETE (Archive)' started by Marsdy, Nov 14, 2011.

  1. Marsdy

    Marsdy NI Product Owner

    Messages:
    41
    I think I've come up against what for me is a critical bug in K5

    I'm using Instrument Banks and the Notes to Program Change multi script to create large keyswitch Multis. I have a large number of these Multis in my VE Pro template.

    I've just transitioned my template from K4 to K5. The problem is this: the Notes to Program Change multi script in Kontakt 5 no longer remembers the note range for the keyswitches. Every time I reload a multi, the script resets to the default of C1 to C2 and my keyswitch mapping is destroyed. In short, this completely breaks my template.

    I've tried saving out the Notes to Program Change multi script with the correct note range set. I've tried locking the Notes to Program Change multi script. Nothing has worked.

    This is complete disaster for me. I've just wasted the best part of a week moving my large VE PRo template to K5 and it has been a total waste of time. :-(

    Any ideas?
    ---
    EDIT with new info:
    OK it appears that when using Instrument Banks in a Multi, Kontakt 5 doesn't recall the settings of ANY Instrument Bank Mutli Script when a Multi is reloaded. I've tried a few Factory Multi Scripts now and NONE of them recall their settings.

    This is a nasty little bug!
     
    Last edited: Nov 14, 2011
  2. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Cannot replicate here...
     
  3. Marsdy

    Marsdy NI Product Owner

    Messages:
    41
    Damn!

    It's not working at all here on a Mac. I've tried K5 hosted in VE Pro, Pro Tools HD9 and standalone and the problem is 100% reproducible in every version. The multi script controls get reset to their defaults every time I reload the multi. This is killing me!

    I don't get the issue in Kontakt 4.
     
  4. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Try to click on "Edit" button in the multiscript section for the slot which has the Notes to PC script, and see if you have any lines with make_persistent command. If you do, it should work. If you don't, then NI messed up.

    The Notes to PC script should look like this:

    Code:
    on init
    	message("")
    	set_script_title("Notes to Prog Change")
    	set_ui_height(2)
    	
    	declare $count
    	declare $prog_num
    	declare $learn_counter
    	declare $a
    	
    	declare ui_switch $learn_button
    	set_text($learn_button,"Learn Keyrange")
    	
    	declare ui_label $label_1 (2,1)
    	set_text ($label_1,"Transform the note range from")
    	
    	declare ui_label $label_2 (1,1)
    	set_text ($label_2,"to PC starting at:")
    	
    	declare ui_label $readout_label (2,1)
    	set_text ($readout_label,"Out:")
    	
    	declare ui_value_edit $Min (0,127,$VALUE_EDIT_MODE_NOTE_NAMES)
      	$Min := 36
    	
    	declare ui_value_edit $Max (0,127,$VALUE_EDIT_MODE_NOTE_NAMES)
      	$Max := 48
      	
      	declare ui_value_edit $First (1,128,1)
    	
    	make_persistent ($Min)
    	make_persistent ($Max)
    	make_persistent ($First)
    	
    	set_control_help ($learn_button,"Learn: Click to enable MIDI Learn for the keyrange. The keyrange is set by the next two received MIDI notes.")
    	set_control_help ($Min,"Min: The lower limit of the keyrange. All notes between <Min> and <Max> will not be played but transfromed into Program Change values.")
    	set_control_help ($Max,"Max: The higher limit of the keyrange. All notes between <Min> and <Max> will not be played but transfromed into Program Change values.")
    	set_control_help ($First,"First: Sets the program change value for the lowest, i.e. <Min> note.")
    	set_control_help ($readout_label,"Out: Displays the sent Program Change values as well as the MIDI channel.")
    	
    	move_control ($learn_button,1,3)
    	move_control ($label_1,2,2)
    	move_control ($Min,2,3)
    	move_control ($Max,3,3)
    	move_control ($label_2,4,2)
    	move_control ($First,4,3)
    	move_control ($readout_label,5,3)
    end on
    
    on ui_control ($Min)
    	if ($Min > $Max)
    		$Max := $Min
    	end if
    end on
    
    on ui_control ($Max)
    	if ($Max < $Min)
    		$Min := $Max
    	end if
    end on
    
    on midi_in
    	if ($MIDI_COMMAND = $MIDI_COMMAND_NOTE_ON and $MIDI_BYTE_2 > 0)
    	
    		{Key Range}
    		if ($learn_button = 1)
    			if ($learn_counter = 0)
    				$Min := $MIDI_BYTE_1
    				inc($learn_counter)
    			else
    				$Max := $MIDI_BYTE_1
    				$learn_counter := 0
    				$learn_button := 0
    				
    				if ($Min > $Max)
    					$a := $Max
    					$Max := $Min
    					$Min := $a
    				end if
    			end if
    			ignore_midi
    			exit
    		end if
    		
    		if (in_range($MIDI_BYTE_1,$Min,$Max))
    			ignore_midi
    			$prog_num := $MIDI_BYTE_1- $Min+ $First- 1
    			if ($prog_num > 127)
    				$prog_num := 127
    			end if
    			set_midi($MIDI_CHANNEL,$MIDI_COMMAND_PROGRAM_CHANGE,$prog_num,0)
    			set_text ($readout_label,"Out: PC #" & $prog_num+1 & " on MIDI Channel " & $MIDI_CHANNEL+1)
    			
    		end if
    	end if
    	
    	{Note Off Simple}
    	if (($MIDI_COMMAND = $MIDI_COMMAND_NOTE_ON and $MIDI_BYTE_2 = 0))
    		if (in_range($MIDI_BYTE_1,$Min,$Max))
    			set_text ($readout_label,"Out:")
    		end if
    	end if
    	
    	{Note Off True}
    	if ($MIDI_COMMAND = $MIDI_COMMAND_NOTE_OFF)
    		if (in_range($MIDI_BYTE_1,$Min,$Max))
    			set_text ($readout_label,"Out:")
    		end if
    	end if
    	
    end on
    
    If it doesn't look like that, then paste this code and press "Apply", set your keyrange, and it MUST work then!
     
    Last edited: Nov 14, 2011
  5. Marsdy

    Marsdy NI Product Owner

    Messages:
    41
    Many thanks for your help here!

    There are three lines with the make_persistent command

    make_persistent ($Min)
    make_persistent ($Max)
    make_persistent ($First)

    My The Notes to PC script is a little different to the one you posted. Did you post the Note Numbers To CC script ?
     
  6. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Oh, you're right, my bad! Wrong script posted in a hurry. :D Editing the post...


    Anyways, if you have those make_persistent lines, it must work...
     
  7. Marsdy

    Marsdy NI Product Owner

    Messages:
    41
    I've compared your script with the factory K5 one and they look identical. I've replaced the factory script with your one and clicked on Apply. The script works as expected.

    So.. I change the note range settings then I save out the Multi and click on Reset Multi so nothing is loaded.

    Then I open the Multi I've just saved out and the note range settings have reset to the default, NOT where I left them when I saved the Multi out! AAAAARGH!

    I've tried various scripts now and the results are the same every time. Any changes I make are not recalled when the multi is reloaded.
     
  8. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Is it happening in Kontakt standalone, as well? If not, then it's probably some setting that needs to be changed in VI Pro... If not, it's likely a K5 bug.

    I would suggest to keep using K4 for your current projects, and just add K5 if you REALLY need it, just for some things. K5 still needs some bug squashing to be done. (K4 also has its share of bugs, but they are unlikely to be fixed now that K5 is out anyways.)
     
  9. Marsdy

    Marsdy NI Product Owner

    Messages:
    41
    It's happening in K5 standalone, the AU version in VE Pro and the RTAS version in Pro Tools.

    Yes I've gone back to my old K4 template and contacted NI support.

    Many thanks for trying to help!
     
  10. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    I can confirm the bug in K5, but not in K4. Definitely a bug from NI's side.
     
  11. Marsdy

    Marsdy NI Product Owner

    Messages:
    41
    COOL. Nice to know I'm not the only one! K4 works fine here too.

    I've been in touch with NI support and given them steps to reproduce it.
     
  12. Christian @ NI

    Christian @ NI NI Team NI Team

    Messages:
    44
    Weird, I cannot reproduce with Kontakt 5:

    I do the following steps:
    - copy and paste the script above into an empty multi
    - set custom settings
    - save the multi as patch without samples
    - reset mutli in the file menu
    - load the saved multi again
    -> the custom settings are still applied

    Could you write down your steps in the above fashion?

    thanks!
     
  13. Marsdy

    Marsdy NI Product Owner

    Messages:
    41
    Hi Christian

    These are the steps that reproduce the issue here:

    Start with an empty multi...

    1. Create an INSTRUMENT BANK from the File menu in K5.
    2. Add a few instruments (two or three,) to the INSTRUMENT BANK. <--------- THIS STEP IS
    VERY IMPORTANT TO REPRODUCE THE BUG.
    3. Add the Factory > Transform > Note to Prog Change script to the first
    slot in the Script panel. The note range values default to Min: C1 Max: C2
    4. Change the note range values to something other than C1 to C2
    5. Save the multi
    6. Reset the multi in the K5 File menu so you have an empty rack.
    7. Reload the multi and the note range values in the Note to Prog Change
    script have reset to the default of C1 to C2. The saved settings in the multi have
    not been recalled! This is 100% reproducible here!

    ALL multi scripts are affected, not just the notes to program change script. None of them recall their settings and reset to the defaults. The OSX standalone version, the AU version and the RTAS version are all affected.

    Stephan in NI Support has been looking into this but I don't think he has been able to reproduce it. I have sent him a multi that does NOT recall the settings here but DOES recall the settings when Stephan opens it. Weird! I've also just sent him my NI Support Tool results.
     
  14. Marsdy

    Marsdy NI Product Owner

    Messages:
    41
    I've got a workaround from NI, (their support has been excellent by the way.... thanks Stephan!)

    If Undo is turned off in K5 Options then Multi script settings are recalled correctly when a Multi is reloaded.
     
  15. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Very good. But this workaround is not needed in Kontakt 4, so this still classifies as a bug, which should hopefully be resolved in K5.0.2.
     
  16. Marsdy

    Marsdy NI Product Owner

    Messages:
    41
    I should have said.... NI have now reproduced the issue at their end so hopefully there will be a fix soon.