szk! | M4L Db2Linear
387
single,single-portfolio_page,postid-387,ajax_leftright,page_not_loaded,,select-theme-ver-1.7,wpb-js-composer js-comp-ver-4.3.4,vc_responsive

M4L Db2Linear

play with graphs and get values

M4L Db2Linear

This device gives polynomials that can be  used to convert a db volume value to 0-to-1 linear range, in respect of the Ableton Live’s Mixer behaviour when observed by M4L (that is not well documented … unless I missed something). It proposes conversions to control meters from « realistic » volume values instead of twisting and swinging with 0-to-1 ranges.

Device location

Put the device on any track.

Observe / Remote volume track

Just monitor or move the track volume to have an idea of the Observer and Object returned values.

Set volume with a db value ?

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_

Polynomials of death

# 2nd degree

y = 2.07201247*(x*x)/10000 + 2.57503387*(x)/100 + 8.342259079/10

# 3rd degree

y = 2.027132923*(x*x*x)/1000000 + 3.987653083*(x*x)/10000 + 3.002900816*(x)/100 + 8.422843694/10

Plots

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)

dev71

Errors

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 !

# Note

This page is dedicated to the M4L patch. You can find a related blog post with more details about this question here :

How to remote volume with dB values in Max For Live ?
Versions

04/06/2015
v1.0
Live 9.0.2
Max 6.1.2