live.gain~ signal input level

Drum Stix's icon

Hi,
I intent to use live.gain~ to display the master volume level. I'm observing the signal level via M4L api. The output of live.observer is between 0. and 1. This indicates the dB level between -70. and +6. (if I'm not mistaken...). I thought I could wire this signal into live.gain~, but doesn't quite work. From my observations, live.gain~ requires a 0. to 2. signal, where 0. to 1. equals -70dB to 0dB and a signal from 1. to 2. equals 0dB to +6dB.

So what would be the way to "map" the live.observer output to live.gain~ input? Does it require a formula inbetween?

Here's my patch, currently only showing left channel.

Max Patch
Copy patch and select New From Clipboard in Max.

double_UG's icon

[atodb] object

Drum Stix's icon

splendid! Right what I needed! Here's a working patch for reference just in case someone might have the same question. I used [dbtoa] object instead by the way...

Max Patch
Copy patch and select New From Clipboard in Max.