Kontakt multiscript - Control change to program change revisited.
-
- KVRist
- Topic Starter
- 67 posts since 31 Oct, 2011 from London
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
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
- KVRAF
- 4655 posts since 1 Aug, 2005 from Warszawa, Poland
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
- KVRAF
- 23102 posts since 7 Jan, 2009 from Croatia
Channels are zero based
-
- KVRist
- Topic Starter
- 67 posts since 31 Oct, 2011 from London
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
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
-
- KVRist
- Topic Starter
- 67 posts since 31 Oct, 2011 from London
THANKS SENSEI EVIL DRAGON.
AND ZOMBIE QUEEN.
IT WORKS FINE.
I'VE OWED YOU A BEER FOR YEARS.
<3 <3 <3
AND ZOMBIE QUEEN.
IT WORKS FINE.
I'VE OWED YOU A BEER FOR YEARS.
<3 <3 <3
-
- KVRist
- Topic Starter
- 67 posts since 31 Oct, 2011 from London
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.
E.g.
Turning the volume fully up plays note 48 on channel 2.
N.
- KVRAF
- 23102 posts since 7 Jan, 2009 from Croatia
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
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
-
- KVRist
- Topic Starter
- 67 posts since 31 Oct, 2011 from London
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.
I don't always assume the same people will be able to help me every time.
I'll stick to KVR for now.
- KVRAF
- 23102 posts since 7 Jan, 2009 from Croatia
Well I'm a regular at NI forums, so whatever.
-
- KVRist
- Topic Starter
- 67 posts since 31 Oct, 2011 from London
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
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
- KVRAF
- 4655 posts since 1 Aug, 2005 from Warszawa, Poland
repeat set_midi command
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)
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)
-
- KVRist
- Topic Starter
- 67 posts since 31 Oct, 2011 from London
Thanks Zombie Queen.
This is perfect.
XXX
This is perfect.
XXX