Login / Register 0 items | $0.00 New @ KVR
normanlevene
KVRist
 
65 posts since 31 Oct, 2011, from London

Postby normanlevene; Mon Jul 16, 2018 1:50 am Kontakt multiscript - Control change to program change revisited.

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
 
4425 posts since 1 Aug, 2005, from Warszawa, Poland

Postby Zombie Queen; Mon Jul 16, 2018 6:11 am Re: Kontakt multiscript - Control change to program change revisited.

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
 
16596 posts since 6 Jan, 2009, from Croatia

Postby EvilDragon; Mon Jul 16, 2018 6:38 am Re: Kontakt multiscript - Control change to program change revisited.

Channels are zero based ;)
normanlevene
KVRist
 
65 posts since 31 Oct, 2011, from London

Postby normanlevene; Mon Jul 16, 2018 6:39 am Re: Kontakt multiscript - Control change to program change revisited.

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

Postby normanlevene; Mon Jul 16, 2018 6:42 am Re: Kontakt multiscript - Control change to program change revisited.

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

Postby normanlevene; Mon Jul 16, 2018 7:29 am Re: Kontakt multiscript - Control change to program change revisited.

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
 
16596 posts since 6 Jan, 2009, from Croatia

Postby EvilDragon; Mon Jul 16, 2018 7:39 am Re: Kontakt multiscript - Control change to program change revisited.

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

Postby normanlevene; Mon Jul 16, 2018 7:46 am Re: Kontakt multiscript - Control change to program change revisited.

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
 
16596 posts since 6 Jan, 2009, from Croatia

Postby EvilDragon; Mon Jul 16, 2018 7:49 am Re: Kontakt multiscript - Control change to program change revisited.

Well I'm a regular at NI forums, so whatever. :)
normanlevene
KVRist
 
65 posts since 31 Oct, 2011, from London

Postby normanlevene; Mon Jul 16, 2018 7:56 am Re: Kontakt multiscript - Control change to program change revisited.

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
 
4425 posts since 1 Aug, 2005, from Warszawa, Poland

Postby Zombie Queen; Mon Jul 16, 2018 8:27 am Re: Kontakt multiscript - Control change to program change revisited.

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

Postby normanlevene; Mon Jul 16, 2018 8:49 am Re: Kontakt multiscript - Control change to program change revisited.

Thanks Zombie Queen.

This is perfect.

XXX

Moderator: Moderators (Main)

Return to Samplers, Sampling & Sample Libraries