Keyboard velocity scaling possible in Cantabile?


#1

Hi all,

I’m a Cantabile 3 Performer user.

Is there any way to have Cantabile scale midi velocity output to a plugin based upon key number? Here’s what I want to happen: I have a Kontakt instrument that sounds great, but the higher notes are too loud. I’d like to be able to translate the midi velocities such that past some predefined note (c4, for example) the velocity gets progressively less by percentage. If this isn’t possible in Cantabile, is there another app that could accomplish this scaling?

Thanks very much!
-Gary


#2

Hi Gary

When my older 88 key controller started blowing out the velocity rubber pieces, and the velocity on those keys were much louder than others, I also went on a search because repair parts were hard to find. I cured it with a little VST called Veloscaler by CodeFN42. It works very well and is FREE!

Corky

BTW, here is the thread where I was asking the same question.

Also, if you read above my comment on Veloscaler, @Torsten gave a great example of the possibilities within C3.

You can download the VST at:
https://www.codefn42.com/


#3

Hi Corky,

Thanks very much for the reply and the info about Veloscaler. I’ll definitely give it a try.

Thanks again!
Gary


#4

This is a typical application for ReaJS: this plugin (part of the free ReaPlugs suite) allows you to run scripts on audio or MIDI input. For your issue, I modified a script that I already had. Simply paste the code at the end of this post into a file called “midi_vel_highdamp” (no extension) in the following folder:

C:\Users<your_name>\AppData\Roaming\REAPER\Effects\midi

Now you should be able to load it into ReaJS (once you’ve installed it). Create a route from your keyboard to ReaJS and then from ReaJS MIDI out to your instrument.

After loading the script, ReaJS looks like this: image

Now you can

  • Set the starting note (anything above this note will be velocity-scaled)
  • Set the velocity damping per octave (50% means that a note one octave above the starting note will be velocity-reduced by 50%
  • Set the maximum damping (notes will not be reduced beyond this percentage

I just tested this - works nicely with a piano plugin - all notes above middle C gradually reduced in velocity.

Cheers

Torsten

Here is the script:

desc:MIDI Velocity Damper
//tags: MIDI processing

slider1:60<0,127,1>Starting Key (MIDI Note #)
slider2:50<0,100,1>Damping per Octave (%)
slider3:80<0,100,1>Maximum Damping (%)

in_pin:none
out_pin:none

@init

@slider
slider1<0?slider3=0;
slider1>127?slider1=127;

@init

NOTE_OFF = 8;
NOTE_ON = 9;


@block

  while (
    input = midirecv(mpos, msg1, msg23);
    input  ? (
      statusHi = (msg1/16)|0;
      statusLo = (msg1-(statusHi*16))|0;

      data2 = (msg23/256)|0;
      data1 = (msg23-(data2*256))|0;
     
// .... for Note Ons
      statusHi == NOTE_ON && data2 > 0 && data1 >= slider1 ? (
          // calculate scaling
      myDamp = (data1 - slider1) / 12 * slider2;
      myDamp > slider3 ? (
          myDamp = slider3;
      );
          myOutput = (data2 * (1 - (myDamp/100))) | 0;
      midisend(mpos, msg1, data1, myOutput);
      ): (
// .... anything else    
          midisend(mpos, msg1, msg23);
      );
    );
    input;
  );

#5

Wow! This is exactly what I need!

Thanks, Torsten!
-Gary


#6

Just remembered: this folder is only correct if you have Reaper installed; I recall that the folder for pure ReaPlugs installations is different. Best way to find it is described in this post:

Cheers,

Torsten


#7

To make things easier: here is the script in a zip file:

midi_vel_highdamp.zip (633 Bytes)


#8

You could also try Cantabile’s “Pitched Velocity Ramp”:

image


#9

Torsten, thank you so much for your helpfulness! BTW, I love your Midi De-Duplicator and am using it for Keyboard/strings. You are amazing!

-Gary


#10

Hi Brad,

This works exactly as advertised, Thanks! I don’t know how I could have overlooked it. I really appreciate your kind reply.

-Gary


#11

Ooooh, wasn’t aware this existed - great stuff! Maybe you could add the option to multiply instead of add - then I can safely retire my script and this can be done directly at the route level.

Cheers,

Torsten


#12

The “Adjust velocity by” are percentages to scale the incoming velocity by - not add values.


#13

Aah - great! Then the script is definitely obsolete - but it was a nice little coding exercise…


#14

This works fine. I had the VeloScaler before too.