Sounds like what LV2 is doing with its CV ports. This is a good idea.

Vesa kirjoitti Sun Apr 06 2014 12:19:47 GMT+0300 (EEST):
> 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?
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> LMMS-devel mailing list
> LMMS-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lmms-devel
>
------------------------------------------------------------------------------
_______________________________________________
LMMS-devel mailing list
LMMS-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lmms-devel

Reply via email to