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

Favourites Feature #3391

Open
wants to merge 16 commits into
base: community
Choose a base branch
from

Conversation

busa-projects
Copy link
Contributor

@busa-projects busa-projects commented Feb 16, 2025

A Favourites-Feature has been added to the Load-UIs for most File-Types. The Favourites are displayed above the Keyboard and are only visible when the keyboard is shown. Favourites can be configured to either offer 16 Favourites (default), 16 Banks with 16 Favourites or be completely disabled via SETTINGS > DEFAULTS -> UT -> KEYBOARD -> FAVOURITES.

  • In the Favourites Only (16)-Mode , 16 Favourite Slots are available at the Toprow above the Keyboard.
  • In the Favourites and Banks (256)-Mode, the Toprow contains 16 Banks, each with 16 Favourites displayed on the second row.
    Usage:
  • Save a Favourite
    • Select the Bank (Only available in Favourites and Banks (256)-Mode)
    • Browse to the File you want to save
    • Hold SHIFT and select a empty Favourite Slot (light blue)
  • Delete a Favourite
    • Select the Bank (Only available in Favourites and Banks (256)-Mode)
    • Hold SHIFT and select the Favourite Slot you want to delete
  • Recall a Favourite
    • Select the Bank (Only available in Favourites and Banks (256)-Mode)
    • Select the Favourite
  • Change the Colour of a Favourite
    • Select the Favourite you want to modify
    • Hold SHIFT and turn VERTICAL ENCODER

Tip:
If you are Browsing Songs or Samples an dont want to have the Preview to hide the Keyboard on Scrolling, just press the KEYBOARD-Button to pin the Keyboard and the Favourites.

Main functionality working for SYNTS and KITS

Open Issues:
- Initial Loading messed up
- SONGS not working
- Sample Browser not working
Todo:
-  Testing
- Remove Debug Comments
- Formating
Copy link
Contributor

github-actions bot commented Feb 16, 2025

Test Results

108 tests  ±0   108 ✅ ±0   0s ⏱️ -1s
 16 suites ±0     0 💤 ±0 
 16 files   ±0     0 ❌ ±0 

Results for commit 3035758. ± Comparison against base commit 5066b27.

♻️ This comment has been updated with latest results.

@alifeinbinary
Copy link

I think something worth considering is whether to make the favourites recallable through Program Change messages. I could see a purpose for it but I might be alone in that. Each group of 16 would be a sub-bank, each class would be a bank i.e. Songs on Bank 1, Synths on Bank 2, Kits on Bank 3 etc.

@busa-projects
Copy link
Contributor Author

Thanks for the suggestion. It is definitely worth considering. However, it is something that should be well thought through as programme change messages could also be used in other places. I am happy to take it on board as an idea for possible extensions.

Copy link
Collaborator

@m-m-adams m-m-adams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally think this is good to go. If you think we should keep the callback it just needs some docs explaining what the callback function should be implementing

I see a bunch of UI discussion in discord but that can be iterated on after merging

private:
void loadFavouritesBank();
void saveFavouriteBank() const;
std::function<void()> onUpdateCallback;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered any non-callback based implementations? It's a good architecture but it does make the code less beginner friendly. If you think this is the best way to go then I'm fine with it, just curious about alternatives

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i thought it was the cleanest way to update the UI, if the Model changes. But its doable without, as i now from user Actions, when the Model change and can trigger a update in the same user action. Refactored accrordingly

void changeColour(uint8_t position, int32_t offset);
const std::string& getFavoriteFilename(uint8_t position);
static constexpr uint8_t favouriteDefaultColor = 4;
void registerCallback(std::function<void()> callback);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a doc comment on what the function should do?

Copy link
Contributor Author

@busa-projects busa-projects Feb 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed Callback

@busa-projects busa-projects changed the title [DRAFT] Favourites Feature Favourites Feature Feb 22, 2025
@busa-projects busa-projects marked this pull request as ready for review February 22, 2025 09:43
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

Successfully merging this pull request may close these issues.

3 participants