Keyboard velocity scaling possible in Cantabile?

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

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:

Hi Corky,

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

Thanks again!
Gary

1 Like

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;
  );
1 Like

Wow! This is exactly what I need!

Thanks, Torsten!
-Gary

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

1 Like

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

midi_vel_highdamp.zip (633 Bytes)

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

image

8 Likes

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

1 Like

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

1 Like

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

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

1 Like

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

1 Like

This works fine. I had the VeloScaler before too.

Hi folks,

I got a FCB1010 and use it as a “bass pedal”
and sending notes out, which can have a fixed velocity.
Is there any possibility to remap the recieved velocity by the plugin with a CC message from one of the Expression pedals? So, CC 2 Ch1 40 → next notes Vel 40, CC2 Ch1 120 → next notes Vel 120 ?

I guess you will need either a plug-in or a script (like the ReaJS script that Torsten showed previously in this thread). The point is that the CC2 value should be “stored” to be used as the velocity, but there is not a mechanism to store values across events, at least that I am aware of.

Ah, ok. I will see … I just tried a few things and I guess it’s more … versatile to use the expression pedals for … expression :laughing: and setting filters or dial in FX and leave the velocity as is. I am gonna use the velocity curve of the route to make settings depending on the instrument. Thank you!

I have Bidule here also, but is it possible to bind a parameter inside Bidule in Cantabile? A script will be easier, I guess.