[NSM] drumkv1 sents lots of dirty messages :)
No, this is not a feature request. ;)
It looks like drumkv1 sents 'dirty' to nsmd whenever there is a change. I think it should just sent it once and sent is_clean as a toggle state.
http://non.tuxfamily.org/nsm/API.html#n:1.2.4.3.
yeah, it should, in an ideal and fully optimal world but nothing (in the API spec at least) makes it sine qua non or does it?
Once dirty, it's is_dirty, until it's is_clean. The API does not mention it, but I've yet to find a other application that sends 'dirty' after every change. When in doubt, look at how non-daw tools are doing it, I would suggest.
a mitigation to this issue will come shortly, don't despair, thanks
done in b1e94b8
Will test, but it needs qt6 apparently.
Will test, but it needs qt6 apparently.
not if you cmake -DCONFIG_QT6=OFF ...
fix confirmed. thx.
drumkv1 and your other synths sends a dirty message when they're closed / killed in NSM.
If you've a (unreasonable) amount of drumkv1 clients in NSM, it takes a long time to kill them. I was wondering why, is it something in drumkv1, QT, JACK, or is it just the Operating System and expected?
I tried to make sense out of your code as a non-C++ coder to try to understand what is happening after a sigterm signal. It doesn't seems to do a lot (as far as I can tell)... which should be good.
Why is the dirty state touched at sigterm (does it also send a osc msg)? Note that drumkv1 is listed as 'dirty' when it is stopped in NSM. So, there is something wrong.
"as far as NSM goes, we're always filthy!" Why is that?
// SIGTERM signal handler.
void drumkv1_jack_application::handle_sigterm (void)
{
char c;
if (::read(g_fdSigterm[1], &c, sizeof(c)) > 0) {
if (m_pApp && m_pWidget) {
#ifdef CONFIG_NSM
if (m_pNsmClient && m_pNsmClient->is_active())
m_pWidget->updateDirtyPreset(false);
#endif
if (m_pWidget->queryClose())
m_pApp->quit();
}
}
}
#endif // HAVE_SIGNAL_H
// Dirty flag method.
void drumkv1widget_jack::updateDirtyPreset ( bool bDirtyPreset )
{
drumkv1widget::updateDirtyPreset(bDirtyPreset);
#ifdef CONFIG_NSM
if (m_pNsmClient && m_pNsmClient->is_active())
m_pNsmClient->dirty(true); // as far as NSM goes, we're always filthy!
#endif
}
what if you change it to:
// Dirty flag method.
void drumkv1widget_jack::updateDirtyPreset ( bool bDirtyPreset )
{
drumkv1widget::updateDirtyPreset(bDirtyPreset);
#ifdef CONFIG_NSM
if (m_pNsmClient && m_pNsmClient->is_active() && bDirtyPreset)
m_pNsmClient->dirty(true);
#endif
}
Fixes the 'dirty' issue. Thx.
If you've a (unreasonable) amount of drumkv1 clients in NSM, it takes a long time to kill them. I was wondering why, is it something in drumkv1, QT, JACK, or is it just the Operating System and expected?
Given the fact that I at least can manipulate it with a hack in nsmd, gives me the impression that it might be not the fault of of drumkv1, but more something with nsmd / liblo.
(See issue report: sigkill #82, on the new-session-manager project on github. )