From: Joe E. <jo...@em...> - 2011-09-08 15:01:26
|
On 9/8/2011 2:31 AM, frankster wrote: > Can anyone think of anything simpler that would do the job? Although one > advantage of this is that it would > keep the driver simple, and all the complexity would be in core base > classes. I'm thinking this: - There should be a application-wide rate limit on how often widgets send updates when the user is moving them. This limit would be able to be set by the user. It would *always* send when the user releases the widget, but they could also ask for updates to be sent X times per second... or whenever the control has moved another X% of the entire range since the last send. - Widgets would be ignorant of any rate limit imposed by the individual synths. The MIDI layer would know about them, and it would queue up and throttle outbound messages. If the outgoing queue ever got too full (ie, we don't want the MIDI layer queuing up 30 seconds of widget updates), then it would throw some exception. The widgets would decide how to deal with the exception. They could just discard the latest update they wanted to send, or they could possibly tell the MIDI layer something like "Discard all of the pending updates from me that you've got queued, and just send this one". - Joe |