OSC feedback with Pyliblo

I’m trying to make an OSC software controller in Python (using Pyliblo).
I can send messages to Ardour but when I’ve tried to get messages from ardour and I didn’t have any answer.

In this small example:
I open an OSC server (with random port) , I send a play message.
But when I stop or any other action in ardour , the answer is none.

osctest.py

#!/usr/bin/env python

import liblo, sys

server = liblo.Server()
print (server.get_port())

def callback(path, args, types, src):
print(“got some message”)

server.add_method(None, None, callback)

server.send(“osc.udp://localhost:3819”, “/ardour/transport_play” )

while True:
server.recv(100)

What I’m doing wrong?

OSC support has been drastically modified and extended in the current codebase. So before anyone could answer you, it would be necessary to say what version of Ardour you are trying to use.

Secondly, a command like “/ardour/transport_play” will not send any response, and I a not sure why you would expect it to.

I’m using 4.7.0 version of ardour.

I’ve found this from https://community.ardour.org/node/4706
“Ardour, like most OSC systems, will send an OSC reply to the same IP address and port that the query was received from. Ardour does not currently send any OSC messages without being asked to do so.”

and this other paragraph in the manual (http://manual.ardour.org/using-control-surfaces/controlling-ardour-with-osc/feedback-in-osc/):
“Ardour does feedback by sending the same path back that is used to control the same function. As such any controls that have feedback have a parameter that is the value of the control or it’s state (on or off). In the case of OSC paths listed on the main OSC page as having no parameter, if they have feedback, they will also work with a 1 for button press and 0 for button release. This is because many OSC controllers will only use exactly the same path for feedback as for control”

It’s for that reason I 've send the same command that I want get some info.
i.e. /ardour/transport_play to get its transport state.

But maybe i’m in the wrong way to query Ardour transport state.
Thank you for your quick response

I would suggest that you plan to use Ardour 5.0 which will released soon (nightlies are already close to what will be 5.0). The manual (http://manual.ardour.org/ describes how the new stuff works.

Thanks Paul for your suggesting (and your work)
Finally with version 5.0 I can reach almost all messages I was looking for.
Just one more question.
How can I know the Start and End marks positions ?

@monon You can know marker positions by going there if you have /position/* turned on (via feedback) and you are monitoring that OSC message. The /set_surface/feedback value can be set to monitor position in the same ways as the transport clock: Time, smpte, bar-beat or audio frame. The value will be returned as a text string not a number (int) with a separator character between fields. This info is in the manual and the new OSC GUI is helpful for figuring out a number for feedback value or setting the default feedback value if desired.