Kontakt multiscript - Control change to program change revisited.

Sampler and Sampling discussion (techniques, tips and tricks, etc.)
normanlevene
KVRist
65 posts since 31 Oct, 2011 from London

Post Mon Jul 16, 2018 1:50 am

Hey there guys.

I asked and had this question answered many years ago but need to make an update to it.

I'm looking for a simple Kontakt multiscript without a gui.

To convert CC7 with a value of 127 received on midi channel 4 into Prog change 10 transmitted on midi channel 2.

In simpler terms, when I turn the volume dial up all the way on midi channel 4 it sends a prog change of 10 to midi channel 2.

I'm avoiding having a gui because I'm thinking of making multiple additions to this.

Help me Obi Wan, you're my best and only hope. :)

Denny. x

User avatar
Zombie Queen
KVRAF
4443 posts since 1 Aug, 2005 from Warszawa, Poland

Re: Kontakt multiscript - Control change to program change revisited.

Post Mon Jul 16, 2018 6:11 am

Code: Select all

on midi_in
	if($MIDI_CHANNEL = 4 and $MIDI_COMMAND = $MIDI_COMMAND_CC and $MIDI_BYTE_1 = 7 and $MIDI_BYTE_2 = 127)
		set_midi(2,$MIDI_COMMAND_PROGRAM_CHANGE,9,0)
	end if
end on

User avatar
EvilDragon
KVRAF
16903 posts since 7 Jan, 2009 from Croatia

Re: Kontakt multiscript - Control change to program change revisited.

Post Mon Jul 16, 2018 6:38 am

Channels are zero based ;)

normanlevene
KVRist
65 posts since 31 Oct, 2011 from London

Re: Kontakt multiscript - Control change to program change revisited.

Post Mon Jul 16, 2018 6:39 am

Ooooops

Doesn't seem to be working.

My fault actually, I didn't fully explain.

I have been using program change to select different instrument banks.

On this occasion I wanted to use the volume knob.

So when I turn the volume dial on my synth up to '127' it selects instrument bank '10' in Kontakt.

N

normanlevene
KVRist
65 posts since 31 Oct, 2011 from London

Re: Kontakt multiscript - Control change to program change revisited.

Post Mon Jul 16, 2018 6:42 am

THANKS SENSEI EVIL DRAGON.

AND ZOMBIE QUEEN.

IT WORKS FINE.

I'VE OWED YOU A BEER FOR YEARS.

<3 <3 <3

normanlevene
KVRist
65 posts since 31 Oct, 2011 from London

Re: Kontakt multiscript - Control change to program change revisited.

Post Mon Jul 16, 2018 7:29 am

Is it possible to add playing a middle C on channel 2 as well as having a program change too?

E.g.

Turning the volume fully up plays note 48 on channel 2.

N.

User avatar
EvilDragon
KVRAF
16903 posts since 7 Jan, 2009 from Croatia

Re: Kontakt multiscript - Control change to program change revisited.

Post Mon Jul 16, 2018 7:39 am

Yes, you just change to a different MIDI command, like $MIDI_COMMAND_NOTE_ON. See KSP reference.


Oh and in the future, decide on which forum you're gonna post the question. Don't think there's a need to post it in multiple places ;)

normanlevene
KVRist
65 posts since 31 Oct, 2011 from London

Re: Kontakt multiscript - Control change to program change revisited.

Post Mon Jul 16, 2018 7:46 am

My apologies about the multiple places.

I don't always assume the same people will be able to help me every time.

I'll stick to KVR for now.

:)

User avatar
EvilDragon
KVRAF
16903 posts since 7 Jan, 2009 from Croatia

Re: Kontakt multiscript - Control change to program change revisited.

Post Mon Jul 16, 2018 7:49 am

Well I'm a regular at NI forums, so whatever. :)

normanlevene
KVRist
65 posts since 31 Oct, 2011 from London

Re: Kontakt multiscript - Control change to program change revisited.

Post Mon Jul 16, 2018 7:56 am

How would I type / format the command to play a note followed by a program change?
I know this doesn't work but something like....

on midi_in
if($MIDI_CHANNEL = 3 and $MIDI_COMMAND = $MIDI_COMMAND_CC and $MIDI_BYTE_1 = 85 and $MIDI_BYTE_2 >= 125)
set_midi(1,$MIDI_COMMAND_NOTE_ON,127,100) and (1,$MIDI_COMMAND_PROGRAM_CHANGE,14,0)
end if

User avatar
Zombie Queen
KVRAF
4443 posts since 1 Aug, 2005 from Warszawa, Poland

Re: Kontakt multiscript - Control change to program change revisited.

Post Mon Jul 16, 2018 8:27 am

repeat set_midi command

Code: Select all

set_midi(1,$MIDI_COMMAND_NOTE_ON,127,100)
set_midi(1,$MIDI_COMMAND_PROGRAM_CHANGE,14,0)
but since you are on midi level you will need to release the note eventually, or you'll get one playing forever, like:

Code: Select all

set_midi(1,$MIDI_COMMAND_NOTE_ON,127,100)
set_midi(1,$MIDI_COMMAND_PROGRAM_CHANGE,14,0)
wait($DURATION_QUARTER)
set_midi(1,$MIDI_COMMAND_NOTE_OFF,127,100)

normanlevene
KVRist
65 posts since 31 Oct, 2011 from London

Re: Kontakt multiscript - Control change to program change revisited.

Post Mon Jul 16, 2018 8:49 am

Thanks Zombie Queen.

This is perfect.

XXX

Return to “Samplers, Sampling & Sample Libraries”