Velocity Compress in Logical Editor

I’d like to have a single-key shortcut to compress the velocities of selected midi notes 85%. The only thing I’ve found is the Key Command to show the Velocity popup. But then I have to grab the mouse, select Compress in the dropdown, click on the next textbox, scroll to 85%, and hit enter - I want a single key shortcut. I don’t see any key command for actually setting the ‘Compress’ choice or setting the %. And I don’t see anything in the Logical Editor for this - there are functions to add/subtract values (by % or absolute values), but I don’t see anything to compress.

Is there a way to have a single-key shortcut for this?



Logical Editor:

Filter Target
( Type is | Equal | Note | And
Value 2 (Velocity) | Bigger | 0 )

Action Target
value 2 | Multiple by | 0.85


Save this is Logical Editor Preset and assign a Key Command.

Doesn’t this just lower all notes by pct? it doesn’t actually compress, does it? I would think that compression is bringing up quieter notes as well as lowering the louder notes?

No compression is simply lowering the loudest notes.

Anyone know if they fixed the midi compressor bug from years ago - I stopped using it because on reloading the project the midi compressor wouldn’t be working.


Sorry, change the 2nd line to:

Value 2 (Velocity) | Bigger | 100 )


So the Velocity will be reduced if the Velocity is bigger than 100 only. Or use the value (threshold), you want to.

Or what about to use the MIDI Modifier Vel. Comp.?

Thanks for the replies, these are interesting suggestions. I don’t think any of them really do what the Compress setting does in the Velocity popup though. If I display the velocities in a controller lane and hit Compress, I can see the lower notes come up and the higher notes come down, which is what I’m looking for, true compression - bringing the highest and lowest velocities closer together, and all notes in between shifted relatively, not just lowering the high ones. Tried some of these suggestions and they sorta approximate this, but not too much. Something tells me it might not be possible in the logical editor, at least not until they add an operator specifically for compression, cause it involves looking ahead and calculating both the highest and lowest points in the selection and calculating a % adjustment from the midpoint of those two, to know how much to adjust a given note. Or maybe I’m just missing it! At some point I get overloaded and have to just go back and make some music!


What if you multiplied the velocity values by number lower than 1 and then raise the overall velocity by some (same) amount?

velocity * 0.8 + 20

Is that compression?

Or how 'bout:



1 Like

Hi, just giving some of my cents.

I think some of the confusion is the term “compression”. It’s suggesting that it works like audio compression, everything above or below a threshold gets multiplicated by a certain amount. I’m not sure if it’s true. If it works that way, I think you would have to consider only compressing the amount above the threshold, not multiplicating the value straight ahead, but doing something like (velocity - threshold) * 0.85 + threshold, and the same thing for the lower values.

My approach here would be some nasty autohotkeying, something like this:


cubaseVelocityCompress() {
Send v
Send {tab}{tab}{space}c
MouseClick, left, 80, 125, 2
Send 85{Enter}

My hotkey for the velocity popup is on the key “v”, just change it in the first Send command.
In the end you could add another {Enter}.
I like to see wether everythings gone right and hit Enter myself, but that’s just my paranoia. Timing is always tricky, to be safe you could sleep a little longer.

So the average of the selected velocity needs to be the axis.




1 Like

Ok I may have found a bug in the implementation but I would agree yes they are computing some kind of average and then compressing everything towards it.

I played around a bit and weird things happened:
When my clip has a lot of vel0 notes and a single vel127 note. I select only two of them, one 0 and one 127, they should move symmetrically but they are all compressed way down.

When I put a lot of vel127 notes and a single vel0 note. Again I select the same two notes as before, one with 0 and one with 127, they both are compressed way up.
So it seems like they compute the average of all notes in the clip and but then appling the algorithm only to the selected notes.

But this goes way beyond our problem here, I’ll try to do some investigation and open another topic tomorrow.

wow :slight_smile:

heh. And no bug too. :crazy_face:

Though in all honesty I did not test extensively.

1 Like

Very impressive steve! Thanks for working on this, I really appreciate it. I was playing around with this and it’s close, but I think it’s still missing one thing…

The Compress method doesn’t simply apply the percentage to it’s current value, it applies the percentage to the difference between the current value and the average value. I tried a sample and did the calculations and confirmed this. So for example, if the loudest note is 100 and the quietest is 20, and I apply compression of 50%:

  • Using your method would be:
    Loudest = 100 * .5 = 50
    Quietest = 20* 1.5 = 30

And you can see the loudest number is way down too far, even below the average velocity.

  • But the real compress function does this:
    AvgValue = 60
    Loudest = 100 - ((100-60) * .5) = 80
    Quietest = 20 + ((60 - 20) * .5) = 40

And this makes sense, because both values are now 50% closer to the midpoint between them. The dynamic range is less but it keeps the relative volumes accurate.

Can do that in Logical Editor? If you can, you are the supreme LE ninja!


I understand. My little solution does not include a variable for *how much compression * at all. So there’s no apple to apple comparison without that parmeter.

The amount of ‘compression’ depends solely on the Value 2 multiplication factors, and is a bit inexact too, unless you calculate the inversion of the factors.

Al my thing does is multiply the Vel values above the average to make them lesser, then invert the selection, and multiply those that were below the average to raise them.

And the built in function does more, also. Probably allowing for special cases where values are extreme, where there are zero values, etc. The LE won’t be able to do all that.

You are right yes. That’s what I meant somewhere above with
" (velocity - threshold) * 0.85 + threshold"
where threshold being the average in this case.

Problem is PLE doesn’t know variables, so you can compare to the computed average, but you can’t store the average for later subtraction/addition.
You could do this for a fixed threshold though, if you want to compress everything towards static 64, you could subtract 64, multiply by 0.85, add 64 again and do it the other way around in the other macro.


Are you aware of MIDI > Functions > Velocity > Type Compress/Expand in Cubase? Even though it compresses or expands all Velocities, there is no threshold.

1 Like

Hi! It works exactly as desired. But is it possible to set “ratio” in the velocity window to 20% and save it as a macro command? I wan to select some notes, press a button and compress them by 20 %.

Id like this too. I wish they’d update the velocity window, it’s such a hassle to go from compress to +/-. Such basic functionality. I know a lot of people talk about wanting an ‘overhaul’ of this feature or that, but this is such a baseline function, and so small, it really needs it.