From the original SynthMaker forum (2004–2014), with its members’ names and dates.
Tzarls ·
Hi. This is my second post. I hope you find this idea usable.
This came to my mind when daydreaming with a VST that would keep track of the time a recording session starts and ends. The idea is the following: you load the VST, it automatically checks date an time, saves it to a text file. Then, when you exit the session (and here´s where we need the on-exit trigger) it checks date and time again, calculates how much time passed since the session started, and saves all that data to the same file. Next time you load the session, the VST loads the text file, stores the data and updates it sccordingly.
What do you think?
It also could include a notepad, to keep your session notes always at hand and integrated with your session.
infuzion ·
That's a cool idea!
What happens if the host locks up, or if the system crashes?
philter5 ·
yes cool idea. i had the same daydream with a synthmaker module that can tell me how many hours
(or how many days) i´am working on something 😉
infuzion wrote: That's a cool idea!
What happens if the host locks up, or if the system crashes?
perhaps something like:
time - action
-------------------------------
.... .....
15:30:14 - added a note c3
15:30:32 - main volume from 100 to 90 %
15:31:00 - host crashed!
😀 😀 😀
Acrobat ·
System should send a sub-code with a read mark after a write mark so that when it loads back after a crash, it can check the mark and verify if usual time gaps between operations were interrupted. It's just at that time it can report a crash occurred, not surely before the crash itself.
infuzion ·
philter5 wrote:
infuzion wrote: What happens if the host locks up, or if the system crashes?
...
perhaps something like:
time - action
-------------------------------
.... .....
15:30:14 - added a note c3
15:30:32 - main volume from 100 to 90 %
15:31:00 - host crashed!
If the VST is inside the host, I don't think you can get a crash notice unless you do some very fancy DLL programming, which is way out of scope of SM I think.
However, you can save to a .TXT file every minute, & only miss the last few seconds. But this will cause some CPU spikes, & drive-lag if you don't save the .TXT file to a different drive.
philter5 ·
@infuzion:
lol
it was just a joke 😉
Tzarls ·
Glad you liked this idea. The file could be saved whenever the sequencer or host is not in playback or recording. I think that can be checked from within SM, right?
infuzion ·
Tzarls wrote: The file could be saved whenever the sequencer or host is not in playback or recording. I think that can be checked from within SM, right?
Yes, or atleast "Is Playing"; look inside the "VST" toolbox folder.
I vote for saving the file even while the host is in playback, since me & I'm sure many others have the loop/song running for 10,20, even 60 minutes straight while tweaking effects, editing MIDI, etc.
If the 'on exit' notification isn't part of the VST2.3 spec, then I don't think host will tell VSTs that it is about to close, thus the main idea of your request is impossible.
Tzarls ·
I´m bumping this because of this thread:
Unloading VSTi won`t release all memory.
Apparently the arrays wont release the memory they are using before closing. So a primitive to alert the vst when it is being closed will help to overcome this problems. Something like "On exit primitie" sends a trigger to the clear input on every array, so before closing the VST, all arrays are cleared and memory is released.
Devs, is this possible?
philter5 ·
i can´t answer your question BUT i give this a big bump, this could be usefull for
other things , too!
Tzarls ·
C´mon devs - at least tell us if such a function exists in the VST SDK, please? 😇
theun ·
Hi Tzarls,
A good spot again, I'm afraid! I noticed the additional information in your other, related topic Unloading VSTi won`t release all memory. about releasing memory. This kept me thinking a while, and yes, it seems clear that freeing up memory at close is not possible for SM plugins. However it feels kinda strange that I never thought about this before.
About the VST SDK, anybody can dl the SDK from Steinberg's site, however you have to state that you will obey some of their rules. One of those rules is that you're not allowed to publish the SDK etc.
In the SDK you'll find amongst others rather precisely defined how the host and the vst communicate with each other. Without going into detail: the SDK defines "messages" in the direction host --> plugin and vice versa (plugin -->host). And one of these "messages" is a void functioncall (from the host) close() before closing the plugin.
The SDK is not explicit about what should happen now, but it is clear that the host after this function call will delete the object/instance - so this is the ultimate moment to release memory resources. If that won't happen now the allocated memory will live on as orphans that can never be found again. The host application does not have any knowledge about the memory allocated by an individual plugin.
So it seems indeed SM is currently missing an "on exit" primitive that should be triggered by the close() function call coming from the host. More or less equivalent to the "afterload" primitive.
The best workaround (for the time being) I can think of is more or less good programming practice: avoid where possible large files to be stored in memory. Even bitmaps can be compressed to quite small files. While at the same time speeding up loading times.
Cheers!
Tzarls ·
Thanks for the info, theun. Now it´s a matter of waiting for the developers to address this issue. Which I find critical when you are trying to develop a sample based VSTi - I´ve got about 130MB worth of samples (and those can´t be compressed 😉 ) that stay in memory after closing the plugin.
exonerate ·
I could really do with an on exit trigger also but for a completely different reason.
Basically when working in SM (or any other app for that matter) if you have made changes and you try to close the application you will get a pop up screen asking the user if they want to save the changes made before closing. I need an on exit trigger so I can recreate this behaviour.
I'm making a standalone application by the way. This is standard behaviour in any standalone app but is not possible with SM!!
Cheers 😉
Exo
sunsynth ·
Exactly exo...
i asked many times and even before this thread 4 this feature!
In additon i had a wish 4 a 'something changed' bool in the preset manager...
Walter
AngularMomentum ·
+1...great for cleaning up temp files.
Tzarls ·
C´mon.....1.1.3.1 is out.....time for new primitives! 😉
jobro ·
I second that too. But what also is needed is an Exit primitive. Think of it like this: When you start Notepad you allways have the Exit command in the File menu. With this primitive it would be easily to implement such behavior in SM.
sunsynth ·
Yeah,
i really hope malc and/or stefan read this 2!
'everyone and his dog' knows how little prims can make us happier 😉 🙂
Like the 'is maximized' = Full Screen and zoomfactor additions i always prayed for...
Wrote something here? To have a post removed or your name hidden, write to [email protected].