Detecting rendering?
-
AdmiralQuality AdmiralQuality https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=83902
- Banned
- 6657 posts since 10 Oct, 2005 from Toronto, Canada
I'm 99% sure the answer is no, but does anybody know of a way to detect if a VSTi is playing in real-time vs. rendering?
I suppose I could compare the sample count to real system time. But Cubase has a real time export feature which would fool that. Also I'd only be able to detect that after some period of time had passed, and the render would have already started.
Why I'm wanting to do this is; I'd like my plug-in instrument to force highest quality during rendering. I guess maybe that's a bad idea as it takes control away from the user. Hell, maybe someone will even WANT the artifacts from lower quality? (In fact, I know some people will.) So I guess I'll just not bother. What I was hoping to avoid though was people who had set it to low qualility just to get through a real time performance/recording... then forget to set the quality back to maximum before rendering. Even if it could pop a dialog to remind them and give them the option of setting it, that would be great. Of course you don't want to deal with this every time you load the plug.
Oh well.
I suppose I could compare the sample count to real system time. But Cubase has a real time export feature which would fool that. Also I'd only be able to detect that after some period of time had passed, and the render would have already started.
Why I'm wanting to do this is; I'd like my plug-in instrument to force highest quality during rendering. I guess maybe that's a bad idea as it takes control away from the user. Hell, maybe someone will even WANT the artifacts from lower quality? (In fact, I know some people will.) So I guess I'll just not bother. What I was hoping to avoid though was people who had set it to low qualility just to get through a real time performance/recording... then forget to set the quality back to maximum before rendering. Even if it could pop a dialog to remind them and give them the option of setting it, that would be great. Of course you don't want to deal with this every time you load the plug.
Oh well.
-
- KVRian
- 995 posts since 25 Apr, 2005
How about getCurrentProcessLevel(). If it returns 4 then maybe set your quality to high? The question is though, how many hosts actually support this? Anyway, hope this helps 
From the VSTSDK documentation:
Returns the hosts's process level. A plug is like a black box processing some audio coming in on some inputs (if any) and going out of some outputs (if any). This may be used to do offline or real-time processing, and sometimes it may be desirable to know the current context.
return
0 : Not supported.
1 : Currently in user thread (gui).
2 : Currently in audio thread or irq (where process is called).
3 : Currently in 'sequencer' thread or irq (midi, timer etc).
4 : Currently offline processing and thus in user thread.
other : Not defined, but probably pre-empting user thread.
From the VSTSDK documentation:
Returns the hosts's process level. A plug is like a black box processing some audio coming in on some inputs (if any) and going out of some outputs (if any). This may be used to do offline or real-time processing, and sometimes it may be desirable to know the current context.
return
0 : Not supported.
1 : Currently in user thread (gui).
2 : Currently in audio thread or irq (where process is called).
3 : Currently in 'sequencer' thread or irq (midi, timer etc).
4 : Currently offline processing and thus in user thread.
other : Not defined, but probably pre-empting user thread.
-
AdmiralQuality AdmiralQuality https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=83902
- Banned
- Topic Starter
- 6657 posts since 10 Oct, 2005 from Toronto, Canada
- KVRAF
- 10286 posts since 17 Sep, 2004 from Austin, TX
FL has a "detect rendering" option in it's wrapper for VSTs.
As I recall from something in Looptalk when I was a newbie that FL's weird options for plug-ins are due to the fact that their dev team insists on meeting all the standards in the VSTSDK something or other but many VSTs themselves aren't made to rigorously meet those standards.
Hope that's useful info.
As I recall from something in Looptalk when I was a newbie that FL's weird options for plug-ins are due to the fact that their dev team insists on meeting all the standards in the VSTSDK something or other but many VSTs themselves aren't made to rigorously meet those standards.
Hope that's useful info.
-
- KVRian
- 1343 posts since 26 Aug, 2005 from Netherlands
Good one. Tunafish currently doesn't support this, but that was because plugins never seemed to use it. However, this smells like a chicken 'n egg situation so I'll add it in the next TF release.Caco wrote:How about getCurrentProcessLevel(). If it returns 4 then maybe set your quality to high? The question is though, how many hosts actually support this? Anyway, hope this helps
Cheers!
-
- KVRian
- 539 posts since 27 Feb, 2001 from Vancouver / Canada
Xphraze & HALion also support "getCurrentProcessLevel" and have an option to switch to highest quality automatically.
-
- KVRian
- 1343 posts since 26 Aug, 2005 from Netherlands
So how about Nexus? [Nudge nuge wink wink]Michael Kleps from reFX wrote:Xphraze & HALion also support "getCurrentProcessLevel" and have an option to switch to highest quality automatically.
-
- KVRian
- 539 posts since 27 Feb, 2001 from Vancouver / Canada
-
AdmiralQuality AdmiralQuality https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=83902
- Banned
- Topic Starter
- 6657 posts since 10 Oct, 2005 from Toronto, Canada
Ok this is starting to sound like not such a whack idea after all. Thanks again everybody!
-
- KVRAF
- 8389 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
I knew that there was an offline mode, but couldn't for the life of me remember how to check for it. In full offline mode, the plug can play the host and should have access to samples from anypoint in the sequence, but I doubt many hosts support that level of sophistication.
It's all in the initial Steinberg docs
DSP
It's all in the initial Steinberg docs
DSP
- KVRAF
- 16800 posts since 8 Mar, 2005 from Utrecht, Holland
A better option: put the "high quality" option ON THE GUI!! I don't want a plugin to sound different just because we're rendering, I want that superiour sound NOW!
That's how e.g. SFZ has done it: a quality control ranging from Draft to Superb, at your own control.
That's how e.g. SFZ has done it: a quality control ranging from Draft to Superb, at your own control.
We are the KVR collective. Resistance is futile. You will be assimilated. 
My MusicCalc is served over https!!
My MusicCalc is served over https!!
-
AdmiralQuality AdmiralQuality https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=83902
- Banned
- Topic Starter
- 6657 posts since 10 Oct, 2005 from Toronto, Canada
Yes yes, but I didn't want people forgetting it's on "draft" is all.BertKoor wrote:A better option: put the "high quality" option ON THE GUI!! I don't want a plugin to sound different just because we're rendering, I want that superiour sound NOW!
That's how e.g. SFZ has done it: a quality control ranging from Draft to Superb, at your own control.
Still not even sure I'm going to attempt this. Think I'll leave it up to the user. At first anyway... might add it later if I can make it work and it's not screwy across different hosts.


