Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: add "Load Default for ..." and "Save Default for ..." to right-click menu for all CheckBox and ChoiceBox and SliderBar #29

Open
ericfont opened this issue Oct 18, 2021 · 3 comments

Comments

@ericfont
Copy link
Contributor

ericfont commented Oct 18, 2021

I propose to add "Load Default for ..." and "Save Default for ..." to right-click menu for all loop controls so looks like:

image

@ericfont ericfont changed the title Feature Request: add "Save as Default..." and "Reset to Default..." to right-click menu for all loop controls Feature Request: add "Load Default for ..." and "Save Default for ..." to right-click menu for all loop controls Oct 18, 2021
@ericfont
Copy link
Contributor Author

I suppose for simplicity of code and generality I will make this apply for all controls made with class CheckBox and ChoiceBox and SliderBar, so would apply for both per-loop controls as well as global top-panel controls.

@ericfont ericfont changed the title Feature Request: add "Load Default for ..." and "Save Default for ..." to right-click menu for all loop controls Feature Request: add "Load Default for ..." and "Save Default for ..." to right-click menu for all CheckBox and ChoiceBox and SliderBar Oct 18, 2021
@essej
Copy link
Owner

essej commented Oct 18, 2021

This sounds like a reasonable design

@ericfont
Copy link
Contributor Author

I notice the current preferences files in /home/user/.sooperlooper are default_midi.slb which works in headless and GUI mode, and gui_config.xml which is only for GUI settings...

I'm thinking for my feature request I would want any new default settings to work in headless mode as well as GUI mode, so I won't put them in gui_config.xml and rather I will instead create a new preferences file (default_values?) for them, and I would probably start by copying /src/midi_bind.hpp/cpp and trim it down to just the functions load_bindings, save_bindings, save_bindings, get_bindings, add_binding (and rename from midi/bind to "default_values").

I think I would use the strings used for the add_input_control calls in command_map.cpp which map to the Event::control_t enum so every row of that file is a string of any new defaults that get assigned and their new value.

And I guess new looper would get their values set in Looper::initialize() and I think the global ones would get set in Engine::initialize() so I'll check for an entry for those corresponding private variables there and assign it then.

And then I think on gui code mianly just need to have CheckBox and ChoiceBox and SliderBar class get an additional event enums ID_LoadDefaultMenuOp and ID_SaveDefaultMenuOp which get set just like ID_BindMenuOp does with bind_request signal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants