Re: [yoshimi-user] suggested patch

  • From: Brendan Jones <brendan.jones.it@xxxxxxxxx>
  • To: yoshimi-user@xxxxxxxxxxxxxxxxxxxxx
  • Date: Sat, 04 Feb 2012 00:17:57 +0100

On 01/29/2012 09:06 PM, Jeremy Jongepier wrote:

On 01/29/2012 01:22 PM, Brendan Jones wrote:
Hi all,

this is my first post to this list so, hello!


Hello Brendan,

I've been using the --name-tag= in a lot of my startup scripts and would
love to see this reflected in the MasterUI title bar. I can work on a
patch but just wanted to check that the work is not already underway.

No, nobody is working on it, at least not to my knowledge. And any
patches are more than welcome!

I noticed there was a branch devoted to multiple jack outputs but it is
quite old. If the multiple outputs is going to be realised (yes please)
it would affect any patch that I do.


Multiple outputs is not going to be realised I fear. Which branch are
you referring to by the way?

What's the status of the merge back to zyn? Should I send my patches
there instead?


No, please send them here, the name-tag is a specific Yoshimi feature
iirc. No news yet on the convergence with Zyn. It won't be a merge back
but more a converging effort that will hopefully lead to something new.


OK, here's a suggested patch for the window title. For example:

# window title = "Synth 1", using name tag parameter
yoshimi -N "Synth 1" &

# window title = "Yoshimi: params-x"
# this is the existing behaviour using the load parameters flag
yoshimi -l /mnt/yoshimi/params-x.xmz &

# window title = "Synth 1: params-x", using both
yoshimi -N "Synth 1" -l /mnt/yoshimi/params-x.xmz &

Let me know if this is OK.

kind regards,

Brendan
diff -Nur '-x*~' '-x.*' '-x*dev4' yoshimi-0.060.12.orig/src/UI/MasterUI.fl
yoshimi-0.060.12/src/UI/MasterUI.fl
--- yoshimi-0.060.12.orig/src/UI/MasterUI.fl 2011-04-12 01:21:54.000000000
+0200
+++ yoshimi-0.060.12/src/UI/MasterUI.fl 2012-02-04 00:00:43.376032954 +0100
@@ -162,7 +162,7 @@
yoshiLog = new ConsoleUI();
yoshiLog->setLabel();
make_window();
- setMasterLabel(Runtime.paramsLoad);
+ setMasterLabel(Runtime.nameTag,Runtime.paramsLoad);
masterwindow->show();
if (Runtime.showConsole)
yoshiLog->Show();
@@ -823,11 +823,13 @@
}
} {}
}
- Function {setMasterLabel(string name)} {} {
+ Function {setMasterLabel(string name, string params)} {} {
code {//
masterwindowlabel = "Yoshimi";
if (name.size())
- masterwindowlabel += (" : " + name);
+ masterwindowlabel = name;
+ if (params.size())
+ masterwindowlabel += (" : " + params);
masterwindow->label(masterwindowlabel.c_str());
masterwindow->changed();} {}
}
@@ -868,7 +870,7 @@
if (result >= 0)
{
if (updatehistory)
- setMasterLabel(Runtime.addParamHistory(string(fname)));
+
setMasterLabel(Runtime.nameTag,Runtime.addParamHistory(string(fname)));
RecentParams->activate();
}
else
@@ -909,7 +911,7 @@
fl_alert("Could not save the file.");
else
{
- setMasterLabel(Runtime.addParamHistory(fname));
+ setMasterLabel(Runtime.nameTag,Runtime.addParamHistory(fname));
RecentParams->activate();
}
updatepanel();} {}
diff -Nur '-x*~' '-x.*' '-x*dev4' yoshimi-0.060.12.orig/src/UI/ParametersUI.fl
yoshimi-0.060.12/src/UI/ParametersUI.fl
--- yoshimi-0.060.12.orig/src/UI/ParametersUI.fl 2011-04-12
01:20:30.000000000 +0200
+++ yoshimi-0.060.12/src/UI/ParametersUI.fl 2012-02-03 23:57:08.172660105
+0100
@@ -51,7 +51,7 @@
{
fle = Runtime.ParamsHistory.at(o->value() - 1).file;
guiMaster->do_load_master(false, fle.c_str());
-
guiMaster->setMasterLabel(Runtime.ParamsHistory.at(o->value() - 1).name);
+
guiMaster->setMasterLabel(Runtime.nameTag,Runtime.ParamsHistory.at(o->value() -
1).name);
}
break;

Other related posts: