[ossia-max/pd] allow remote to use compatible units
- it would be great if an [ø.remote] could use a different unit (from the same dataspace) than it's attached parameter e.g. [ø.param foo @unit time.hz] and [ø.remote foo @unit s] of course, then, we don't need to specify the dataspace to ø.remote
- [x] pd
- [x] max
- what would be even better, would be that we can access one member of a multi-dimensionnal unit from a remote, e.g. [ø.param bar @unit position.xyz] and [ø.remote bar @unit xyz.x]
- [ ] pd
- [ ] max
what do you think ?
it sounds very nice and at least the first part was in my dream one day I can see how to implement it in Pd/Max but I don't know how to handle that with libossia directly (which could be better but harder)
for the first one, when doing "push" on the address, it should be enough to do :
address.push_value(ossia::convert(value, unit_remote, unit_target));
for the second one it needs the whole algorithm in here which should be refactored in a separate function : https://github.com/OSSIA/libossia/blob/master/OSSIA/ossia/editor/state/message.cpp#L12
this allows sending /foo/bar@[color.hsv.h] 0.5 if /foo/bar is rgb for instance.
currently it could be done like this though, which is not really that complicated : ossia::message{target_address, value, remote_unit}.launch().
the release/1.0 milestone only concern the first point, second one will come later
this is not working on Max as reported by @jln-
but this should have been fixed (the first part, conversion for remote with unit)
yes the first part is working, the second will come later