View Single Post
Old 12-31-2013, 09:17 AM   #16
---david
Human being with feelings
 
Join Date: Jan 2013
Posts: 52
Default

Quote:
Originally Posted by Teddy View Post
If the problem is that the us2400 sometimes receives too many messages at once (like it was for me), I would guess a better solution would be to insert some sort of limiting or queue system on the MIDIOut function (which worked for me).
Hey Teddy,

in a way that's what I did, just I don't have the fancy node.js functionality :-) :

First I created a cache, so rewriting the same value gets sorted out right at the start. That should get the count down a bit in Read Mode.

Then I added a limit (I read somewhere that sending one MIDI message takes about a ms, so I limited it to 800 messages per second to be safe – how did you arrive at 40 messages a ms, btw, it sounds an awful lot?). It updates as many faders/encoders as it can without going over the limit and picks up at the last updated fader on next call.

Next call of what? Well, I still can't get around the CSurf Update Loop, but the user can tweak its frequency in the Preferences – the default is 15 Hz, it seems that is also the GUI update rate, that should be quick enough, shouldn't it?

I played around a bit with a test case where I let all 25 faders bounce up and down in 16th and 32nd intervals (at 120 BPM, so that would be, erm, 125ms and 62.5ms periods respectively?), and there isn't much of a difference anymore – at least regarding speed, the MCU setup may appear a little bit tighter in the test case, but I don't think it would be even noticeable in a real world scenario (I hope!). After all the motors have their limit, too.

So, I think I'm done for now. I'll be doing some real world testing (aka mix downs) in the next couple of weeks – I'll probably know more after that.

Anybody, feel free to test and comment! You can also open issues on GitHub if you like – I'd prefer you fork it of course, but not everyone is a coder), I'll check in once a day or so.

Have a great new years eve!
---david is offline   Reply With Quote