libossia icon indicating copy to clipboard operation
libossia copied to clipboard

[ossia-max/pd] allow remote to use compatible units

Open bltzr opened this issue 8 years ago • 6 comments

  1. 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
  1. 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 ?

bltzr avatar Aug 04 '17 11:08 bltzr

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)

avilleret avatar Aug 04 '17 13:08 avilleret

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().

jcelerier avatar Aug 04 '17 14:08 jcelerier

the release/1.0 milestone only concern the first point, second one will come later

avilleret avatar Aug 24 '17 20:08 avilleret

this is not working on Max as reported by @jln-

avilleret avatar Dec 06 '17 16:12 avilleret

but this should have been fixed (the first part, conversion for remote with unit)

avilleret avatar Dec 11 '17 15:12 avilleret

yes the first part is working, the second will come later

bltzr avatar Dec 11 '17 15:12 bltzr