OSC API through Max
-
willrjmarshall
- Posts: 87
- Joined: Fri Apr 24, 2009 2:41 am
OSC API through Max
So,
Has anyone given any thought to building a standard Max for Live patch that would expose the Live API via OSC, so any device (Lemur, Monome) could access the API directly and simply?
I'm thinking that it's quite doable (they did it with Python and LiveOSC) - and it would be good to have an Official/Supported OSC API for Ableton.
Would anyone be interested in this?
Has anyone given any thought to building a standard Max for Live patch that would expose the Live API via OSC, so any device (Lemur, Monome) could access the API directly and simply?
I'm thinking that it's quite doable (they did it with Python and LiveOSC) - and it would be good to have an Official/Supported OSC API for Ableton.
Would anyone be interested in this?
Re: OSC API through Max
I totally agree with that !
I'd like to use my Lemur with osc to control Live and get feedbacks from Live too. Would be so cool...
But my knowledge about Max is still very poor. The tutorial on osc are quite nice but I'm a newbie in max.
Anyone with strong skills to build that ?
I'd like to use my Lemur with osc to control Live and get feedbacks from Live too. Would be so cool...
But my knowledge about Max is still very poor. The tutorial on osc are quite nice but I'm a newbie in max.
Anyone with strong skills to build that ?
Re: OSC API through Max
Thats sounds great. I use OSC right now with M4L. So the issue here is really agreeing on a standardized naming/path convention to utilize. It is definitely doable.willrjmarshall wrote:So,
Has anyone given any thought to building a standard Max for Live patch that would expose the Live API via OSC, so any device (Lemur, Monome) could access the API directly and simply?
I'm thinking that it's quite doable (they did it with Python and LiveOSC) - and it would be good to have an Official/Supported OSC API for Ableton.
Would anyone be interested in this?
Mike
Websites:
Max For Live Community site:
http://www.max4live.info
http://www.noisemakers.info
Controllers: Lemur, Ohm 64, Monome, APC40, Launchpad
Daw: Live 8 Suite
Audio Interfaces: Apogee Ensemble & Duet
Monitors: JBL LSR 4300
Max For Live Community site:
http://www.max4live.info
http://www.noisemakers.info
Controllers: Lemur, Ohm 64, Monome, APC40, Launchpad
Daw: Live 8 Suite
Audio Interfaces: Apogee Ensemble & Duet
Monitors: JBL LSR 4300
-
willrjmarshall
- Posts: 87
- Joined: Fri Apr 24, 2009 2:41 am
Re: OSC API through Max
The first step would simply be to clone the API out into OSC. No particular issues here, cos everything is defined and named already. Basically a big cut-and-paste job (although I don't really know Max, so I'm extrapolating from Python).
A nice to have thing on top of this would be to add OSC paths for various abstractions. There are a bunch provided already, but I bet we'll end up with 5-10 things basically everyone wants, so it'd be good to add them. Stuff like "currently playing clip name".
Would anyone be interested in setting up a Google Code or Github project for this? I'm keen to start, but I only picked up Max for the first time last night and I'm not really on top of it yet.
A nice to have thing on top of this would be to add OSC paths for various abstractions. There are a bunch provided already, but I bet we'll end up with 5-10 things basically everyone wants, so it'd be good to add them. Stuff like "currently playing clip name".
Would anyone be interested in setting up a Google Code or Github project for this? I'm keen to start, but I only picked up Max for the first time last night and I'm not really on top of it yet.
Re: OSC API through Max
We could actually use the same hierarchy as the LOMwillrjmarshall wrote:The first step would simply be to clone the API out into OSC. No particular issues here, cos everything is defined and named already. Basically a big cut-and-paste job (although I don't really know Max, so I'm extrapolating from Python).
A nice to have thing on top of this would be to add OSC paths for various abstractions. There are a bunch provided already, but I bet we'll end up with 5-10 things basically everyone wants, so it'd be good to add them. Stuff like "currently playing clip name".
Would anyone be interested in setting up a Google Code or Github project for this? I'm keen to start, but I only picked up Max for the first time last night and I'm not really on top of it yet.
so we could do stuff like
/live_set/
/live_set/view/
/live_set/view/detail_clip parameters
/live_set/tracks/
things like that
Mike
Websites:
Max For Live Community site:
http://www.max4live.info
http://www.noisemakers.info
Controllers: Lemur, Ohm 64, Monome, APC40, Launchpad
Daw: Live 8 Suite
Audio Interfaces: Apogee Ensemble & Duet
Monitors: JBL LSR 4300
Max For Live Community site:
http://www.max4live.info
http://www.noisemakers.info
Controllers: Lemur, Ohm 64, Monome, APC40, Launchpad
Daw: Live 8 Suite
Audio Interfaces: Apogee Ensemble & Duet
Monitors: JBL LSR 4300
Re: OSC API through Max
Sounds like a job for regexp:
<pre><code>
----------begin_max5_patcher----------
437.3ocyUtsTCBCDF9Z3oXmbcsP3fhdk9bnc5Pg01nPfgDpnc56tg.zysh0N
cbFHLY2MI+7weBKLMHSxpPA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JPu70w2lWhrxhnNQ2dZJrV.wnZSHWeFzF0P2plYr3XTmtiQor37LFW1
JAXzA+10WE40CEEbUUjeOTj2+NFo1bAzyTQpNKM+FLMz2aC
-----------end_max5_patcher-----------
</code></pre>
Re: OSC API through Max
You could do that or just use the externals from CNMAT... They support the full OSC standard that allows wildcards in the OSC paths.mzed wrote:Sounds like a job for regexp:
<pre><code>
----------begin_max5_patcher----------
437.3ocyUtsTCBCDF9Z3oXmbcsP3fhdk9bnc5Pg01nPfgDpnc56tg.zysh0N
cbFHLY2MI+7weBKLMHSxpPAAd.dFLLVXZXnCUGvnsuAIMrJJITnKivwOxl7F
YPSJIVI0gyKvbjGC4gxYcI4koLdBJ0Cj1F70LtTv9B0wbFZut1rR4tE2DR9Y
N1HQBAF0lRsPQyX7oiKvHYSVpusZ9.ZfW8i.ZcqiJzpwvh0ZUo+aBHanGdXp
dAHOUvBSH0IVZZV2LnmTIEEhvo3dXwJgMGGKPokrHL5cgksUJqBKFGiyYQn0
7rjxT7f.y4b.l5yf.4xPIKiuOYtqd3fcayJrbVTtYtbbZQ9gor+kkxGw6UfS
wpbvBdTTNQHYxRIBuPTW+cmn+QYzfct6AytWaLot2dJmo20wY1YLgFiIXCaZ
LgKsw7W5wBb0jxuYOL08TlL2qhIqlWCuLmt49idpd3kbbzPw2+TdIZ+Pidnp
2P9t+JPu70w2lWhrxhnNQ2dZJrV.wnZSHWeFzF0P2plYr3XTmtiQor37LFW1
JAXzA+10WE40CEEbUUjeOTj2+NFo1bAzyTQpNKM+FLMz2aC
-----------end_max5_patcher-----------
</code></pre>
Websites:
Max For Live Community site:
http://www.max4live.info
http://www.noisemakers.info
Controllers: Lemur, Ohm 64, Monome, APC40, Launchpad
Daw: Live 8 Suite
Audio Interfaces: Apogee Ensemble & Duet
Monitors: JBL LSR 4300
Max For Live Community site:
http://www.max4live.info
http://www.noisemakers.info
Controllers: Lemur, Ohm 64, Monome, APC40, Launchpad
Daw: Live 8 Suite
Audio Interfaces: Apogee Ensemble & Duet
Monitors: JBL LSR 4300
-
willrjmarshall
- Posts: 87
- Joined: Fri Apr 24, 2009 2:41 am
Re: OSC API through Max
Yup. It's cleaner if you do string.split('/') first, so you have ['my', 'path','in','osc'] and can match each one cleanly.
Re: OSC API through Max
It would be nice to be able to leverage wildcards in the Live API, too. In fact, without pattern matching and wildcards, changing LOM syntax into OSC-style-max-messages is really just a minor syntax shift. I would like to send a message like: /live_set/tracks/*/mixer_device/volume 127 and have all my tracks go up to max volume.technog0d wrote:
You could do that or just use the externals from CNMAT... They support the full OSC standard that allows wildcards in the OSC paths.
Is there an obvious way to scan through a whole Song and learn how many tracks there are, and what devices and parameters are present? I'm just digging through the docs now, and it's not clear to me. I know I can use live.observer to find the id's of the children. One could scan through those, I guess, and figure out what is there. But maybe there's a better way? I'm imagining dynamically generating an OSC namespace so you could do all the routing with OSC objects.
mz
Re: OSC API through Max
Mr technog0d,
The post about regexp was written by the guy who wrote the CNMAT externals.
-A
The post about regexp was written by the guy who wrote the CNMAT externals.
-A
-
willrjmarshall
- Posts: 87
- Joined: Fri Apr 24, 2009 2:41 am
Re: OSC API through Max
Yup. You can get all that info out easily enough, and set observers on the values in case of changes.mzed wrote: Is there an obvious way to scan through a whole Song and learn how many tracks there are, and what devices and parameters are present? I'm just digging through the docs now, and it's not clear to me. I know I can use live.observer to find the id's of the children. One could scan through those, I guess, and figure out what is there. But maybe there's a better way? I'm imagining dynamically generating an OSC namespace so you could do all the routing with OSC objects.
mz
Re: OSC API through Max
That's funny... hehe. I actually didn't look at the code as I am not in front of Max right now. So i was just adding a comment.pukunui wrote:Mr technog0d,
The post about regexp was written by the guy who wrote the CNMAT externals.
-A
Websites:
Max For Live Community site:
http://www.max4live.info
http://www.noisemakers.info
Controllers: Lemur, Ohm 64, Monome, APC40, Launchpad
Daw: Live 8 Suite
Audio Interfaces: Apogee Ensemble & Duet
Monitors: JBL LSR 4300
Max For Live Community site:
http://www.max4live.info
http://www.noisemakers.info
Controllers: Lemur, Ohm 64, Monome, APC40, Launchpad
Daw: Live 8 Suite
Audio Interfaces: Apogee Ensemble & Duet
Monitors: JBL LSR 4300
Re: OSC API through Max
I was around when they were written, but I can't take much credit. Matt Wright and now Andy Schmeder are the ones.pukunui wrote:Mr technog0d,
The post about regexp was written by the guy who wrote the CNMAT externals.
-A
@willrjmarshall
Ok, help me out. Is there some way I could dump all of the canonical paths to values into a collection, for example? If I had that, I could use patcher scripting to make a heap of OSC-route objects connected to live.observers with the right paths. (Although, I suspect it might be slicker to do this in javascript or java.)
mz
Re: OSC API through Max
Maybe this helps to explain where I'm heading:
<pre><code>
----------begin_max5_patcher----------
808.3oc2X9saaBCEF+ZxSgEZWl1f+CIvtZ64Xqph.dodCLHrIKsU8ceXaRaR
WAbRntSSphJrMlO+iy4yGmGm44utbGU3C9L3a.OuGm44oaR0fW28d9EI6RyS
D5g4KxYYzZ+4lt3MELdNUp6C9RikMxW2ZUMUP4xDIqjeaMMUZdqnnUWGLGbE
TcMn6B3ltGxLOx6qnlQ66+bWB1C5FUOX2aHQldGiuouYmfTWivGL+rL8hpb8
OuBR1un9QdYhr8MW0nmEnp0mlMScYtkTpfJDIan6mQIcmdp7Wjy1RuUPkKj0
Io+RrHXQAaGs91L5VVJcQUBm2tB.eB9lDFsWgkb4yqezy.3b.OLH3TIe+bta
xPXycQ8P5P+CVG7jB8qv+q0rjb+y.1b5uam1+h0OjCnorbAXBXIpWpLeLxfB
0rXo4eqh0.JnGxDLsj4rSVu37ttUc734c3ILsqmHAIXMHGjOHGrJL.2GdVmv
2nCEFMbfPLYHZx.QvgBGBcShhxS551NThbxbcNQ+CCVHgKs.KD3zhk9Lqaso
mTi3yBIXkKZKYHC4nR9uw2naQSBsv3HxAaXWUWVQqk2C1lj2P+fiEPK0tFQQ
CEKfW4NSiVod26nqpcNplsZPPMhLFH84bfhcogpfVusmrHWU7QWbSLVG2DLH
aV4NWUcxzGu2JAq4xpkC5shbRLSaU5UTdFXZRoNSrzU0VjwlYvMgibSzxXGX
ZaYdSwGZnTGyPcm7AOTrjapmqltgtqBr.7EQyZgjIajTv28a+6xCrBG0q9D7
rglM3g3AMsgVVtm9Ya8d4u9GzPK.U6GiRQYSc5d4u+bofWjPFskcb8wlObPv
iFzcrrLpt+87pfkUUx3xNQ.t4M+vZslH1noP2po1pMAvQzjp5rSQS33tspNb
GKLNTESb4pcLBF4V.Bs4iZfS0TjERRU9jCkj53u.zHZRcXvCBFchlFiSpRvc
MmFKeTUd2ovIb.45P0QNLIhDy1aGeWbf4DplQFGbw4p+CZ.qJ+aTMQbrlrwR
C6VOMrMFHuBlu6ZZkMlZtMYEagjb614ZW8wrOBcrlr4KG4R1gr8lml8GFHBL
GA
-----------end_max5_patcher-----------
</code></pre>
<pre><code>
----------begin_max5_patcher----------
808.3oc2X9saaBCEF+ZxSgEZWl1f+CIvtZ64Xqph.dodCLHrIKsU8ceXaRaR
WAbRntSSphJrMlO+iy4yGmGm44utbGU3C9L3a.OuGm44oaR0fW28d9EI6RyS
D5g4KxYYzZ+4lt3MELdNUp6C9RikMxW2ZUMUP4xDIqjeaMMUZdqnnUWGLGbE
TcMn6B3ltGxLOx6qnlQ66+bWB1C5FUOX2aHQldGiuouYmfTWivGL+rL8hpb8
OuBR1un9QdYhr8MW0nmEnp0mlMScYtkTpfJDIan6mQIcmdp7Wjy1RuUPkKj0
Io+RrHXQAaGs91L5VVJcQUBm2tB.eB9lDFsWgkb4yqezy.3b.OLH3TIe+bta
xPXycQ8P5P+CVG7jB8qv+q0rjb+y.1b5uam1+h0OjCnorbAXBXIpWpLeLxfB
0rXo4eqh0.JnGxDLsj4rSVu37ttUc734c3ILsqmHAIXMHGjOHGrJL.2GdVmv
2nCEFMbfPLYHZx.QvgBGBcShhxS551NThbxbcNQ+CCVHgKs.KD3zhk9Lqaso
mTi3yBIXkKZKYHC4nR9uw2naQSBsv3HxAaXWUWVQqk2C1lj2P+fiEPK0tFQQ
CEKfW4NSiVod26nqpcNplsZPPMhLFH84bfhcogpfVusmrHWU7QWbSLVG2DLH
aV4NWUcxzGu2JAq4xpkC5shbRLSaU5UTdFXZRoNSrzU0VjwlYvMgibSzxXGX
ZaYdSwGZnTGyPcm7AOTrjapmqltgtqBr.7EQyZgjIajTv28a+6xCrBG0q9D7
rglM3g3AMsgVVtm9Ya8d4u9GzPK.U6GiRQYSc5d4u+bofWjPFskcb8wlObPv
iFzcrrLpt+87pfkUUx3xNQ.t4M+vZslH1noP2po1pMAvQzjp5rSQS33tspNb
GKLNTESb4pcLBF4V.Bs4iZfS0TjERRU9jCkj53u.zHZRcXvCBFchlFiSpRvc
MmFKeTUd2ovIb.45P0QNLIhDy1aGeWbf4DplQFGbw4p+CZ.qJ+aTMQbrlrwR
C6VOMrMFHuBlu6ZZkMlZtMYEagjb614ZW8wrOBcrlr4KG4R1gr8lml8GFHBL
GA
-----------end_max5_patcher-----------
</code></pre>
Re: OSC API through Max
That's exactly what i was thinking. The only problem is determining whether the object supports observe, get, and set. I guess we would have to create some filters. If we are going to support any input. I guess we could just perform some error handling.mzed wrote:Maybe this helps to explain where I'm heading:
Mike
Websites:
Max For Live Community site:
http://www.max4live.info
http://www.noisemakers.info
Controllers: Lemur, Ohm 64, Monome, APC40, Launchpad
Daw: Live 8 Suite
Audio Interfaces: Apogee Ensemble & Duet
Monitors: JBL LSR 4300
Max For Live Community site:
http://www.max4live.info
http://www.noisemakers.info
Controllers: Lemur, Ohm 64, Monome, APC40, Launchpad
Daw: Live 8 Suite
Audio Interfaces: Apogee Ensemble & Duet
Monitors: JBL LSR 4300