What's new

MacOS - adjusting velocity curve at note level

WookieAttitude

New Member
Hi All,

I am sure this topic has probably been discussed to death. I have an acoustic piano with PianoDisc installed, which I am using as a piano controller for Pianoteq & Garritan CFX.

Trouble is the velocity response is not even across the keyboard with some notes being a lot faster (in velocity response) than others. This is not realistic as these notes really « jump » when playing. Recalibrating the keyboard doesn’t help address the issue, also the sensitivity of the note can be reduced in Pianodisc but that doesn’t help with flattening the response of the note.

I can work around this issue in Pianoteq using the note-by-note volume adjustment. Still it is not perfect as the tone of the uneven notes will be brighter. Also there is no such workaround in Garritan CFX.

I am looking for a MacOS software that would allow me to tweak the velocity curve at note level prior to the midi information being sent to the Pianoteq or Garritan CFX. Does such a software exist?

From what I have read it may be possible in Logic. However some questions remain, e.g. can Logic be programmed as a processor to other audio programs seamlessly, or is it possible only if the instrument is in Logic itself? Pardon my ignorance, I am not a composer, just a player looking for the most realistic acoustic piano experience :) Another thought is Logic is probably overkilled to be used only for that purpose.

Any help much appreciated. Thanks vm
 
Logic is probably the best solution.
From what I have read it may be possible in Logic. However some questions remain, e.g. can Logic be programmed as a processor to other audio programs seamlessly, or is it possible only if the instrument is in Logic itself?
1. You can cable a Transformer object in the Click & Ports environment layer and set a custom velocity curve in the transformer.

2. You can insert an External Instrument plugin and route the processed MIDI to other Mac applications via IAC for example.
You can also create special MIDI routings in the environment.
 
Configuring 'per note' custom velocity curves is a lot of work...
I cannot find a 'per note' custom velocity request in the OP topic here. Normally, the hardware manufactures offer a Velocity global curve across the entire keyboard. It takes a few seconds in Logic if you know how to set Velocity Curves.
For example, the Logic Transformer "Expon" operation is very suitable for that...
Here is a short Video animation.

lpx_vel_cur.gif
 
Last edited:
the more complicated part is having a separate curve for every note.

You might want to start with this following site, which has a neat little curve UI, you can drag the velocity curve to what you like and then copy and paste the generated script into Scripter.


The only thing about the above is that its a global curve across the entire keyboard, however you could expand it to have a separate curve for every note....but it would definitely be a lot of work to do that...but once you're done then hopefully you wouldn't need to tweak it that much.

Possibly you can just use one curve from the above site for your entire keyboard range and then just scale it differently on a note by note basis...perhaps.. anyway.... there ya go.
 
If you want something that could be used with other programs outside of logic... well.. there are a few options...

check out transmidifier for example, which I think could probably do it but I've never used it. Its free


Other options...

BlueCatAudio has their PlugNScript which can run as a standalone, but you will have to learn how to script what you want it to do.

MidiPipe might be able to do that, but not easily.

KushView Element could probably be made to do it, it has standalone or plugin version, also free

PlogueBidule can probably do it, also standalone or plugin, not free.
 
ps - none of those really make it "simple" to do though. I don't know of any general purpose tool that does. VSL Imperial piano includes that ability in a nice way for its own sample playback... not with a definable curve per note, but just a fader for each note which essentially applies a curve to make it happen.

I just quickly tried a test with Transmidifier and it can be done, you would have to set up 127 rules for each pitch and then edit the curve of each rule. But you could get there with it, its just not easy and intuitive. It is free though.

I think KushView element could be wired up to do this also for free.

Then there is always plogueBidule of course.
 
I cannot find a 'per note' custom velocity request in the OP topic here.

The OP text is all about 'per note' velocity. For example, it says 'tweak the velocity curve at note level'. As I said, if you use a utility that allows you to set the velocity curve per note, that is 128 separate velocity curves, and configuring all of those will take a lot of time. It would be rather like tuning up several Yamaha CS-80s at once...
 
I think it could be done in Scripter. OP would have to set manually the appropriate parameter for each key, which is a bit of work. But once that's done, it can be saved as a preset and inserted on any channel.
 
it could definitely be done with Scripter, but I later noted that the OP also wanted to be able to do it globally across all music programs, not just LogicPro, ideally. So that's why I'd probably recommend Transmidifier. it can definitely be done with that, though it hasn't been updated in a long time, and it is crashing on me now as we speak on Mojave. I was able to run it yesterday, no idea why today it won't even start without a crash...so... maybe scratch that...

The next choice would be freely available KushView Element. I will try to make some images later of how to do that in there.
 
Cloudflare kicked in and interupted my previous posting as I was about to edit it... Bome's MIDI Translator Pro is software that can process MIDI streams, so can be used outside of Logic et al, but the 'script' that you write to specify the processing can also be run on external hardware. There's a thing called a Bomebox that provides that function. So you could try it in software, and if you run into problems then you can put it in external hardware instead. Given the complexity of per note custom velocity mapping, I would be looking for flexibility in implementation, and being able to run it in software or external hardware might be worth the cost.
 
copy that. Bome's is definitely another good potential solution..I have no idea how to use that one...

I will try to make a Scripter script this afternoon that basically does it... from there I think there are many possible solutions outside of LogicPro, same basic approach, but will take some work to set it up is all.
 
I used to have an Opcode Studio 5 (and Studio Vision Pro...), and so running MIDI processing outside of the computer is something I think about...
 
You can also build your own Arduino-style solution, but that's quite a bit of work if you don't know where to start.
 
I have the same issue with midi guitars...

I use Logics (mainstage also works) VELOCITY PROCESSOR plugin.

se the desired levels and incoming midi will be processed prior to getting to the piano plugin.

it can work as a compressor. etc
 
the problem here again is that they need a separate processor for each midi pitch, 128 of them. Stay tuned, I'm almost done with a Scripter script that should suffice.
 
Here is a simplistic Scripter script that can do it, it does not use a velocity "curve" it simply uses a percentage scaler, one for each pitch on the keyboard. Configure the array at the top of the script with a percentage value. 100 is no scaling or 100 percent. Any value > 0 is ok to use.

A better version would use a separate velocity "curve" for each pitch, but that gets considerably more complicated. It would also be possible to calculate a known curve based on the percentage, which might be better too, but I leave that for others to figure out...

JavaScript:
// Configure each note with a simple multiplier.  No "curves" will be
// applied, just a simple multiplier, expressed as a percentage

var PerNoteScale = [
//  C     C#    D     D#    E      F      F#    G     G#   A     A#    B    Octave
  100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,   // -2
  100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,   // -1
  100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,   //  0
  100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,   //  1
  100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,   //  2
  100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,   //  3
  100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,   //  4
  100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,   //  5
  100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,   //  6
  100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,   //  7
  100, 100, 100, 100, 100, 100, 100, 100                                    //  8
];

Event.prototype.scale = function() {
    // nop
};
NoteOn.prototype.scale = function() {
console.log(MIDI.noteName(this.pitch));
    this.velocity = this.velocity * (PerNoteScale[this.pitch]/100);
    if(this.velocity > 127) this.velocity = 127;
};

function HandleMIDI(event) {
    event.scale();
    event.send();
}
 
Last edited:
Top Bottom