Kontakt Multiscript to scale CC11/CC1/Velocity

Sampler and Sampling discussion (techniques, tips and tricks, etc.)
Post Reply New Topic
RELATED
PRODUCTS

Post

Hey guys,

Is this even possible? I'd love just 3 knobs to adjust an exponential curve to be more convex or concave for CC11, CC1 and Velocity. Basically adjusting the response coming into the instruments using a Multiscript.

Does anyone know if this is possible?

Thanks!

Post

Possible? Sure. I think, factory script 'change velocity' could be easily modified to act as multiscript.

Post

Oh wow, yeah, that is exactly what I need! Thank you for pointing it out :) How difficult is it to convert something like this to multiscript?

Post

Here's 5 minute mod.

Take "Change Velocity" factory script, copy it to some text editor.
Now, remove "on note" and "on release" callbacks, which are not supported in multiscript.
Find "on note" line and remove the portion of code until "end on" line. Same with "on release".

Insert following code in "on init" callback (after "on init" line, but before following "end on" line)

Code: Select all

declare ui_value_edit $cc_number (1,127,1)
set_text($cc_number,"cc")
make_persistent($cc_number)
This will create value edit box to define which cc to transform.

Now insert following code at the end of script.

Code: Select all

on midi_in
	if($MIDI_COMMAND = $MIDI_COMMAND_CC and $MIDI_BYTE_1 = $cc_number)
		$new_vel := %table[$MIDI_BYTE_2]+ random(-$Randomize,$Randomize)
		if ($new_vel < 0)
			$new_vel := 0
		end if
		if ($new_vel > 127)
			$new_vel := 127
		end if
		set_text ($out_label,"Out: " & $MIDI_BYTE_2 & " > " & $new_vel)
		set_midi($MIDI_CHANNEL,$MIDI_COMMAND,$MIDI_BYTE_1,$new_vel)
		ignore_midi
	end if
end on
You may also want to change "Min" knob range, as CC value, unlike velocity, can be zero.
Find: "declare ui_knob $MinS (1,127,1)", change to: "declare ui_knob $MinS (0,127,1)"

That should to the trick.

Post

This is perfect, thank you so much for taking the time to walk me through this. Is there any way to convert the script as is as well so that I can modify velocity? Without note on and off callbacks would that complicate transfering the scripts original function to multiscript?

Post

It's quite easy. Here's midi in callback to handle velocity:

Code: Select all

on midi_in
	if($MIDI_COMMAND = $MIDI_COMMAND_NOTE_ON and $MIDI_BYTE_2 #0)
		$new_vel := %table[$MIDI_BYTE_2]+ random(-$Randomize,$Randomize)
		if ($new_vel < 1)
			$new_vel := 1
		end if
		if ($new_vel > 127)
			$new_vel := 127
		end if
		set_text ($out_label,"Out: " & $MIDI_BYTE_2 & " > " & $new_vel)
		set_midi($MIDI_CHANNEL,$MIDI_COMMAND,$MIDI_BYTE_1,$new_vel)
		ignore_midi
	end if
end on
I haven't tested this, but you can get the idea. Forget incoming note, generate new one with changed velocity. It's almost the same as with CC, just catching different command and skipping notes with zero velocity (as they act as note off message).

Post

Change velocity actually DOES exist as a factory multiscript already. :)

Post

Ah, so... we blasted an open door.

Post Reply

Return to “Samplers, Sampling & Sample Libraries”