display a track's level meter

Questions and discussion about building and using Max for Live devices
Post Reply
chapelier fou
Posts: 4927
Joined: Mon May 15, 2006 12:15 pm

display a track's level meter

Post by chapelier fou » Mon Sep 30, 2013 10:10 am

Hi !
Any idea why this doesn't display the correct meter ? Thanks !


<pre><code>
----------begin_max5_patcher----------
722.3oc0V1sjZBCEG+Z7oHCWytS.wu5csuFc1wIJG0rKlvjDnZ2Y6ydyGhhH
hrTqS6EhjSNjbN+xI+Sdefm+B9NP5i9B56HOu2G34YMYL3cnsm+VxtkoDo0M
eF7C9hW8CbcofcJqYIc8uJMRSrlzt8T33RiYD0xMT154BXoxMgg3gOiCPgCm
Y9aXnswzmwnWN7Mq3LEirErC2WETRJ5a7zjxgjkukxRAkMvBOYjmqpa0LRR5
OsiTHVOQNyNOU6y.WDYRCFI0G8ho+OFLv7HnijYUJWO4MAgQs.gXbEFLBeWX
PFQn+BEHlCLxhT62hajOQeR9nyQhxO.4ufvV2OLkRKfmWSnri0KEDwwL7xdq
Bxn1pllN0BuwiL+E6ZLbbETdFqhZgUMWKM5FEMAUey76HrRoRcPVFFRRAjLm
nTB5hbEb5M4Apc.aFvjlC7UklKsWMn00bquN7NyU4FtP0QeKyNbC8sUSQSeO
M4XgRs9I10+wM1KkQUTyVLC5vmVcNyobsSR0d2pQrqeaYV4eexZtsfTRVCWn
ZkI3YfPsGoWSyxUyOvTn.Rap7K7l6im31.GO1UJ1y8wQ2Esr9s8TWHp3rFx9
Ysj7Ss64BiLOivkOadiW6B0WjE8Wn4ZK5zDTTC4WbK4WzP2IU3IUTo+eb08J
mdaEC3Kjfn.DMvlnae.lCMSh9iN.K5tbHkU+slbqNKzQbKZsy0BARsNMvV5l
f9q1zFj0.bCx71bInPJAY4aRDtIwlatcK1cgo+J2aZXePdP8pRa.oyaV8qXZ
yIi8yonjmKVVNjGp6PmRqDPpnLhhxYU7wbEyJNsglj.rp23IgJMGraQKtwky
tFN0lpqDOQOr3oS3YziCOgcHddbzwDMgcHZBeHQyrtrV8OEah6Iab65IYYEF
EU2PZCDsJ4qbg8pgA1lTlqoUCxW.EzR+s5O9DgV4Sok8xENsrcSG6OvLOeL3
2PU47wJ
-----------end_max5_patcher-----------
</code></pre>
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

chapelier fou
Posts: 4927
Joined: Mon May 15, 2006 12:15 pm

Re: display a track's level meter

Post by chapelier fou » Mon Sep 30, 2013 4:17 pm

Well. linear mode seems to be the answer.
So i got a mira related question (but is there anyone using mira ??) :
since live.meter~ is not supported by mira, how would you do to display a track's meter using meter~?
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

madlab
Posts: 1382
Joined: Fri May 02, 2003 6:38 am
Location: France

Re: display a track's level meter

Post by madlab » Mon Sep 30, 2013 4:41 pm

connect the live.gain to meter~, read meter~ on Mira ?

See next post...
Last edited by madlab on Mon Sep 30, 2013 4:43 pm, edited 1 time in total.
Aboard from V. 1
MBP 2.5 Ghz I7 16 Go SSD OSX 10.12
MBP 2.3 ghz I7 16 Go SSD + HD 10.8.5 iPad2+Mira+Lemur/PadKontrol/BCR2000/ Livid Code+DS1
RME FF UC Live 9.7.7 MFL Max 8 + Max 7.3.5
Madlab sound unit / objects, guitar, electronics / end_of_transmission

madlab
Posts: 1382
Joined: Fri May 02, 2003 6:38 am
Location: France

Re: display a track's level meter

Post by madlab » Mon Sep 30, 2013 4:43 pm

connect the live.gain to meter~, read meter~ on Mira ?

<pre><code>
----------begin_max5_patcher----------
714.3ocyVssaaCCC8YmuBA+bpguDmlLf8v1ewvvPfrMahJrkBjjyRZQ629jn
sRrSbatz0g8fksHonHOGJJ+7HO+LwVP4S9B4mDOumG44ghrB7Zm64WQ2lWRU
nY9UfFju5OtQ0ZIn.tlpYB9BIjqabUb57fvwjYg1Q2.4WsKhWWw3kfFcXzAg
kPAJJNz4cpNeEiurmmSQOiiwnqiRl124hZ8wduQjd2ZnwM9OTJnFW5VEq.SN
Q1i2M22J5kQirCiuPTIWTUYvAGrngsX75aRIhIhx.ohn.MQKLAM4qjogjhuG
P9gnljS4DIPyWQt2JzZRkMuIkrMPvRJiSx1YWr1fDVCVCRh0uFCSBRBBBb6Z
IiC4hZNt0SZE9fbYlctEpZkH3ZNsBQB+uIYzR+2iXrlqXOglGEG7NbSRx7Cb
STJRNSCeStI7Tre1sf8UfRQWBmf8sUTF.2+5x73qNyiiwLOMxNdeLl+yt9hx
AqGSuELAdpfl+56lcCQfosT2D6qIotwKm.mbKAKG9sYsmve46xKgWMX6mO+E
khbVBxeSm45sbs7mhsjahogXwjaqxtau1OTay34exsMiukDbeKt8I4FpbOCe
p1KsPtkOaR2IyNW5ldFBcb2urOMvvXaHpFFNh1eCIURQdbAvoYkPW3UQ2.EK
nZsjkUqgCeoZwrVPyBKk0f3AmXm7ttuTvW91PWOSUqDR8EZqCMBGPWkgMr5t
6982tbjdJx9SGTKiyz1ivHT24zVOipMFoz6ZvsIM5whL2q1JNbw3MfG82LX0
gUd+xPknVl6n4VBiDsmIK.k45V72Z5XybiMGpgVwJJ.dW9rforTLVEDN3wgK
MZR6sSCGMwuQzD9WOZRtfnoO98+Pz7uAah9.L04paZJpoqWuw7+istDCDSWz
GER7n0XbJi2LE8nuD1vb1mfRnRSKRso+Xsr4P+1YSMMrM6yKi9Cv1hs3
-----------end_max5_patcher-----------
</code></pre>
Aboard from V. 1
MBP 2.5 Ghz I7 16 Go SSD OSX 10.12
MBP 2.3 ghz I7 16 Go SSD + HD 10.8.5 iPad2+Mira+Lemur/PadKontrol/BCR2000/ Livid Code+DS1
RME FF UC Live 9.7.7 MFL Max 8 + Max 7.3.5
Madlab sound unit / objects, guitar, electronics / end_of_transmission

chapelier fou
Posts: 4927
Joined: Mon May 15, 2006 12:15 pm

Re: display a track's level meter

Post by chapelier fou » Mon Sep 30, 2013 7:34 pm

Checking this out asap. Thanks !!
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

chapelier fou
Posts: 4927
Joined: Mon May 15, 2006 12:15 pm

Re: display a track's level meter

Post by chapelier fou » Tue Oct 01, 2013 4:54 pm

Hey madlab, it works. So thanks !
But i got another problem : the observer is reporting values very slowly, causing a very laggy display... just check the max windox : i would expect it to be flooded with numbers, but it's not :

<pre><code>
----------begin_max5_patcher----------
738.3ocuWtsbaBCDF9Z7SACW65AwY5csuFcxvHCarUhrDijv0oYRe1qNXhoI
1FhmDtHDyBd0+9ocWs94EdAq4G.Yf+28+kum2yK77rlLF7NduWvN7gZJVZes
.F7a95GBV5djBNnrlaEDlp258blRR9CXdBJbU3QyrtcDFETVGgNZrEqp2RXa
pDPsxIDTBR+c7Q4QqRSJKKJV5GGasTrJz+tSdi2o5cW+ZPZrxQKwuEEOTOL7
NqdB9gffo9+jSaBLO8kEKLWVNwveGn.we6crNlAwdL0EnWKLcRU8TK3hwf6o
brNdu6xXHJpzDzwQ1PO0dMI4hD.cxJEZrlhNCUJtknlR1CqlPnui2.uQKS.E
ThbDRDVLfDwSkDpsBPtUuQWQIL.KrO60rQIkz.hZNkKbqhIQcvEz.+Ofenra
AfWnpwxU9Zoljf3iT8DcIVFrT+20XYRoCh4l+kGMRYUz6AP1XUU87EuGZpze
C8RWgUJAYcmx0qw6UJ4ET0BBoNA.X0tH1Z2h2OdsoTh2.uu2DVs02f5JIn7U
Bb8iR+vOGbONpMIpZFibnNazr1AnN8KnA10xDMf5V5ge9rvokIlkYtlhFIQL
98zId9nyNRCQKlOoy2hN0LKI+FNWadiaB6SIkvLdvU6waSFrLIbDlblJEzWx
Q8Wnchfq6YodxWKo1NUk8bwJJrGnyUOET3wCAy93MUx+JPEQfWcuv3ryEp8w
+Zcm2MBdGqYrI.KSOdTeRZXXX5R+nrhU4ktgAQk5tE5OWhFqnYCiqcJkT+3E
fQxvn05s.yrBuYhXqBM1+eDH4ch59csiGM5eZmnAjJBCqHb1f2wLU5fWZKoo
AXCEcCQhWqmfyZ6r6ESUN4SPNYylZlBbPymbRmfblusJyJglvVEZVTCZJ6UE
yFbPSor5FUiqlG21t2LFpykVgnav8f6WFjszdKg4t01EIP.6I8uuc1j.rP2E
Soag0IbsTOTX9oB504kE+CPH1MIM
-----------end_max5_patcher-----------
</code></pre>
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

trevox
Posts: 659
Joined: Wed Mar 23, 2011 12:58 am

Re: display a track's level meter

Post by trevox » Tue Oct 01, 2013 6:11 pm

chapelier fou wrote:Hey madlab, it works. So thanks !
But i got another problem : the observer is reporting values very slowly, causing a very laggy display... just check the max windox : i would expect it to be flooded with numbers, but it's not :

<pre><code>
----------begin_max5_patcher----------
738.3ocuWtsbaBCDF9Z7SACW65AwY5csuFcxvHCarUhrDijv0oYRe1qNXhoI
1FhmDtHDyBd0+9ocWs94EdAq4G.Yf+28+kum2yK77rlLF7NduWvN7gZJVZes
.F7a95GBV5djBNnrlaEDlp258blRR9CXdBJbU3QyrtcDFETVGgNZrEqp2RXa
pDPsxIDTBR+c7Q4QqRSJKKJV5GGasTrJz+tSdi2o5cW+ZPZrxQKwuEEOTOL7
NqdB9gffo9+jSaBLO8kEKLWVNwveGn.we6crNlAwdL0EnWKLcRU8TK3hwf6o
brNdu6xXHJpzDzwQ1PO0dMI4hD.cxJEZrlhNCUJtknlR1CqlPnui2.uQKS.E
ThbDRDVLfDwSkDpsBPtUuQWQIL.KrO60rQIkz.hZNkKbqhIQcvEz.+Ofenra
AfWnpwxU9Zoljf3iT8DcIVFrT+20XYRoCh4l+kGMRYUz6AP1XUU87EuGZpze
C8RWgUJAYcmx0qw6UJ4ET0BBoNA.X0tH1Z2h2OdsoTh2.uu2DVs02f5JIn7U
Bb8iR+vOGbONpMIpZFibnNazr1AnN8KnA10xDMf5V5ge9rvokIlkYtlhFIQL
98zId9nyNRCQKlOoy2hN0LKI+FNWadiaB6SIkvLdvU6waSFrLIbDlblJEzWx
Q8Wnchfq6YodxWKo1NUk8bwJJrGnyUOET3wCAy93MUx+JPEQfWcuv3ryEp8w
+Zcm2MBdGqYrI.KSOdTeRZXXX5R+nrhU4ktgAQk5tE5OWhFqnYCiqcJkT+3E
fQxvn05s.yrBuYhXqBM1+eDH4ch59csiGM5eZmnAjJBCqHb1f2wLU5fWZKoo
AXCEcCQhWqmfyZ6r6ESUN4SPNYylZlBbPymbRmfblusJyJglvVEZVTCZJ6UE
yFbPSor5FUiqlG21t2LFpykVgnav8f6WFjszdKg4t01EIP.6I8uuc1j.rP2E
Soag0IbsTOTX9oB504kE+CPH1MIM
-----------end_max5_patcher-----------
</code></pre>
It's not audio resolution, so it's not going to send enough values to give you a smooth looking meter. Does the meter need to be on a midi track? Can you use a Max audio plugin instead? If so, don't bother with a live.meter at all. I verified it works fine with Mira. If you do need it to be on a midi track, you can send osc data - works pretty well. If you drop this on an audio track:

<pre><code>
----------begin_max5_patcher----------
795.3oc4X9zaaCBFF+rymBj0NlkY.GG6ocoU6xj5occZZxwljPEFrv3rzU08
YeXvIwcKIMlzl9mcAG+B17vu7.ufucfm+TwJRkO3ifuA77tcfmmITS.u1687
KRWkwRqLMyufTUkNm3OzVmhrRYh+AIc9BE3cv00vqKD0JFQYdNXaTaH0MkDa
m56C9daUkoprET97eHIYJasXXznfg.TRXykvjlxlPadlYBtph9KyKCFnq1Fl
lazjX50uGh86zVdZgos9WHooLvkBVdG8R4qkKpI1cCFzTL7TICiL6wFLnHTW
vfbALnyEX3jep6v+gK04kUDdN.hlLRqvQPPbP.d2TJ3Pn.1L5wglKPjkEw8h
EicAEPm7HJh728zILiIRUGddRPfwNL1L1skggcPPojnYsJUQE7t8UGFf28fb
Guftv2zWsL2VB61uTtd7tLkYQ+1NfQxs1ofGO+ToT2a819DFfM1mjIiFGljD
Gq+M1AKDB+J2CghGexdnXW7PP7yfGJSTTP1ZW1Xh9D3xZJKGbinVBRqyoB.Y
1LsVAKHxMqsynbRlnladFTesbIljZQlktSrSbS5kWKzIq15mQNepQfidL41W
68DOXP6+01KSbYN2CstM3KpTFM6f7nYHjIXBoUVAivCaJBaJ0EvtJ5IAcW0a
zgCNYxE8VfbNa5vm.4B+e1yggtCNzaAv8YxRZFArjHUzLsvYzBZ+2zgc96j1
owtPyj8CyCBvEz7bB+oOevElTmJA3J5RR+MalLjPqaK1541aJR3t3yj2BlMK
DmIEENhwVClYiFQNPwWUYI12wBX0y03ZOaXFsuMLWQmyalKs4WGZuygwcRHO
1oiO7LeX7FJQ4mAHgcmQvSkQl9xr48+5SdYTaS76CtJ8g.xVOVaOeCXqhyIU
JJey4g911uqRmFscA20inbZU5T8gWLw14+fGqbvGibvmM4.OF8L97IGzKK4b
DpI9rpF3CnF7KJ1fdQwFz8ZywqF6RPokk5cPV09JMBQuJ801bjQCM2R41aM4
Q8k58ctt8XSjTodAVkd00ZocgvUQg9CZ5m6F7G.E7vWF
-----------end_max5_patcher-----------
</code></pre>

Then drop this in a midi track:

<pre><code>
----------begin_max5_patcher----------
745.3oc0W1saaBCEG+ZxSgkuNkZCDBYZ2rpdSk1dBpllHfIwsfcjwzktptm8
YNNzPSCzBqMS6BLxe++7iyw9vCSbvKkaYkXzmPWibbdXhiCzTcCN6p6fKh2l
jGWBCCWvzL0uwSscIpJjU5blF5jtqUaS562vrqLNKWFqwnuuq+Mw5j0bwpen
XIZ6P7IAtjoH+Pu5WTnLZlKY+bTrRlPGq4RQ68hmBxRt7lynzVxhKNTUsWg1
6bT8dERObeqmziSlTWL8eKa7hn+8rgLF1Pm8twFA6mFczHBMaKrEXkgGLz44
rLM5bEe0Z8wwmeW3COc2SeDLfNGHHYAXCfqFMpEAyjBcI+WvhRIlteA.ivsF
pHt.FJ9KJdbN5BYd5Qwq+6GnpRMeiRX76XnHBwefNY8SGB7Y1aFvknnQPG+w
PG5HnShrnv3n9B77YzEU77Tz8xJE5aWc4UHVVlwBQqYJVyny4BVhrR.Sw6nD
jzMlnTHNvawrl.g5JCBSAiBSMyQsZIHQWx6H3tjcGOggtioz7DiLx4E7NhA6
iM.MBH1SJniwEZQ2roWrrlmlxDe7fBbpzRzWMgfClOyZeB9be.Oc55POFdl+
JtNnqzw47jdQUssjHykJqnHt9SqKBpKMEz1B5iigYJYw3nXfMlKvq04TCihg
+OQwNtInfmxM7ZvzKDb67CfWAyGQHp2o5T9drbtXfW8wE8mckEKd1WAjQfE5
oBKEbUralpdGF5GeuP3xcu41PnvH2n5fGpK8ICkuRHMSv39eaWoF1QxkyNpE
R5O2RfzmYuR0Ozc9hEKhp0jQZ9AlJ6E1x3jaWYRTTjdH3fg.Wqev+v.Dnt8m
SyRS1AIMNF6xpCseiRYkZt3IK858+VAZu+v96aZLvTdY7xbFntiGmOD4PdM4
PNYxw+MHmnSlZnuA03MR0Xcjh2rwjGT4tkDDhI.7F6I8gSgpbgsJDFfUlrmZ
FO7KJ3XkIzSa7xqT1yA1FFfmTuOON4O.EqdkgC
-----------end_max5_patcher-----------
</code></pre>

...it should work!

Not as clean as using the API, but I could never figure out a way of getting any audio rate signals working in an M4L midi effect.

madlab
Posts: 1382
Joined: Fri May 02, 2003 6:38 am
Location: France

Re: display a track's level meter

Post by madlab » Wed Oct 02, 2013 8:54 am

It seems that the Live API runs on low-priority threads and thus introduces unpredictable latency and 'timelapse reports' of values for the live.observer.But this isn't clearly mentioned in the doc. What I had in mind was to connect the meter~ directly to the plugin~ object or after the audio FX in your device. This way it works fine.
See this for a talk about event priority : http://cycling74.com/2004/09/09/event-p ... -vs-queue/
Even if I guess you've already read this...
Aboard from V. 1
MBP 2.5 Ghz I7 16 Go SSD OSX 10.12
MBP 2.3 ghz I7 16 Go SSD + HD 10.8.5 iPad2+Mira+Lemur/PadKontrol/BCR2000/ Livid Code+DS1
RME FF UC Live 9.7.7 MFL Max 8 + Max 7.3.5
Madlab sound unit / objects, guitar, electronics / end_of_transmission

chapelier fou
Posts: 4927
Joined: Mon May 15, 2006 12:15 pm

Re: display a track's level meter

Post by chapelier fou » Wed Oct 02, 2013 9:51 am

damn....that's too bad.
Cause i want to display 16 meters from 16 tracks on Mira, so it has to be on it's own track.
The only way i can think of is to put a 'satellite' on each track.
But it makes me wonder how kevinkripper's Ultimate Mixer works ?

EDIT : didn't open your patch, trevox, but it looks like you took this approach.
Thanks !
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

chapelier fou
Posts: 4927
Joined: Mon May 15, 2006 12:15 pm

Re: display a track's level meter

Post by chapelier fou » Wed Oct 02, 2013 10:05 am

trevox, i tested your patches, it seems to work smoothly.
But i'd hope for a cleaner approach, since that would be part of my default live set...
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

trevox
Posts: 659
Joined: Wed Mar 23, 2011 12:58 am

Re: display a track's level meter

Post by trevox » Thu Oct 03, 2013 12:09 am

chapelier fou wrote:trevox, i tested your patches, it seems to work smoothly.
But i'd hope for a cleaner approach, since that would be part of my default live set...
What I posted was just the method for getting the signal from one place to another. If you wanted it fully set up in your default set, I would suggest creating 16 different versions of the first patch I posted with different OSC names (i.e./1_left, /1_Right, /2_left, /2_right...) and then expand the route message in the second patch I posted to include all messages from all 16 individual patches. Drop them all where they should go and save your default patch. No further setup should be needed each time.

I'm afraid if you want to have audio rate signals from several tracks feeding into a single track, live.observer is not really going to cut it. The only other way I can think is to use a live.remote~ object on each audio track and map that to a float which in turn goes into a meter~ object on the patch with the miraframe. I think the UDP method is probably less messy to be honest, though the other method may be more dynamic. If you figure out a way of getting the API to observe audio rate signals, I'd love to know!

chapelier fou
Posts: 4927
Joined: Mon May 15, 2006 12:15 pm

Re: display a track's level meter

Post by chapelier fou » Thu Oct 03, 2013 8:31 am

Thanks trevox. I did get this. i was just trying to explain that having to drop 'satellites' patches on every track is a bit unconvenient. i am still wondering what approach is used in this patch : http://www.maxforlive.com/library/devic ... mate-mixer
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

chapelier fou
Posts: 4927
Joined: Mon May 15, 2006 12:15 pm

Re: display a track's level meter

Post by chapelier fou » Tue Oct 08, 2013 4:11 pm

Hey guys ! for your information :
looking in the guts of kevin kripper's Ultimate mixer, i noticed that observing output_meter_level is MUCH slower than observing output_meter_left/right ! i don't know why. Anyway, it works !!
Thanks !
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

Post Reply