ossia / libossia

A modern C++, cross-environment distributed object model for creative coding and interaction scoring
https://ossia.io
GNU Lesser General Public License v3.0
206 stars 33 forks source link

[ossia-python] address value operator #72

Closed theod closed 7 years ago

theod commented 7 years ago

to be able to write :

v = float_address.value + int_address.value

reno- commented 7 years ago

It seems to work now.

from pyossia import ossia_python as ossia
local_device = ossia.LocalDevice("newDevice")
local_device.create_oscquery_server(3456, 5678, False)
my_int = local_device.add_node('test/numeric/int')
my_int.create_parameter(ossia.ValueType.Int)
my_int = my_int.parameter
other_int = local_device.add_node('test/int')
other_int.create_parameter(ossia.ValueType.Int)
other_int = other_int.parameter
my_int.value = 1
other_int.value = 2
print(my_int.value)
print(other_int.value)
print('addition = ' + str(my_int.value + other_int.value))