openbbm icon indicating copy to clipboard operation
openbbm copied to clipboard

Search within BeatBuddy Manager (BBM) Project Explorer

Open p3rsist opened this issue 5 years ago • 5 comments

I'm proposing an enhancement so that users can search all folders within the open BBM Project Explorer (song) folders as well as the drum sets.

Example 1: I have dozens of folders, each holding 99 songs that I've either created or imported. Rather than scrolling through each folder for a song title, I'd like to be able to use CMD-F and CMD-G to find or find again for a song title. The process would be to search all of the folders within a project open within the BBM and return a result by opening the folder and highlighting the song. To extend or enhance this process just a little more, it would be great to type the first few letters of the song title within a song folder open in the BBM and the song is then highlighted.

Example 2: I have dozens of drum sets in a BBM project and I want to be able to quickly search for and locate a drum set. Find a drum set within the Project Explorer Drum Sets tab would make it easier than scrolling. Likewise, the ability to just type the first few letters of a drum set's name and have all instances be selected would be ideal.

It would be great if both of these approaches could be made context sensitive so that a menu and sub-menu would not be needed.

p3rsist avatar Aug 05 '20 12:08 p3rsist

Always good to tag here on GH, easy to lose things otherwise!

brennansingular avatar Sep 11 '20 21:09 brennansingular

Hello @p3rsist and @brennansingular ,

I didn't see your request and actually started implementing something because I felt the need for myself. Like you, I have a lot of songs, and felt the need to filter them.

I have something working, although incomplete and kind of buggy. But I think I gives the idea (and already helps me as-is)

I have added a menu entry in the songs menu (filter songs with Ctrl-F as keyboard shortcut) which is accessible as well as a right-click menu entry from the project explorer and which opens up a filter dialog box.

image

And when, I type something in this dialog box, it filters the project explorer songs list.

image

If you remove the filter criterion, then you are back to original state. Not really polished and that's why I didn't issue a PR yet. There are still a number of problems to fix with my approach:

  • For the time being, the filter applied to the project explorer is not in sync with the songs list panel (where you see song structure). Meaning that you could potentially select a song in this list which has actually been filtered out in the project explorer. That can probably be easily fixed... didn't have a look yet.
  • If you filter up to a point where everything is filtered out (ie no results is returned, and the project explorer is empty), there is something strange when I clear the filter, I see the full underlying model, meaning that there was probably some initialization of the proxy model in the first place I didn't catch in order to specify what the tree root should be, as the same model seems to be used for the different entities (songs, drumsets, effects and parameters)... I am a total noob in Qt classes and struggle a bit to find the correct way to do things (I am using a QSortFilterProxyModel instead of a QIndentityProxyModel to filter the model content in the view). If I find a bit of time to fix this then I could almost submit my PR I think.

image

  • I should have a look at what is selected by default when filtering.
  • Another point is that I should probably add a reset filter menu entry, as well as a visual highlight of the fact the list is currently filtered (currently need to reopen the filter dialog to clear the filter criterion).
  • Last but not least, need probably to tweak a bit the proxymodel for a more clever search (all nodes are currently filtered, so if an artist name matches the filter criterion, but the filter does not match any part of his song names, then in the filtered project explorer view, the artist node would appear but with no song below... there are clearly a lot of ways to improve this).

I am no C++ developer so not really working actively on this. I did the minimum for me as it made sense for my own purpose, and then realized (as I am using it all the time) that everyone may be interested in this too...

Let me know what you think about it

lbriais avatar Nov 26 '20 07:11 lbriais

Forgot to mention... my branch is there. It builds ... but with the aforementioned bugs and missing features.

lbriais avatar Nov 26 '20 07:11 lbriais

Of course same approach could be used for drumsets

lbriais avatar Nov 26 '20 07:11 lbriais

Good on you, @lbriais ! This is something that I've had in mind in my design mockups for a while, but it has never gotten further than the idea :) This will be super useful to a lot of people. Thank you!

GoranRista avatar Dec 13 '20 00:12 GoranRista