-
Notifications
You must be signed in to change notification settings - Fork 80
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
Support hierarchic menus #61
Conversation
This introduces a new menu engine implemented in the class CUIMenu, which can be configured with C-tables. This should make it easier to extend the menus, without modifying the code too much. The UI provides a main menu, which selects the TG to be edited and a TG sub-menu, which presents the already known TG parameters (voice bank, voice, volume, pan, detune and channel). A sub-menu is entered with single click and left with double click. There are arrows displayed on the LCD, which show the direction(s), to which the knob can be moved. All TG related parameters are maintained in the class CMiniDexed now.
Thanks @rsta2. Yes, this is what I had in mind. It works well for me. 👍 Using this UI, I can already imagine the next cool feature... The only thing that got a bit harder to do than before is to change something for more than one TG. Say, you have 4 TGs active and want to change the voice for all of them. Maybe it's an overstretch, but maybe we could add a press-and-turn-knob shortcut that would go from TG to TG but stay in the currently selected submenu? |
Probably possible. I will deal with this tomorrow and add eventual new commits to this PR. The "Menu home" function can be mapped to triple click then and the system reboot after 5 seconds hold. |
What do you think about press-and-turn-knob? To be precise, I mean turn-knob-while-button-is-pressed |
Good idea. I will see, what I can do. |
Moving from one TG to another in a sub-menu is in effect a jump from one leaf in the tree structure of the menus over several nodes to another leaf. I was looking for a way to implement this, based on the existing menu stack data structure in the class Actually it worked to some degree, but when one left one sub-menu, after changing the TG inside this sub-menu, and entered this sub-menu again, one were in the same TG again, where he were before, when changing the TG, even when in the upper menu, a different TG was selected (difficult to explain). That's all is a mess, and no one will understand this code after a while. I also have no idea, how this can be realized with a different data structure, maybe with lots of code, but this is something, I tried to prevent for the menu. So unfortunately there is no solution for the turn-knob-while-switch-pressed function at the moment. Detecting these events itself (switch pressed and turn knob up or down) was not a problem. |
This is how I would imagine one could do it (totally made up pseudo-code):
|
This may work with a different implementation of the class I do not think, that this must be the perfect implementation. But it's the result of more than one day of work, while I did not know the requirement to change the TG inside a sub-menu. I had more in mind to make it easy, to add all the voice parameters, without the need of much code. |
I see. If it's too much work then I don't think it's a must have. I was hoping it could be done without too much extra work. |
I could add the voice parameters (OP-related and non-OP-related) under "Edit params" (or "Edit Voice"?) to the menu to this PR, to have some added value here. Should not be that much effort. I don't know, if this makes sense at this stage? |
Wow, that would be huge 👍 |
;) OK, I will add it. |
Menu items can be re-sorted, if necessary.
I will add a "Reverb" sub-menu now, and push it together with the "Edit Voice" menu, which is finished already, to be added to this PR. |
* Map reverb float parameters to range 0 .. 99 * minidexed: Add global (non-TG) parameters * minidexed: Protect reverb module with spin lock
Here are the added sub-menus "Edit Voice" (after "TG#" > "Channel") and "Reverb" (after "TG8"). The menu items can be re-sorted, if necessary. I cannot hear much influence of the different reverb parameters. The load reaches 80% here on a Raspberry Pi 3B without |
This is way cool @rsta2! Can't stop playing with it. 👍 |
I updated the documentation at https://github.com/probonopd/MiniDexed/wiki/Menu and added the menu tree at the bottom. |
Unfortunately I found a problem in the OP# menus. They always work with TG1, not with the one selected in the main menu. The fix is not difficult. Will do this soon. |
Would it be easier to implement the following: |
This would be even more complicated, because the class If this is function really important, I will think about it again. Some ideas come after some time. |
Would "turn-knob-while-button-is-pressed edits the parameter not just for this TG but for all TGs" be more reasonable for now? (My main use case is still having the same voice play "stacked" on multiple TGs like in the default performance.) |
I found a solution now for the initially wanted function: Turning the knob, while editing a parameter, switches to the next TG up or down. I could send a PR, if this is OK. Changing a parameter for all TGs at once, would be more complicated again. |
Let's go for the less complicated solution then :) |
See #70. |
This introduces a new menu engine implemented in the class CUIMenu,
which can be configured with C-tables. This should make it easier to
extend the menus, without modifying the code too much. The UI provides
a main menu, which selects the TG to be edited and a TG sub-menu, which
presents the already known TG parameters (voice bank, voice, volume,
pan, detune and channel). A sub-menu is entered with single click and
left with double click. There are arrows displayed on the LCD, which
show the direction(s), to which the knob can be moved. All TG related
parameters are maintained in the class CMiniDexed now.