Transfer speed of NRPNs

...and how to do so...
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi,

at the moment I'm building a MIDI controller and I want to keep open the option of implementing NRPNs alongside with standard MIDI CCs. Unfortunately NRPNs can take up 12 Bytes and transmitting them with the standard MIDI speed of 31250 Bit/s means, that one NRPN command takes more than 3 ms. Is this really the case? I find this really disturbing as I was planning to readout the ADCs for the potentiometers every millisecond.

Is this scanning rate unnecessarily high? Has any of you ever seen a difference in "smoothness" when using CCs or NRPNs?

Post

I'm into diy MIDI controllers myself, if not very experienced.

I heard LAN or USB transport instead of MIDI DIN is much faster.

Maybe you could adjust the adc scanning rate by trial/error and your own perception of tightness?

Post

I did a lot of testing since I opened this thread and I realised a few things:
  • The Virus B is incredibly slow in reading its potentiometers & transmitting their respective MIDI parameters. When I turn a knob really fast, the Virus may omit up to 8..10 values, so that the recorded automation is not smooth. Nevertheless I did never find this to be a problem. :shrug:
  • The opposite is the Nord Lead 3. I did not manage to make it omit even one value (though the NL3 does not send NRPNs).
  • The ideal read & transfer speed for one controller value for me is about 2..4ms.
  • Transmitting NRPNs via RS232 is definitely so slow, that all the reading (about 45 potentiometers :D) must be done in far less than a millisecond, but I'm confident that it is possible.
  • Using USB MIDI may open a huge can worms. I have no experience with USB but this soo leaves the field of electronics and I'm sure, I don't want to maintain USB code and/or libraries for all major operating sytems. Not to mention that I have absolutely no idea how to implement USB devices on a computer.
I have not heard about MIDI transmitted over LAN but I think it is more problematic than USB as I don't see any possibility to declare a LAN based device to a DAW.

But... I now think that it could all work out even with NRPNs. I very very rarely need to turn a knob so fast, that an audible amount of MIDI values can't be transmitted. And even if... I would lose perhaps one or two values at most, which is okay...
The only problem I'm facing is that I don't dare to get my board to production. The board alone is really expensive and one single mistake I'm not seeing right now and it's all for nothing... :D

Post

I built a midi controller a few years ago, just for fun (it was a side project in my spare time, but I never really used it), based on an Arduino UNO. I used standard CCs because that was enough for my project (and, to be honest, I was more focused on putting the pieces together - I have a background in computer science, not in electronics, so that was the part I was most worried about) and I used usb at full speed (so no standard din ports).

There are alternative firmwares for Arduino, such hiduino, which transform the board in a usb class compliant midi device. Then all you have to do is write the code to read the potentiometers and generate the midi messages you need.

An issue I faced with my project was the use of analog multiplexers to read the inputs (my Arduino board has 6 analog inputs, which weren't enough for the project): after switching input, it takes a little time to get the right reading, so I had to apply some smoothing (both in hardware and software).

I don't know if this can be helpful to you, I guess you probably have way more knowledge than me on this things (my project was a "simple" dj controller, with 14 knobs, two faders, one encoder and a few buttons/switches... it's way smaller than your 45 potentiometers project!)
free multisamples (last upd: 22th May 2021).
-------------------------
I vote with my wallet.

Post Reply

Return to “DIY: Build it and they will come”