2014-04-06 11:19 GMT+02:00 Vesa <dii....@nbl.fi>:
> Tell me does the following make sense:
>
> - AutomatableModel contains a pointer to a buffer
> - When a controller is connected to a model, it gets passed that buffer
> pointer
> - new buffer is created at connection time (deleted when connection is
> disconnected)
> - Every period, the controller writes the control values to the buffer
>
> So far, nothing else is done with that buffer. Only when some thing
> (plugin, etc.) wants to read sample-exact values from that model, then
> the values in that buffer get translated from the controller's -1-1
> scale to the model values, whole buffer at once. Thus:
> - The model will have a method that returns a buffer pointer
> - This method first goes through the buffer and translates the values to
> the model's scale, then returns a pointer to the buffer, so the
> recipient can then use those values for whatever
> - When no controller is connected, the method returns a null pointer,
> which the plugin/etc checks for, and falls back to the regular value()
> method
>
> I think this might be faster than reading values from a method one by
> one. Instead of calling a method in automatablemodel (which maybe calls
> other functions) per-frame, we could just retrieve a buffer of values
> from the model, per-period. Also this way, we still won't bother
> translating all the buffer values if the recipient doesn't want
> sample-exact data.
>
> Does this make sense?

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
LMMS-devel mailing list
LMMS-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lmms-devel

Reply via email to