Put the device on any track.
Just monitor or move the track volume to have an idea of the Observer and Object returned values.
Live.Object track volume setting needs a value between 0 and 1. The question is : how to convert a db value [-60 6 db] to a 0-to-1 value ? We empirically checked the correspondence between these different scales and fit the response with polynomials. Use the plots, play with them and watch results. To limit CPU usage we limited polynomials to 2nd and 3rd degrees. Expressions are given below. You can also get the empirical values in simple text format for your own (better ?) calculations. Zouk_
# 2nd degree
# 3rd degree
Here is a screenshot of different plots :
# black : empirical monitored values Y_0-1 = F(X_db)
# strawberry : 2nd degree polynomial Y_0-1 = P2(X_db)
# orange : 3rd degree polynomial Y_0-1 = P3(X_db)
The maximum ∆db is actually ± 0.5 db compared to the expected value. No satisfaction here, but in my case I need to optimize the CPU usage during live set because higher degrees polynomial (4th, 5th) leads to grunchy lags. I will continue optimizing patches that use these kind of calculations. Restez branchés !
This page is dedicated to the M4L patch. You can find a related blog post with more details about this question here :