Accesso rapido:  

Forum: VirtualDJ Technical Support

Topic: Script question: Possible to get the status of Stems 2.0 realtime analysis completed ?
Hi guys,

Is it possible to get a variable that would return TRUE when a loaded track has been completely analyzed for Stems 2.0 ?

I played around with 'has_stems "2.0"'' and 'has_stems "ready"', but the returned value is only valid for the current song position. I'd like to use such value to know when VirtualDJ has completely finished analyzing realtime Stems 2.0 on a track (IE released the GPU).
 

Inviato Thu 16 Feb 23 @ 8:39 pm
There's no real reason to wait for full stems analysis on any realistic usage case I can think of.
The way stems analysis works in real time has been described before:
It starts decoding a small part right after the load point, then it decodes small parts near hotcues, and then it finishes the rest/remaining areas.*
This means that once the "has_stems 'ready'" reports true, you can use the track and you will be able to get stems 2.0 no matter what you do.

The only case that you may not get stems 2.0 for a brief second or so, is if you jump to a new location with your mouse (that doesn't have any hotcue stored)
In that case analysis will continue from where you jumped, but you may get half second or so without stems (depending on the analysis speed of your system)

So, unless there's a case I can't think of, I don't find how "full track has been analysed" info would be helpfull in a real usage case scenario.

*-> In other words: Analysis is not sequential, but it's done by giving priority to all points that you may use first. Then it completes with the rest parts.
 

Inviato Fri 17 Feb 23 @ 10:32 am
Hi PhantomDeejay,

Thanks for the reply. I was aware of the details you described, but respectfully, it didn't answer my question.

I understand we don't really "need" to know when the analysis has been completed from a DJ workflow standpoint (as VDJ is good enough managing that by itself). That is great by the way. On the other end, I am also running other heavy math processes on the same NVIDIA GPU VDJ uses for STEMS, so having a feedback telling me if VDJ is currently hard on the GPU would be nice for my particular application, so I could slow down my other non-critical processes, to give VDJ priority during that time.

As of now, the only way I found as a workaround is to do an SNMP query of the NVIDIA 3D engine with a set threshold of 83%, from where I assume it's VDJ computing its STEMS. It is a hit or miss because my other processes often push the GPU above that threshold.

If a 'has_stems "complete"' or something like that existed, I could easily know if it's VDJ that is currently heavy on the GPU. That's the reason of my question, nothing related to Virtual DJ's already great usability by itself.
 

Inviato Sun 19 Feb 23 @ 9:28 pm
AdionPRO InfinityCTOMember since 2006
You might be able to use param_contains and get_status and check for loading or computing
 

Inviato Mon 20 Feb 23 @ 5:48 am