Topic: Using Raspi 4 for Velocity Mapping

Hi all!

I'm still a newbie here :-)
My name is Georg, I'm from Germany... Sorry for my bad english ;-)

I'm using a Yamaha P125, and it seems I can only get velocity values 1-100 from the device (I'm using the "hard" built-in curve setting).
I'm pretty sure, I would damage the piano when trying to reach 127 ;-)

So for some months I used a midi loopback device and some extra software for fixing the velocity range...
But from the beginning I didn't like the idea.

Meanwhile I have a Raspberry Pi 4 and I thought, I could use it for fixing the velocity range problem...
And yes, I works pretty well :-)
In my case it was enough just using a linear mapping of velocity range 1-100 to the range 1-127...

I'm a C# / .NET developer, so my solution is based on .net core 3.1...

If someone is interested, I would share the code...
Solution is not perfect, still a proof of concept (console application). It's hardcoded to do linear mapping from a given input range to a specified output range, and it's hardcoded to use my devices...

But the code is easy to understand...

If there is some interest, I would make my solution more flexible... At least configurable devices ;-)



Here is my device chain:
P125 --usb--> raspi 4 --usb2midi--> ni komplete audio 6 --usb--> windows/pianoteq --> audio out

I'm using an ubuntu 18.04. arm64 image (but it works also in manjaro arm64, but do NOT work in raspbian!), and my usb2midi device is the "ESI MidiMate eX"


best regards
Georg

Re: Using Raspi 4 for Velocity Mapping

Hello George, my name is Jose, I'm from Argentina and I find your post very interesting since I have the same problem, my keyboard is a KORG C1 in which for more than choosing between 4 curves that it has, it never reaches 127, let's say it is in the range from 6 to 115 I have tried to adjust the curve following several strategies but it always sounds like I lack dynamic range and the timbre of the sound is modified in ways that are not pleasant for me for example to reach 127 I use the following curve but not I am 100% satisfied.
Velocity = [0, 117; 0, 127]
On the other hand, given my training "Electronic Engineer" I had considered facing the problem from the hardware, perhaps with a small microcontroller that makes an adaptation and therefore your proposal was of interest to me and I wanted to know what results you have obtained and if they are satisfactory which would be the difference to face the problem with an external Soft or even with the curve editor incorporated in PIANOTEQ, I think that as it does not have the full range 0 - 127, any adaptation that is made to compensate for it misaligns the pitch of the sound.
I appreciate any experience you want to share and I leave you my email in case you want to write to me.
Cheers
Joseph
jperri.jap@gmail.com

Re: Using Raspi 4 for Velocity Mapping

Hi all,

here is an update:

I no longer use the RaspberryPi4... Now it's a Windows Application.

https://drive.google.com/file/d/1nLglKI...scy2WGRw4m

Make sure, you extract both files to a folder on your harddrive.

Please ensure, you installed the .net core 3.1 desktop runtime:
https://dotnet.microsoft.com/download/dotnet/3.1

Sourcecode is available:
https://github.com/georg-zeiser/midi-velocity-mapper


It's not like the Pianoteq velocity mapper, where you define points.
My solution is based on an exponential function, just enter the max. possible velocity of your midi controller and set the exponent...

Screenshot
https://drive.google.com/file/d/1ENYDlN...Um0RA/view

Last edited by georg (19-06-2021 10:49)

Re: Using Raspi 4 for Velocity Mapping

georg wrote:

Hi all,

here is an update:

I no longer use the RaspberryPi4... Now it's a Windows Application.

https://drive.google.com/file/d/1nLglKI...scy2WGRw4m

Make sure, you extract both files to a folder on your harddrive.

Please ensure, you installed the .net core 3.1 desktop runtime:
https://dotnet.microsoft.com/download/dotnet/3.1

Sourcecode is available:
https://github.com/georg-zeiser/midi-velocity-mapper


It's not like the Pianoteq velocity mapper, where you define points.
My solution is based on an exponential function, just enter the max. possible velocity of your midi controller and set the exponent...

Screenshot
https://drive.google.com/file/d/1ENYDlN...Um0RA/view

I'm about to download and try this out. Very interesting, thank you georg,

Warmest regards,

Chris

By the way, does the Yamaha P125 have a Hard Touch 2 setting??? I use a Hard Touch 2 setting on my Yamaha P515 at the moment with a linear curve as follows which gives me beautiful pianistic dynamics

Velocity = [0, 10, 90; 1, 1, 127]


EDIT : Thank you georg, I've installed your app and it's brilliant, well done. i'm gonna have lots of fun with it.

warmest regards,

Chris

Last edited by sigasa (21-06-2021 19:32)