# Changing velocity mapping/scaling in KSP?



## Andrew Aversa (Jul 17, 2012)

Let's say we have a group that contains 4 zones spread across the keyboard. Zone 1 is mapped (using the mapping editor) at velocities 1-39. Zone 2 is 40-79, Zone 3 is 80-109 and Zone 4 is 110-127.

Is there a way, using KSP, to effectively alter this mapping? Would this basically be done just by modifying the event velocity?


----------



## mk282 (Jul 18, 2012)

Yes, you can do this, however you will have to remove all velocity modulators and script your own velocity handling (by using change_vol()). Also, you would have to ignore_event($EVENT_ID) in the note callback and do your own note on/off handling.


----------



## Andrew Aversa (Jul 18, 2012)

OK, thanks. Followup question: given the zone velocity ranges I listed above, let's say I give the user the ability to increase their velocity input (so basically just moving the velocity curve up linearly). Let's say they pick +10.

Now, they hit a note and the event has a velocity of 35. This would normally trigger zone 1. If I ignore the event and then do a new event at velocity = 45, would this trigger zone 2?


----------



## mk282 (Jul 19, 2012)

No, it wouldn't if you were to use your own velocity handling via change_vol().

In this case you have to separate the default Kontakt velocity handling, and your own scripted velocity handling. By ignoring the incoming note event, no notes play. You can use play_note($EVENT_NOTE,20,0,-1) which would constantly hit zone 1 no matter which velocity was played. Then you can use change_vol() on this event to increase or decrease its volume depending on incoming velocity (along with any velocity curve modifications).


----------



## Andrew Aversa (Jul 19, 2012)

Hmm, so you're saying that the event velocity will always determine the zone triggered? Even if I ignore the event and do play_note and select my own velocity?

Also, volume does not factor into my script at all. This is for an instrument where volume is not tied to velocity. My focus is on using velocity to switch articulations, but giving the user the ability to scale their input.


----------



## polypx (Jul 19, 2012)

I think MK is misunderstanding your intention.

If you change the velocity +10 as in your example, then indeed the note will trigger zone 2 (assuming you don't do anything else).


----------



## mk282 (Jul 19, 2012)

zircon_st @ 19.7.2012 said:


> Hmm, so you're saying that the event velocity will always determine the zone triggered? Even if I ignore the event and do play_note and select my own velocity?
> 
> Also, volume does not factor into my script at all. This is for an instrument where volume is not tied to velocity. My focus is on using velocity to switch articulations, but giving the user the ability to scale their input.



Ah, I misunderstood! Sorry.


Yes, if you want to select an articulation via velocity, then any change by velocity curve script (let's say you're using the factory one) would select a different zone depending on how the curve scales, yes.


----------

