Ok so it works i can move the fader and set the volume to the second track (index 1)
Now of course i'd like to get the fader updated when moving from Ableton. For this AbletonOSC use another OSC address. (https://github.com/ideoforms/AbletonOSC)
The text widget works because its address is the one ableton sends its feedback to (with "/get" instead of "/set"). You could make it work by setting the fader's address to /live/track/get/volume and use its onValue script to send to /live/track/set/volume.
I forgot the option in the OSC{} listener to ignore the preArgs (post edited). From your first posts I guess you still need to send /live/track/get/volume at a regular interval if ableton doesn't send feedback automatically.
from liblo import Server
from time import sleep
# create server listening on port 5000
server = Server(5000)
def route_osc(address, args, types, src):
# forward messages to ports 10000 and 20000
server.send(10000, address, *args)
server.send(20000, address, *args)
# bind route function to all incoming messages
server.add_method(None, None, route_osc)
print('Forwarding messages... hit ctrl+c to stop')
while True:
# check for new messages every 1ms
server.recv(0)
sleep(0.001)
j'ai juste ajouter import { blue } from "colorette"; au fichier js.
j'obtiens ça comme message d'erreur
(INFO) Reloading custom module...
(ERROR) Custom module loading error
N:\sonicpi\_2023-2024-college\documents\o-s-c\abletonOSC-custom-module.js:39
import { blue } from "colorette";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at new Script (node:vm:100:7)