helge17 / tuxguitar

Improve TuxGuitar and provide builds
Other
436 stars 35 forks source link

feat: add functionality to save and load preset ranges in play mode #315

Open iamn1ck opened 6 months ago

iamn1ck commented 6 months ago

Hi, I use tuxguitar regularly and the play mode range selector is not always the best user experience. I added a new UI state to save and load preset ranges for the tab. The feature is almost implemented correctly, except after confirming your selection in the play mode dialog the saved preset are forgotten (see the video attached). It would also be very helpful if it could persist the presets when the app is closed and opened again, so the user does not have to keep creating the same presets every time. Any pointers on how to implement this would be appreciated.

https://github.com/helge17/tuxguitar/assets/3345597/6e2a4446-746c-4a31-9e5a-00438919efc1

iamn1ck commented 6 months ago

Thanks for the feedback and suggestions. I went ahead and implemented most of the changes already.

I have renamed the model as you suggested, to TGMeasuresInterval, and updated the UI to be more intuitive. I was also able to persist the list of TGMeasuresInterval on the TGSong so you can open and close the dialog and keep the presets.

The only thing missing is persisting the presets on the tgsong file, but I'm not sure where to add that.

guiv42 commented 6 months ago

Thanks for the feedback and suggestions. I went ahead and implemented most of the changes already.

OK, good. It might take some time for me to review these changes, many open topics in the todo list currently.

The only thing missing is persisting the presets on the tgsong file, but I'm not sure where to add that.

This is clearly an open point, and it's too early to answer your question. Currently our plan is the following:

  1. finalize delivery of version 1.6.2 (this release was unexpected, see #312)
  2. still some feature requests / bug fixes to implement in master branch, targeting a version 1.6.3 without any modification of file format
  3. implement other feature requests requiring file format evolution. Possibly for a version 2.0? Still in discussion

I cannot give you any date for these steps. This is a spare time project, so globally we're progressing slowly (but we're progressing!). And this plan may change. Refer to #41 to follow the discussions on dev next steps. Between steps 2 and 3, we will need to open the discussion about the new file format. Most probably we will not keep the existing custom binary (and undocumented) format.

About your new feature: is there still some added value if the loop intervals are not persistent? I don't really know. If persistence is required, then we should target tuxguitar-next branch, and wait some time (step 3 above) to merge into master.

iamn1ck commented 6 months ago

I think this is a good starting point, but unless the preset intervals can be saved on the tgsong file (or elsewhere) then the feature is not too helpful. I will start to rebase my changes to the tuxguitar-next branch and then we can discuss how to approach the file format changes

guiv42 commented 6 months ago

Just a suggestion, proposed by another user on a french-speaking guitar forum, completely independently from your work: it might even be more interesting to store in TGSong object all settings from player mode dialog.

Use case : working simultaneously with 2 songs. E.g. I'm working on song 1, I set tempo 90%, I select song2 to look at something, then come back to song1 -> currently tempo is reset to 100%

So the best solution could be to store all player mode settings in song object (including the current loop preset, not only the presets list), but only to persist some settings in the song.tg file (e.g. loop presets)

What do you think?