How to make multiple live.text objects mutually exclusive, like radio

Learn about building and using Max for Live devices.
Post Reply
haszari
Posts: 2
Joined: Tue May 12, 2020 4:49 am

How to make multiple live.text objects mutually exclusive, like radio

Post by haszari » Tue May 12, 2020 4:57 am

I'm trying to build a Max for Live midi effect that has three different modes - let's call them `default` | `fill1` | `fill2`.

I want to use `live.text` buttons for these three modes, so I can map them to a hardware controller, and have the hardware buttons light up accordingly.

Only one of these modes can be active at a time - these are really radio buttons, the modes are exclusive.

How can I configure them so that when one is toggled on, the others turn off?

Is there a way to tell Max that these are part of a radio/exclusive group?

Or .. do I need to implement this via patching maybe using `select`?

I would really appreciate any clues or guidance - thanks in advance :)

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

Re: How to make multiple live.text objects mutually exclusive, like radio

Post by chapelier fou » Tue May 12, 2020 5:58 am

Select 0, 1.
Trigger 0, 1.
Can’t think of a better way.
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

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

Re: How to make multiple live.text objects mutually exclusive, like radio

Post by chapelier fou » Tue May 12, 2020 6:00 am

Or use a radiogroup and map it to a cc, if tou can then program your midi controller accordingly.
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

doubleUG
Posts: 249
Joined: Sun Apr 24, 2011 7:19 am

Re: How to make multiple live.text objects mutually exclusive, like radio

Post by doubleUG » Tue May 12, 2020 6:59 pm

<pre><code>
----------begin_max5_patcher----------
757.3oc6Xt0aaCBE.94To9evxZOlEEv2R2ekppJRLMkJavBvYYpZ+2GWLMwM
1NzV6skp9hI9.3CemKvg770WMKbMaOVDF7ifaClM6YkjYFYZIybBlEVh1uo.
ILCLrDKDns3v4McJw6klN.uHhjaDvV+z2gYuHsBI27Hgt8dNdizpy3HvhkyC
hiS0MIK0OgpmA24lDstjPKvRitgGIkUKchANwVYxeUgse9vvf6Lc86quR2pZ
l+w47acCZxPfBSWoYK5lLCh2rH4B.TAVFzCrQCAazJngxnHCyYWDd0AfENHr
vjOUvBFLLNI8+VXkrsaKvcwDXXGXlAlDnYqHXr6YOLANCSUHNpDKw76wTz5B
CYK6EXBUNQLubPlAlLzDvMelXdkGgtIwKu7Plh+ohuSSiywaX43fntLFodbb
TbrML.dl73ntMFQCx67VMS.8OTSo3hto2qCiSLI9wYuO56eWrBh3CAbAYGdg
ASmJ1g3TU3V6duEdWWn60Qy1lXSV.H4slE.GJKXfc2ma1g20u.sCmeORJ4j0
0R7geIZLNNqil+hZL6Am7W5n8JntrQQpgCzJS0BOnvVi1srfc0YAitcP6cqQ
WpbdGCdqNEOx3xS+VgMCsI73vOlx3EPmwKdUcyWwKui3Evkc7RmkU3S0geEr
71CV9aFoXWzpoPO4t+FuptiWE+HX07MNScS4EAvCl6brPRnHIgQOZP5qIFbj
6mwywbSkR8G658JPeg6i+38rDxTiB7OcIj1iQ.LBq.+rAMiZDzWZaqYO5CNk
t8HePNZzH90vzCxim9.9nOvn5QOOduZQURxqXpx5a19.lko+CshSsEKDaqqt
0aPnolanRXRyaSTJgW.sZBiP8JGQe+7fozDb1MmAvIbE3UP73ssDzW0AFE0E
4q5fmntlydQUU6vbQyLrZRUj1SLiGX0b66Dp8c64+gb7NhaJ1KkFh3phvjpJ
vp415.1mFG1LalxeRqINWplUspM0ApqaPTgrTYpW75qTC3O.QzkXyB
-----------end_max5_patcher-----------
</code></pre>
copy the text, open Live > drag in empty M4L device > open Max editor > paste > save M4L device
https://docs.cycling74.com/max8/vignett ... ng_patches

https://doubleUG.bandcamp.com/releases

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

Re: How to make multiple live.text objects mutually exclusive, like radio

Post by chapelier fou » Tue May 12, 2020 7:45 pm

Never heard of [decode]...
Always something nice to learn from @doubleUG ! :)
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

haszari
Posts: 2
Joined: Tue May 12, 2020 4:49 am

Re: How to make multiple live.text objects mutually exclusive, like radio

Post by haszari » Wed May 13, 2020 7:20 am

Excellent, thank you for the pasteable example @doubleUG!

To wrap up the thread and for others later, the solution is to route the output of each button into outlets of a funnel object, then into a $1 message, and then out into decode 3 ... picture:

Image

Thanks for the info about select and trigger, I found select but was still figuring out trigger.

cheers all :)

charlybeck
Posts: 114
Joined: Sat Sep 18, 2010 1:42 pm

Re: How to make multiple live.text objects mutually exclusive, like radio

Post by charlybeck » Mon May 25, 2020 4:09 am

erm... you don't need to build this on your own.

there is live.tab

this lets you define a string "one two three" causing the control to show 3 buttons where you can toggle beetween them...

<pre><code>
----------begin_max5_patcher----------
330.3ociRssaBCCC84hD+CU44NTgsAR7qLMUkBFHnTmJGmNPn8uuzbgKRfzd
nwIGerywmlKSmTHZMm.qnbc4WkEEW7HEArQjhLPgnSdZiVZCDEZ0.LikshpT
1AIgxN34IQWmB0.Gpc9cnMZEB1ldBr.xRVYvQJ0YJpsgFZZO91766lww418d
FtWxaNnv8MDrgiSyhkqlUWUN+y5PnNDV3WK+9VUjW1LPM.Ja0vqTXp4OjNpB
9bODuNgnJ9sSajdIb8RrxAXaijYR05X31Naxiyl7nOpcfYWF+Zh6Up1f6eoY
+.S6ACw+Op4wXwyRBdmHMiFDFGQ9GSHbf.31j9PQNTwV9bzSqSD9c5j3t7lT
zGhcQH66G.xldJDM.+iuiFZ77pp3YEFOGkqffAUtj3+Ggj7+wX+aAGEG+SK+
Pjp1rEHzoBr8HAM3W9CicAb6
-----------end_max5_patcher-----------
</code></pre>

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

Re: How to make multiple live.text objects mutually exclusive, like radio

Post by chapelier fou » Mon May 25, 2020 5:40 am

You can’t map live.tab to several midi messages. So it won’t work (see first post)
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

charlybeck
Posts: 114
Joined: Sat Sep 18, 2010 1:42 pm

Re: How to make multiple live.text objects mutually exclusive, like radio

Post by charlybeck » Tue May 26, 2020 12:48 pm

ah ok. that's the point. i see.

Post Reply