Adjusting velocity curve for individual MIDI keys?

classic Classic list List threaded Threaded
17 messages Options
S.
Reply | Threaded
Open this post in threaded view
|

Adjusting velocity curve for individual MIDI keys?

S.
Hi there, I use a MIDI controller keyboard with Pianoteq or LinuxSampler
through Jack for real time piano music playing. Some of the black keys on my
controller are way to loud, i.e. the velocity curve is much higher and
steeper in comparison with other keys on the same keyboard. I'm looking for
some easy Linux compatible options for something I can plug into Jack to
modify the velocity curve of *specific keys* before the signal reaches the
synthesizer program. Any tips? Thanks!



--
Sent from: http://linux-audio.4202.n7.nabble.com/linux-audio-user-f5.html
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

Christopher Arndt
Am 08.09.19 um 16:45 schrieb S.:
> I'm looking for
> some easy Linux compatible options for something I can plug into Jack to
> modify the velocity curve of *specific keys* before the signal reaches the
> synthesizer program. Any tips? Thanks!

a) If you want to use plugins, look at the x42 midifilter.lv2
collection. You can combine the Keyrange/Keysplit filter with the
Velocity Scale filter to effect only certain notes (or a rage of notes).

https://github.com/x42/midifilter.lv2/

You can create a network of these plugins in Carla and save them as a
Carla project, so you can load them all up easily at once.

b) If you're more a command line type of guy, look a mididings. You
create a chain of MIDI processors as text file (in Python syntax, but
it's really only a kind of config file) and then run mididings on it,
which will provide a MIDI port with the processed output.

http://das.nasophon.de/mididings/

The documentation has an example of applying a velocity scaling curve:

http://dsacre.github.io/mididings/doc/start.html#examples

c) Pianoteq has function were you can interactively learn the velocity
response of your keyboard and create a velocity map from it, which can
be edited further manually, I think.


Chris
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
S.
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

S.
Thanks Chris for the fast reply!

Thanks for the tip on midifilter.lv2, I hadn't run across that option yet.

Also thanks for the link to the mididings example, I had heard of mididings
but couldn't figure out exactly how it worked. So it looks like applying a
lower velocity "curve" to a key could be as simple as applying a value <1.0
? And to actually make it "curvy" instead of a straight line?

The problem with midifilter.lv2 and mididings is that they're not packaged
for hardly any distros.

I just have the Pianoteq "Stage" edition, which only allows for global
velocity curves, which are nice, but don't fix this particular problem of
specific keys being too loud.



--
Sent from: http://linux-audio.4202.n7.nabble.com/linux-audio-user-f5.html
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

Christopher Arndt
Am 08.09.19 um 17:14 schrieb S.:
> So it looks like applying a
> lower velocity "curve" to a key could be as simple as applying a value <1.0
> ? And to actually make it "curvy" instead of a straight line?

Here's the doc of the Velocity event modifier unit:

http://dsacre.github.io/mididings/doc/units.html#mididings.Velocity

Remember, you can restrict the effect of units to certain notes by
putting a KeyFilter unit in front of it:

http://dsacre.github.io/mididings/doc/units.html#mididings.KeyFilter

> The problem with midifilter.lv2 and mididings is that they're not packaged
> for hardly any distros.

midifilter.lv2 has very few dependencies. Installing it should be a
matter of downloading the release archive
(https://github.com/x42/midifilter.lv2/releases/tag/v0.6.0), making sure
you've got the "build-essential" package group (assuming a debian-like
distro) and the lv2 header package installed and then just running
"make" followed by "sudo make PREFIX=/usr install".

mididings is a bit more complicated, since it doesn't work well with
Python 3 and Python 2 is being phased out across distros. But if you
have Python, python2-pip and libboost-dev installed, you should be able
to install it under your user's home directory with:

pip2 install --user git+https://github.com/dsacre/mididings.git

The main mididings script will then end up in ~/.local/bin.


Chris
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
S.
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

S.
Thanks a lot! I actually found an RPM package for openSUSE of midifilter.lv2,
the trick was to search for "x42", since that is the project name of the
whole set of filters/plugins.

So I'm having trouble visualizing the setup in Carla to modify specific
keys. Let's say that I want to reduce the velocity of only Bb1 (MIDI note
number 34) and F#2 (MIDI note number 42). The KeySplit filter seems to be
for assigning them to different channels, which doesn't sound like what I
need. The KeyRange filter says that "This filter allows to define a range of
allowed midi notes. ", which I understand would work for combining with the
VelocityScale filter to reduce those velocities. But how do I make it not
drop the other "normal" notes whose velocities do not need to be modified?

Also, it appears that the VelocityScale only allows tweaking the min and max
volumes, and not a more complex curve, correct?

Thanks again for walking me through this!



--
Sent from: http://linux-audio.4202.n7.nabble.com/linux-audio-user-f5.html
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

Christopher Arndt
Am 08.09.19 um 18:24 schrieb S.:
> The KeyRange filter says that "This filter allows to define a range of
> allowed midi notes. ", which I understand would work for combining with the
> VelocityScale filter to reduce those velocities. But how do I make it not
> drop the other "normal" notes whose velocities do not need to be modified?

You normally would need two KeyRange filters, one with the "Operation
Mode" parameter set to "Incluce range", the other to "Exclude range".
Route the output of the first to a VelocityAdjust filter and then to
your softsynth and the output of the second one directly to your softsynth.

*However*, my tests just now seem to indicate that the "Operation Mode"
paramter does not works as it should, the "Exclude Range" setting has
the same effect as the "Include Range" setting.

In the light of this buggy behaviour I would suggest investigating
mididings instead.


Chris
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
S.
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

S.
I appreciate you confirming that for me!

I also just found out about this:
https://wiki.linuxaudio.org/apps/all/qmidiroute
http://manpages.ubuntu.com/manpages/trusty/man1/qmidiroute.1.html
Looks like it might work for setting the min/max volumes of individual keys?
But apparently no curves.



--
Sent from: http://linux-audio.4202.n7.nabble.com/linux-audio-user-f5.html
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

Christopher Arndt
In reply to this post by Christopher Arndt
Am 08.09.19 um 20:54 schrieb Christopher Arndt:
> *However*, my tests just now seem to indicate that the "Operation Mode"
> paramter does not works as it should, the "Exclude Range" setting has
> the same effect as the "Include Range" setting.

This has been fixed now in the midifilter.lv2 repository. The bug only
manifested itself when using the plugin in Carla.

https://github.com/x42/midifilter.lv2/commit/9ccb77fcee6cd7e10bff25c28ef7f197972a9935

Chris
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

Christopher Arndt
In reply to this post by S.
Am 08.09.19 um 16:45 schrieb S.:
> I'm looking for
> some easy Linux compatible options for something I can plug into Jack to
> modify the velocity curve of *specific keys* before the signal reaches the
> synthesizer program. Any tips? Thanks!

Not exactly easy, but another option is writing a custom MIDI filter
script for the Moony [1] LV2 plugin.

Since I wanted to learn how to write these scripts anyway eventually, I
just wrote a velocity scaling Lua script for Moony:

https://github.com/SpotlightKid/moony-lv2-scripts/

When you got the Moony LV2 plugin installed (I'll not go into how
compile & install it here), you just copy and paste the Lua script into
the Plugin GUI editor and then press the "Send" button at the bottom,
then connect your midi input to Monny and Moony's output to your softsynth.

You can change the velocity scaling factor and other parameters by
changing the variables at the top of the script. Don't forget to press
"Send" again after each change.

Thanks to the Moony author for the very cool plugin!


[1] https://open-music-kontrollers.ch/lv2/moony/
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

Anders Hellquist
Or you could open up your midi device and clean the contact strip. I just recently had a velocity problem with just one key on one of my midi keyboards (just one day before a gig). Opened it up and cleaning the strip made it as good as new.

Regards, Anders

On Mon, Sep 9, 2019, 00:24 Christopher Arndt <[hidden email]> wrote:
Am 08.09.19 um 16:45 schrieb S.:
> I'm looking for
> some easy Linux compatible options for something I can plug into Jack to
> modify the velocity curve of *specific keys* before the signal reaches the
> synthesizer program. Any tips? Thanks!

Not exactly easy, but another option is writing a custom MIDI filter
script for the Moony [1] LV2 plugin.

Since I wanted to learn how to write these scripts anyway eventually, I
just wrote a velocity scaling Lua script for Moony:

https://github.com/SpotlightKid/moony-lv2-scripts/

When you got the Moony LV2 plugin installed (I'll not go into how
compile & install it here), you just copy and paste the Lua script into
the Plugin GUI editor and then press the "Send" button at the bottom,
then connect your midi input to Monny and Moony's output to your softsynth.

You can change the velocity scaling factor and other parameters by
changing the variables at the top of the script. Don't forget to press
"Send" again after each change.

Thanks to the Moony author for the very cool plugin!


[1] https://open-music-kontrollers.ch/lv2/moony/
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user

_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

David W. Jones
The thought of a hardware problem occurred to me, too.

On September 8, 2019 12:54:13 PM HST, Anders Hellquist <[hidden email]> wrote:

>Or you could open up your midi device and clean the contact strip. I
>just
>recently had a velocity problem with just one key on one of my midi
>keyboards (just one day before a gig). Opened it up and cleaning the
>strip
>made it as good as new.
>
>Regards, Anders
>
>On Mon, Sep 9, 2019, 00:24 Christopher Arndt <[hidden email]>
>wrote:
>
>> Am 08.09.19 um 16:45 schrieb S.:
>> > I'm looking for
>> > some easy Linux compatible options for something I can plug into
>Jack to
>> > modify the velocity curve of *specific keys* before the signal
>reaches
>> the
>> > synthesizer program. Any tips? Thanks!
>>
>> Not exactly easy, but another option is writing a custom MIDI filter
>> script for the Moony [1] LV2 plugin.
>>
>> Since I wanted to learn how to write these scripts anyway eventually,
>I
>> just wrote a velocity scaling Lua script for Moony:
>>
>> https://github.com/SpotlightKid/moony-lv2-scripts/
>>
>> When you got the Moony LV2 plugin installed (I'll not go into how
>> compile & install it here), you just copy and paste the Lua script
>into
>> the Plugin GUI editor and then press the "Send" button at the bottom,
>> then connect your midi input to Monny and Moony's output to your
>softsynth.
>>
>> You can change the velocity scaling factor and other parameters by
>> changing the variables at the top of the script. Don't forget to
>press
>> "Send" again after each change.
>>
>> Thanks to the Moony author for the very cool plugin!
>>
>>
>> [1] https://open-music-kontrollers.ch/lv2/moony/


---
David W. Jones
[hidden email]
authenticity, honesty, community
http://dancingtreefrog.com

Sent from my Android device with F/LOSS K-9 Mail.
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
S.
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

S.
Very nice Chris, thanks! As soon as I get around to installing it I'll let
you know how it works.

Yes, my keyboard isn't ideal, but I would describe it as more of a hardware
"flaw" than a "problem". It's just a cheap M-Audio Keystation 88es that I
picked up lightly used for a good price. But I've read a lot of complaints
about uneven response from the black keys for this model.



--
Sent from: http://linux-audio.4202.n7.nabble.com/linux-audio-user-f5.html
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
S.
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

S.
Hi, sorry for the very slow reply. I finally found time to play with Chris's
LUA script for Moony.

The thing that I still don't understand in this general concept is how to
adjust the velocity for *specific* keys, not ranges. Everything thus far
seems to only work for ranges. But how would I apply a filter to just a few
keys, let's say MIDI keys # 2,17,19,21,23 ?

Thanks a lot!



--
Sent from: http://linux-audio.4202.n7.nabble.com/linux-audio-user-f5.html
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

Len Ovens
On Thu, 26 Dec 2019, S. wrote:

> Hi, sorry for the very slow reply. I finally found time to play with Chris's
> LUA script for Moony.
>
> The thing that I still don't understand in this general concept is how to
> adjust the velocity for *specific* keys, not ranges. Everything thus far
> seems to only work for ranges. But how would I apply a filter to just a few
> keys, let's say MIDI keys # 2,17,19,21,23 ?

That would be five filters, One for each note with a range of one. If you
have control of the filtering program/plugin/script (and if it is LUA it
sounds as if you do) then instead of using > and < to set a range, use a
lookup table instead. You only have 127 notes, so set up a table of 128
bits and if bit[note] then apply processing. (probably not LUA style I've
shown but the concept works) It is ok to use 128 words if that is
easier/faster/all that is available.

Initialization would includ resetting all bits/words to 0/false and then
setting notes to filter to 1/true.

The only purpose for this I can see is for processing drums or other
one off sound effects.

--
Len Ovens
www.ovenwerks.net
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

Christopher Arndt
In reply to this post by S.
Am 26.12.19 um 18:11 schrieb S.:
> I finally found time to play with Chris's LUA script for Moony.
> But how would I apply a filter to just a few keys, let's say MIDI keys # 2,17,19,21,23 ?

I just pushed a new version of the scale_velocity filter, which allows
to specify multiple notes or ranges of notes, which are affected by the
filter, e.g.

-- string with comma-separated list of single MIDI note numbers or
-- ranges (min-max separated by a dash, whitespace is ignored)
local note_ranges = "0-12, 36,48, 60 - 96"

https://github.com/SpotlightKid/moony-lv2-scripts/blob/master/midi/scale_velocity.lua


Chris
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
S.
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

S.
Perfect!!! Thanks Chris!



--
Sent from: http://linux-audio.4202.n7.nabble.com/linux-audio-user-f5.html
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
S.
Reply | Threaded
Open this post in threaded view
|

Re: Adjusting velocity curve for individual MIDI keys?

S.
Almost there!

So I can make it work with Jalv and Pianoteq directly, and it definitely
helps with the velocity curve for my black keys.
<http://linux-audio.4202.n7.nabble.com/file/t2791/Screenshot_from_2019-12-27_14-12-38.png>

But I can't make it work through Carla, which is what I would prefer since
it lets me save the rack configuration. I tried with both the Pianoteq LV2
plugin and also with a simple SF2 Piano soundfont in Carla. If just the
instrument is loaded, it works fine. But no sound comes out of it when the
Moony.lv2 plugin is loaded above it at the top of the rack. Any tips?
<http://linux-audio.4202.n7.nabble.com/file/t2791/Screenshot_from_2019-12-27_16-01-52.png>

Thanks again!



--
Sent from: http://linux-audio.4202.n7.nabble.com/linux-audio-user-f5.html
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user