Visualize a timer countdown in a text widget

Hi everyone ,
i'm trying to figure it out but with no luck.

I want to do my custom dashboard to use during rehearsals,
i'm using OnTime Timer to keep crew and actors in time.
I can control ontime and send OSC commands from Open Stage Control,
but i can't view any feedback (timer count) in a text widget.

What i configured:
osc
address: /ontime/time (from ontime's API)
targets: 127.0.0.1:9000

what i get:
(DEBUG, OSC) In: { address: '/ontime/update/553368', args: [] } From: 127.0.0.1:51331

so it works, but i cant get any signs of life in the text widget (no text at all).

Any help or link to understand ?
(I've solved for now using the frame widget, but i have to understand what/why/how and use it the way i wish...)

Thanks
eMMe

hI @eMMeCodes

Thanks for sharing this software but it's not the why you are here :slight_smile: (but if you got some web links to help to start with ontime, feel free to share )

Could you post your session file with the frame widget ?

@greenman If I understand correctly, ontime provides a web server which can be accessed through the local network like any webpage, nothing complicated here besides running ontime and setting the frame's value to one of the urls specified in ontime's documention (which you seem to have found already :)).

@eMMeCodes I could not find a reference to a feedback message looking like /ontime/update in the docs, so it's hard to provide an accurate answer to your question, but given the look of that message and assuming it is the relevant feedback message for your use case I can only guess 553368 is the timestamp you want to receive, which is weird because the typical osc way to transmit that kind of info would be as an argument of a message, not as a part of its address (widget use the address / preArgs to determine whether or not the message is for them, and consume the remaining arguments to set their value). If you must extract a timestamp from the address the only way to go is to use a custom module, something like:

module.exports = {
    oscInFilter: (data)=>{

        if (data.address.startsWith('/ontime/update/')) {

            // extract data after 3rd slash
            var timestamp = data.address.split('/')[3]

            // maybe convert it to a number
            timestamp = parseInt(timestamp)

            // transmitt it to a widget
            receive('/widget/address', timestamp)
            
            // empty return = bypass original message 
            return
        }
        
        return data
    }
}
1 Like

@jean-emmanuel indeed it's easy (i believed @eMMeCodes have found a solution using an osc path :))

so yes with a frame it's very easy :

etc :slight_smile:

Guys, I'm doing a show ....
Tomorrow I"ll reply ...
I didn't expected a fast answer....

Hello and thank you for the quick responses.
I apologize for the vague post without links, but I didn't want to come across as a "spammer."

@Greenman, @jean-emmanuel has already replied to you, and you've also figured it out, but if you still need the file, I'll post it.
Ontime is an excellent open-source tool, whether used just as a timer or as a whole event manager.
The ability to display different HTML pages with customizable informations on different addresses makes it a very valuable tool.
Unfortunately, to fully utilize it, the event organization also needs to be at a certain level of "seriousness" (and if you've ever worked in a conference, you know it's far from be that level =( ).

@jean-emmanuel, looking at the Ontime's documentation, the feedback it sends can be received using OSC and web-socket, in my case /ontime/timer, pointing to port 9000.
As a noob, I don't understand why the log shows the feedback is received on port 51331 with path /ontime/update/xxxxxxx .
Basically, I can only use Open Stage Control to send commands. Without reading the status of a button, value, or response, it's only usable for private/amateur projects, and that's a shame.
I've studied the Reaper's Template, which is wonderful and has shown me all the potential of your software, but Reaper allows for a very detailed level of feedbacks via OSC, that (probably ?) lacks in Ontime.
But OSC protocol is a standard, so a feedback must be received without problems if (as is stated in ontime documentation) i point to the right path... am i wrong ?

Digression:
@jean-emmanuel, I've been involved in live and studio events as a performer, technician, supervisor/organizer for over 20 years, and having a customized interface that allows me to have the flexibility to manage what I need how I want has always been a concern.
I am able to interconnect different hardware/software using MIDI, DMX, TCP ...
over the years, there have been several software solutions that have helped manage events, but all with custom interfaces that couldn't be easily integrated with each other, until the advent of Companion (the de facto standard).
The problem with Companion is that it's StreamDeck-centric, so its interface is button-oriented, and even though they've introduced the ability to use rotation, it lacks features like sliders, pads, and overall customization...
But as inputs and outputs server, with feedbacks and expressions, is very powerful.

The potential of your software is very high, but unfortunately, the target users are also "high":
if you don't know how to program or aren't very familiar with code/protocols, you'll quickly hit a wall trying do basic things.
For example, the code that you've posted, i know (because i've read the documentation) that must be saved in a file.js and loaded as custom module.
But i don't know how to really use it (i'll spend time to understand, i saw something about referring widgets in documentation), because i'm not a developer or coder, i can argue and try and error it, but at the end, i'll probably get frustrated and leave it as is, keeping the frame solution.
(and it's my fault, not your ^,^ )

I've read the documentation and tutos, but it seems to take for granted some previous background.
It would be helpful to have at least a collection of links to start from to understand the basics, or somewhat more practical documentation, like that of Chataigne, with pratical pieces of working code to start with (this is absolutely not a criticism, but a suggestion to be more noob-friendly, as i am).
Here I found working templates for Pure Data, Reaper, Cubase, etc., but little or nothing for what I think is the real field of use of Open Stage Control: professional audio-video.
I came to your software because I use many software/hardware that communicate via OSC/Websocket/DMX/MIDI, have Companion modules, but not being able to customize its interface, I was looking for a way to "design it", communicating directly with them via OSC.

Companion's Generic OSC module only receives, it doesn't give feedbacks (despite being strongly requested by the community), while modules created for specific hardware and software (including Ontime, which displays the timer easily in different formats) do so without problems.

Maybe you could consider creating an Open Stage Control module for Companion, so that you can use feedback directly from the modules already made for other software/hardware and expand the possibilities of your software.

For now thanks for your time and your work.

eMMe

Thank you, you made it works !
i'm confused about how to translate it in human readable data... ^,^

You need afaik to use javascript

Wekcome to the date format hell

1 Like


And now works as expected ...

Thanks a lot @Greenman and @jean-emmanuel

Great ! The little plus would be to show your js code or share your json session file.

open Stage Control can be a "compagnon" to companion :slight_smile:

offTopic
Just to add that i created an bitfocus account to download companion but can't get access to the download section. For an open source software, it is a pity and so i can't try this software to test it and see if it can answer my needs.
/offTopic

1 Like

Hi @Greenman,
i found that ontime gives the human readable data ^,^
So, i used the code @jean-emmanuel posted,

changing /ontime/update/ in /humanreadable/
and
// extract data after 3rd slash to 2rd
var timestamp = data.address.split('/')[2]

module.exports = {
    oscInFilter: (data)=>{

        if (data.address.startsWith('/humanreadable/')) {

            // extract data after 2rd slash
            var timestamp = data.address.split('/')[2]

            // maybe convert it to a number
            // timestamp = parseInt(timestamp)

            // transmitt it to a widget
            receive('/widget/timer', timestamp)
            
            // empty return = bypass original message 
            return
        }
        
        return data
    }
}

@Greenman
I use it everyday to interconnect al least 8 different machines,
from Yamaha CL5 to Watchout, various pc running softwares.

As i said, it's the standard de facto: if you do live events, you use it.
The only problem it's the lack of feedback via OSC.

Ontime (and Blackmagic) have a moudule that gives feedbacks
(Play changes button's color, when you running out of time, button blinks etc ...)

And it's my main problem using Open Stage Control to design my dashboard:
I can control (trigger) everything outside (Companion too),
but i can't get feedbacks (read the state and do actions in OpenStageControl).

ex. If i press play to start timer in Ontime, it will starts the timer in Ontime and i can make the button's color on the dashboard change if pressed,
but if i press play in Ontime, the button in OpenStageControl will remains in the state that is.

The Reaper json file, works as expected:
if i connect OpenStageControl to reaper (IP:port) and set it right,
buttons are connected: doesn’t matter which i press (reaper's or osc's one), both will work together.
And if i press play on OpenStageControl, it will change color and i will sure that is doing play on Reaper, because it's reading what is the state on Reaper.

In the video you posted, it's clear:
He's doing the whole thing to change the color of record button, assuming that it will works on Companion's side.

I did this, but if i close Companion and press the button, it will work as expected ...
it will change color and if i press stop, it will return to the initial color ...
but it it's doing nothing, it's just doing things in OpenStageControl !!!

Hope to cleared it ... ^,^

Cheers

Do you have any idea how can i just get the .exe for Windows to trh thus companion ?

once registered
https://user.bitfocus.io/download

hope you got it ^,^

1 Like

Thanks but not sure it is a good idea to post a wt link on this forum :thinking:

@jean-emmanuel, after promptly responding to me, you disappeared...
If by any chance my words have somehow offended or bothered you, I apologize.

eMMe

Not at all, I just didn't feel I could add much to the conversation though I'm genuinely glad you managed to make it work. Also I wouldn't say no reply after 8h is a disappearance :). The thing o-s-c is a spare time project, there's only so much time I can spend on fixing bug, answering questions, writing docs, and at times adding features.

The "high" level user expectation is mostly the result of that, and I'm afraid there's little chances it changes. Sharing my work is important to me, but attracting user has never been a goal, it just happened, I'm aware it can be frustrating but that's the deal.

Chataigne is great and very well documented, it's also in another league in term of development time. I've never used Companion and I currently don't see a reason to, so I guess the companion module won't come from me.

I seem to understand your issue is mostly about other softwares not sending feedback messages and I fail to see how open stage control can fix that. It's worth noting open stage control does not send replies when it receives messages because it assumes those are already feedback messages (it's possible to setup replies with a custom module though).

A way to avoid feedback related problems is to make sure controls are always changed by the same source so that in absence of feedback it can be assumed this source holds the actual current state of all controlled software. It's not easy to setup but it can be done with Chataigne I think (I do it with mentat, an even less user-friendly and linux-only project of mine partly inspired by some aspects of Chataigne).


Back on the ontime subject: can't you make it send the timestamp as an argument instead of a part of the address ? By the docs I guess you wrote somewhere in your config something like

/humanreadable/{{human.clock}}

probably associated with the On Every Second event, why not directly:

/widget/timer {{human.clock}}

It's not cristal clear in the docs but I think it's how you'd do it (and it looks like a common representation for osc messages).

@jean-emmanuel,
you've been very clear, and I just want to clarify that my requests
weren't like "do this for me because I need it" or anything like that...
It was just a verbose way of expressing my appreciation for your work
with personal considerations on it
(which I understand may or may not be of interest =) ).

As a beginner in development and programming,
I tried to understand if there was a solution
on the Open Stage Control side.

My use case is probably specific because indeed using Open Stage Control
to control "devices that already provide feedback when playing" is more than excellent.

I'll try to figure out how to survive this...

Thank you for your time and work.

eMMe

Hello @eMMeCodes,

I have tried to use ontime with OpenStageControl today. I see in your screenshot that you have already managed to get a lot of main functio s to work. Would you mind to share here your json file to help me to get the logic and the syntax ?
Cheers