@ClaudioCas the RK3 midi port reported by your system is the phisycal 5 pin DIN port on the back of your controller, but it has nothing to do with the pedal switches on the device. Actually RK2 (and I guess RK 3 is no different) emulates a QWERY USB keyboard… Connect your RK to you PC, open a text editor and press one of the pedal switches, you will se corresponding number appearing on the screen. Say you press button 1, you will see “1” (ASCII character #49) on your editor.
I couldn’t find a way to make my RK2 to generate MIDI messages from button presseing, so I decided to write the code you find in the topic Hacking a RigKontrol 2 as a MODEP controller
I’m using it for live performing on a regular basis since then and it works. The audio part works decently although latency is a bit of an issue… In the past I had problem with the sound becoming robotic like you said, I don’t face these problems anymore. I moved to a RPi4 and I guess that solved the problem.