Skip to content

Commit

Permalink
Some minor GUI cleanups.
Browse files Browse the repository at this point in the history
Clarifed some comments in FileMgrFuncs.h
Doc updates.
  • Loading branch information
abrolag committed Jun 27, 2024
1 parent 5206385 commit 449b1a6
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 39 deletions.
6 changes: 6 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
yoshimi 2.3.2 M

2024-6-27 Will
bn 2338
Some minor GUI cleanups.
Clarifed some comments in FileMgrFuncs.h
Doc updates.

2024-6-21 Will
bn 2337
Removed some redundant UI 'damage()' calls.
Expand Down
5 changes: 3 additions & 2 deletions dev_notes/ToDo.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

BUG! stand-alone GUI freezes and no further system changes if new instance started while instrument change in progress.

BUG! Vector window instrument label colours not updated when engines are manually changed.
OK when loading instruments etc.
BUG! Vector window instrument label colours not updated when engines are manually changed - it's OK when loading instruments etc.

BUG! Loading a state file with an embedded MIDI-Learn window sometimes doesn't display the text of the first learned line.

Minor bug Multi instances produce jack error reports when main instance closed, even if they have been closed first - been there since V 1.4.1 :(

Expand Down
2 changes: 1 addition & 1 deletion doc/yoshimi_user_guide/config/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ <h3>THEME</h3>
<br><br>
Further details can be found in the <a href="https://github.com/Yoshimi/yoshimi-doc/raw/master/pdf/yoshimi-advanced-reference-manual.pdf">Advanced Reference Manual</a>
<br><br>
With the 'Import' button you can also fetch themes that have been downloaded from elsewhere. These will become available next time the window is refreshed. Alternatively with the 'Export' button you can make a copy of the current theme to a more accessible location.<br>Using these two options together, along with a text editor enables you to make changes to an existing theme very quickly.<br>Keep in mind the 'classic' theme is a reference file, and is not what is actually used for that theme.
With the 'Import' button you can also fetch themes that have been downloaded from elsewhere. These will be immediately loaded and displayed in the theme list. Alternatively with the 'Export' button you can make a copy of the current theme to a more accessible location.<br>Using these two options together, along with a text editor enables you to make changes to an existing theme very quickly.<br>Keep in mind the 'classic' theme is a reference file, and is not what is actually used for that theme.
</p>
<img src="../images/boundry.png" alt="divider" class="wideline">
<a href="#top" class="up">Back to top</a>
Expand Down
2 changes: 1 addition & 1 deletion doc/yoshimi_user_guide/navigation/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h2 style="text-align: center">Navigation, Controls, Defaults</h2>
<br>
<b>Action</b> buttons are rounded and pale blue. These are the ones that make immediate changes such as enabling a synth engine.
<br><br>
There is a third type that is used for <b>Close</b> and <b>Cancel</b> operations. These are sharply rectangular and grey. They don't normally make changes. An exception being "Save and Close" in the <em>Settings</em> window.
There is a third type that is used for <b>Close</b> and <b>Cancel</b> operations. These are sharply rectangular and grey. They don't normally make changes.
</p>
<p>
In many places you will see a pair of small dark blue buttons marked '<b>C</b>' and '<b>P</b>'. These enable you to copy the entire contents of just that section and later paste it to either a <a href="../preset/preset.html">Presets</a> file or to another identical section. For example you can copy AddSynth Global in part 1 and then paste it to any other AddSynth Global engine, such as part 4 kit item number 7 AddSynth.
Expand Down
2 changes: 1 addition & 1 deletion src/Misc/ConfBuild.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
ConfBuild.h
*/

#define BUILD_NUMBER 2337
#define BUILD_NUMBER 2338
12 changes: 6 additions & 6 deletions src/Misc/FileMgrFuncs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
FileMgr.h - all file operations
Copyright 2019-2023 Will Godfrey and others.
Copyright 2019-2024 Will Godfrey and others.
This file is part of yoshimi, which is free software: you can redistribute
it and/or modify it under the terms of the GNU General Public
Expand Down Expand Up @@ -42,9 +42,9 @@
#define OUR_PATH_MAX 4096
/*
* PATH_MAX is a poorly defined constant, and not very
* portable. As this function is only used for a simple
* tightly defined purpose we set a value to replace it
* that should be safe for any reasonable architecture.
* portable. As this is only used for a simple tightly
* defined purpose we set a value to replace it that
* should be safe for any reasonable architecture.
*/


Expand Down Expand Up @@ -345,11 +345,11 @@ inline bool copyFile(const string& source, const string& destination, char optio
if(isRegularFile(destination))
{
//std::cout << "Not writing " << destination << std::endl;
return 0; // counts as a successful write
return 0; // treated as a successful write when copying banks
}
else
{
;//std::cout << "Writing " << destination << std::endl;
;//std::cout << "Is writing " << destination << std::endl;
}
}

Expand Down
17 changes: 10 additions & 7 deletions src/UI/ADnoteUI.fl
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,6 @@ Oscillator}
}
}
Fl_Group amplitudegroup {
label AMPLITUDE
xywh {5 68 285 212} box UP_FRAME labelfont 1 labelsize 12 labelcolor 64 align 17
} {
Fl_Dial voicevolume {
Expand Down Expand Up @@ -823,7 +822,11 @@ Oscillator}
class Fl_Check_Button2
}
Fl_Box {} {
xywh {140 85 4 44} box THIN_DOWN_FRAME
xywh {140 88 4 40} box THIN_DOWN_FRAME
}
Fl_Box ampVoiceLabel {
label AMPLITUDE
xywh {128 72 35 17} labelfont 1 labelsize 10 labelcolor 64
}
}
Fl_Group voicefiltergroup {
Expand Down Expand Up @@ -1576,7 +1579,7 @@ Oscillator}
Vname->labelsize(size14);

ResonanceEn->labelsize(size11);
amplitudegroup->labelsize(size12);
ampVoiceLabel->labelsize(size);
voicevolume->labelsize(size);
voicevsns->labelsize(size);
voicepan->labelsize(size);
Expand Down Expand Up @@ -1679,7 +1682,7 @@ Oscillator}
ExtModOsc->textsize(size);

modvoicelabel->labelsize(int(40 * dScale));

ADnoteVoiceParameters->redraw();} {}
}
Function {voicetheme()} {} {
Expand Down Expand Up @@ -2391,11 +2394,11 @@ class ADnoteUI {: {public PresetsUI_}
class Fl_Check_Button2
}
Fl_Box {} {
xywh {135 21 4 47} box THIN_DOWN_FRAME
xywh {135 24 4 44} box THIN_DOWN_FRAME
}
Fl_Box amplitudelabel {
label AMPLITUDE
xywh {128 10 35 8} labelfont 1 labelsize 12 labelcolor 64
xywh {128 12 35 8} labelfont 1 labelsize 12 labelcolor 64
}
}
Fl_Group filtergrp {
Expand Down Expand Up @@ -3073,7 +3076,7 @@ class ADnoteUI {: {public PresetsUI_}
freqenv->theme();
filterenv->theme();
filterui->theme();

lastvoiceW = 0;
addVoiceRtext();
advoice->voicetheme();
Expand Down
2 changes: 1 addition & 1 deletion src/UI/ConfigUI.fl
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ send_data (0, CONFIG::control::alsaMidiType, o->value(), TOPLEVEL::type::Integer
int testTime = file::isRegularFile(fileName);
if (testTime != themeTime)
{
std::cout << "test " << testTime << " theme " << themeTime << std::endl;
//std::cout << "test " << testTime << " theme " << themeTime << std::endl;
setUserTable(fileName);
synth->getGuiMaster()->theme();
}
Expand Down
28 changes: 17 additions & 11 deletions src/UI/PADnoteUI.fl
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class PADnoteUI {: {public PresetsUI_}
Fl_Window padnotewindow {
label {PAD synth Parameters}
callback {padClose->do_callback();}
xywh {1235 133 580 440} type Double hide resizable
xywh {464 151 580 440} type Double hide resizable
code0 {o->copy_label(textMsgBuffer.fetch(collect_readData(synth, textMsgBuffer.push("PadSynth"), npart, TOPLEVEL::windowTitle, kititem)).c_str());}
code1 {padDW = o->w(); padDH = o->h();}
code2 {padnotewindow->size_range(padDW, padDH, 0, 0, 0, 0, 1);}
Expand Down Expand Up @@ -609,15 +609,14 @@ class PADnoteUI {: {public PresetsUI_}
xywh {10 27 275 68} box PLASTIC_UP_BOX color 223 labelcolor 64
}
Fl_Group ampgrp {
label AMPLITUDE
xywh {5 25 285 250} box THIN_UP_FRAME labelfont 1 labelsize 11 labelcolor 64 align 17
} {
Fl_Dial volume {
label Volume
callback {//
o->selection_color(setKnob(o->value(),90));
send_data(0, PADSYNTH::control::volume, o->value(), TOPLEVEL::type::Integer);}
tooltip Volume xywh {30 42 34 34} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 127 step 1
tooltip Volume xywh {30 43 34 34} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 127 step 1
code0 {o->setValueType(VC_InstrumentVolume);}
code1 {o->value(pars->PVolume);}
code2 {o->selection_color(setKnob(o->value(),90));}
Expand All @@ -628,7 +627,7 @@ class PADnoteUI {: {public PresetsUI_}
callback {//
o->selection_color(setKnob(o->value(),64));
send_data(0, PADSYNTH::control::velocitySense, o->value(), TOPLEVEL::type::Integer);}
tooltip {Velocity Sensing Function (rightmost to disable)} xywh {85 42 34 34} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 127 step 1
tooltip {Velocity Sensing Function (rightmost to disable)} xywh {85 43 34 34} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 127 step 1
code0 {o->value(pars->PAmpVelocityScaleFunction);}
code1 {o->setValueType(VC_AmpVelocitySense);}
code2 {o->selection_color(setKnob(o->value(),64));}
Expand All @@ -639,7 +638,7 @@ class PADnoteUI {: {public PresetsUI_}
callback {//
o->selection_color(setKnob(o->value(),64));
send_data(TOPLEVEL::action::forceUpdate, PADSYNTH::control::panning, o->value(), TOPLEVEL::type::Integer);}
tooltip Panning xywh {155 42 34 34} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 127 step 1
tooltip Panning xywh {155 43 34 34} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 127 step 1
code0 {o->setValueType(VC_PanningStd);}
code1 {o->value(pars->PPanning);}
code2 {o->selection_color(setKnob(o->value(),64));}
Expand All @@ -650,7 +649,7 @@ class PADnoteUI {: {public PresetsUI_}
callback {//
o->selection_color(setKnob(o->value(),63));
send_data(0, PADSYNTH::control::randomWidth, o->value(), TOPLEVEL::type::Integer);}
tooltip {Random width} xywh {235 42 35 35} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 63 step 1 value 63
tooltip {Random width} xywh {235 43 35 35} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 63 step 1 value 63
code0 {o->setValueType(VC_PanningRandom);}
code1 {o->value(pars->PWidth);}
code2 {o->selection_color(setKnob(o->value(),63));}
Expand All @@ -665,7 +664,7 @@ class PADnoteUI {: {public PresetsUI_}
else
panwidth->activate();
send_data(0, PADSYNTH::control::enableRandomPan, tmp, TOPLEVEL::type::Integer);}
tooltip {Enable random panning} xywh {205 51 15 15} down_box DOWN_BOX color 48 selection_color 64 labelsize 11 labelcolor 64 align 1
tooltip {Enable random panning} xywh {205 53 15 15} down_box DOWN_BOX color 48 selection_color 64 labelsize 11 labelcolor 64 align 1
code0 {o->value(pars->PRandom);}
code1 {if (o->value() == 0) panwidth->deactivate(); else panwidth->activate();}
class Fl_Check_Button2
Expand Down Expand Up @@ -742,11 +741,14 @@ class PADnoteUI {: {public PresetsUI_}
class LFOUI
} {}
Fl_Box {} {
xywh {135 41 4 47} box THIN_DOWN_FRAME
xywh {135 42 4 46} box THIN_DOWN_FRAME
}
Fl_Box amplabel {
label AMPLITUDE
xywh {124 28 35 17} labelfont 1 labelsize 11 labelcolor 64
}
}
Fl_Group filtergrp {
label FILTER
xywh {290 25 285 250} box THIN_UP_BOX labelfont 1 labelsize 11 labelcolor 64 align 17
} {
Fl_Group filterenv {
Expand All @@ -767,6 +769,10 @@ class PADnoteUI {: {public PresetsUI_}
code0 {o->init(pars->GlobalFilter.get(), &pars->PFilterVelocityScale,&pars->PFilterVelocityScaleFunction, npart, kititem, PART::engine::padSynth);}
class FilterUI
} {}
Fl_Box filterlabel {
label FILTER
xywh {416 29 35 17} labelfont 1 labelsize 11
}
}
Fl_Group frequencygrp {
label FREQUENCY
Expand Down Expand Up @@ -1177,10 +1183,10 @@ class PADnoteUI {: {public PresetsUI_}
resonance->labelsize(size12);
waveform->labelsize(size12);

filtergrp->labelsize(size11);
filterlabel->labelsize(size11);

envelopes->labelsize(size12);
ampgrp->labelsize(size11);
amplabel->labelsize(size11);
volume->labelsize(size);
vsns->labelsize(size);
pan->labelsize(size);
Expand Down
3 changes: 1 addition & 2 deletions src/UI/PartUI.fl
Original file line number Diff line number Diff line change
Expand Up @@ -2542,8 +2542,7 @@ class PartUI {: {public Fl_Group, PartUI_}
{
if(inseffectui->filterwindow->visible())
{
inseffectui->filterwindow->hide();
inseffectui->filterwindow->show();
inseffectui->filterwindow->redraw();
}
if(inseffectui->fwin_filterui)
inseffectui->fwin_filterui->theme();
Expand Down
17 changes: 10 additions & 7 deletions src/UI/SUBnoteUI.fl
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ class SUBnoteUI {: {public PresetsUI_}
xywh {10 6 205 60} box PLASTIC_UP_BOX color 223
}
Fl_Group ampgrp {
label AMPLITUDE
xywh {5 5 215 135} box THIN_UP_FRAME labelfont 1 labelsize 11 labelcolor 64 align 17
} {
Fl_Dial vol {
Expand All @@ -219,7 +218,7 @@ class SUBnoteUI {: {public PresetsUI_}
o->selection_color(setKnob(o->value(),96));

send_data (0, SUBSYNTH::control::volume, o->value(), TOPLEVEL::type::Integer);}
tooltip Volume xywh {20 20 29 29} box ROUND_UP_BOX labelsize 10 labelcolor 64 align 10 maximum 127 step 1
tooltip Volume xywh {22 22 29 29} box ROUND_UP_BOX labelsize 10 labelcolor 64 align 10 maximum 127 step 1
code0 {o->setValueType(VC_InstrumentVolume);}
class WidgetPDial
}
Expand All @@ -228,7 +227,7 @@ class SUBnoteUI {: {public PresetsUI_}
callback {//
o->selection_color(setKnob(o->value(),90));
send_data (0, SUBSYNTH::control::velocitySense, o->value(), TOPLEVEL::type::Integer);}
tooltip {Velocity sensing} xywh {66 20 29 29} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 127 step 1
tooltip {Velocity sensing} xywh {66 22 29 29} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 127 step 1
code0 {o->setValueType(VC_AmpVelocitySense);}
class WidgetPDial
}
Expand All @@ -237,7 +236,7 @@ class SUBnoteUI {: {public PresetsUI_}
callback {//
o->selection_color(setKnob(o->value(),64));
send_data (0, SUBSYNTH::control::panning, o->value(), TOPLEVEL::type::Integer);}
tooltip Panning xywh {118 20 29 29} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 127 step 1
tooltip Panning xywh {118 22 29 29} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 127 step 1
code0 {o->setValueType(VC_PanningStd);}
class WidgetPDial
}
Expand All @@ -252,7 +251,7 @@ class SUBnoteUI {: {public PresetsUI_}
callback {//
o->selection_color(setKnob(o->value(),63));
send_data (0, SUBSYNTH::control::randomWidth, o->value(), TOPLEVEL::type::Integer);}
tooltip {Random Width} xywh {178 20 29 29} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 63 step 1 value 63
tooltip {Random Width} xywh {178 22 29 29} box ROUND_UP_BOX labelsize 10 labelcolor 64 maximum 63 step 1 value 63
code0 {o->setValueType(VC_PanningRandom);}
class WidgetPDial
}
Expand All @@ -269,7 +268,11 @@ class SUBnoteUI {: {public PresetsUI_}
class Fl_Check_Button2
}
Fl_Box {} {
xywh {108 22 4 37} box THIN_DOWN_FRAME
xywh {108 22 4 38} box THIN_DOWN_FRAME
}
Fl_Box ampLabel {
label AMPLITUDE
xywh {100 10 20 10} labelfont 1 labelsize 11 labelcolor 64
}
}
Fl_Group freqsettingsui {
Expand Down Expand Up @@ -721,7 +724,7 @@ class SUBnoteUI {: {public PresetsUI_}
h[i]->h_dash->size(int(10 * dScale), int(3 * dScale));
}

ampgrp->labelsize(size11);
ampLabel->labelsize(size11);
vol->labelsize(size);
vsns->labelsize(size);
pan->labelsize(size);
Expand Down

0 comments on commit 449b1a6

Please sign in to comment.