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

wrong tuning and nice to have separate tunings configuration on user profile #142

Closed
sugizo opened this issue Oct 28, 2023 · 27 comments
Closed

Comments

@sugizo
Copy link

sugizo commented Oct 28, 2023

image

image above is wrong it, because major third tuning should be
E2-G#2-C3-E3-G#3-C4

ref
https://en.wikipedia.org/wiki/Major_thirds_tuning#Avoiding_standard_tuning's_irregular_intervals

and
nice to have separate tunings configuration on user profile
e.g. in mac
~/Library/Application\ Support/tuxguitar/config/tunings.xml

so that user can add, edit or remove tunings on their side

thanks and best regards

@guiv42
Copy link
Collaborator

guiv42 commented Oct 28, 2023

Hi
concerning user-defined tunings, I can try to implement something, but since I will not myself use this feature I don't have any idea about the user interface.
What's best: a new dialog? with which controls? accessible through a menu item? etc.
@sugizo : I have started a dedicated discussion on this topic, I would appreciate if you can provide some suggestions

@sugizo
Copy link
Author

sugizo commented Oct 28, 2023

about tuxguitar user configuration perhaps can use the logic like chess software scid, scidvspc, chessx, etc
they will save whatever user define configuration, like chess engine configuration, etc in user profile
because every user has own private configuration to their chess engine

so back in guitar, every user has their own favorite tuning or depend on the song they want to play

about user interface, just use as is the tuxguitar already have,
but the save file is locate on user profile

logically, of pseudo code perhaps :

if tuning.xml NOT exist in ~/Library/Application\ Support/tuxguitar/config/tunings.xml
    cp /Applications/tuxguitar.app/Contents/MacOS/share/tunings/tunings.xml ~/Library/Application\ Support/tuxguitar/config/
elseif tuning.xml exist in ~/Library/Application\ Support/tuxguitar/config/tunings.xml
    ~/Library/Application\ Support/tuxguitar/config/tunings.xml

already collected tuning from wiki tuning list and put it on web apps
ref
https://sugizo.pythonanywhere.com/music/fretboard/form_tuning_in_fretboard

could share the list as json if you want, or you can download directly from the web app

best regards

@guiv42
Copy link
Collaborator

guiv42 commented Oct 28, 2023

I do not know about the different applications you mention. Anyway it's clearly possible to move tunings configuration into a user's configuration file, but I do not understand how the user could then edit this configuration.
Or do you mean user could manually edit the config xml file? That does not sound very practical from my point of view, as many guitarists may not have any knowledge about xml format.
This is why I was suggesting a user interface to enable user to create, modify, delete custom tunings.

@sugizo
Copy link
Author

sugizo commented Oct 28, 2023

agree, many guitarists may not have any knowledge about xml format

objective
user can add, edit, remove tunings and save it in user profile
that define by tux guitar when they install application
through tux guitar not by xml file

problem in 1.6 version
user can edit, but not save as default,
so everytime they open the tux guitar (start new guitar tab),
they must reconfigure the tuning

best regards

@guiv42
Copy link
Collaborator

guiv42 commented Oct 28, 2023

Okay, thanks for your feedback
I'll try to do something (though it might take some time!)

@guiv42
Copy link
Collaborator

guiv42 commented Nov 12, 2023

@sugizo : possibility to save custom tuning presets is now available from pre-release 2023-11-12. I would appreciate some feedback on user interface if possible.
Note: I have not yet updated the 'help' section (screenshots, etc.), waiting for this feedback first.

@helge17
Copy link
Owner

helge17 commented Nov 12, 2023

This is my suggestion for the tuning dialog (2a1e4ce)

grafik

@sugizo
Copy link
Author

sugizo commented Nov 13, 2023

tested with non installer swt version, because have already install 1.6 version
steps in terminal

cd %homepath%\Downloads
curl -LC - https://github.com/helge17/tuxguitar/releases/download/2023-11-12-snapshot/tuxguitar-2023-11-12-snapshot-windows-swt-x86_64.zip -o tuxguitar.zip
powershell -Command "Expand-Archive -LiteralPath %HOMEPATH%\Downloads\tuxguitar.zip -DestinationPath C:\tuxguitar"
powershell -Command "Copy-Item -Path 'C:\tuxguitar\*' -Destination 'C:\' -Recurse"
powershell -Command "Remove-Item C:\tuxguitar -Recurse"
powershell -Command "Remove-Item C:\tuxguitar.zip"
C:\tuxguitar-2023-11-12-snapshot-windows-swt-x86_64\tuxguitar.exe

steps in tuxguitar
File >History
to open previously open file
double click track table then edit tuning

steps in windows explorer
can't find any tuning file on my home directory
%homepath%\AppData\Roaming\tuxguitar\config

comment
UI in my perspective is fine for me
what i care most is the *xml file store on use profile,
because just like this, when i tested the snapshot version, i still need to re configure the tuning again

question
perhaps, it save on another path
or
must use the installer version
?

@sugizo
Copy link
Author

sugizo commented Nov 13, 2023

tested on wsl (windows subsidiary linux distro ubuntu)

cd
curl -LC - https://github.com/helge17/tuxguitar/releases/download/2023-11-12-snapshot/tuxguitar-2023-11-12-snapshot-linux-swt-x86_64.deb -o tuxguitar.deb
sudo apt update
sudo apt install -y ./tuxguitar.deb
tuxguitar

result

java.lang.UnsatisfiedLinkError: 'void org.eclipse.swt.internal.gtk.OS._cachejvmptr()'
        at org.eclipse.swt.internal.gtk.OS._cachejvmptr(Native Method)
        at org.eclipse.swt.internal.gtk.OS.cachejvmptr(OS.java:494)
        at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:93)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:209)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:155)
        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:161)
        at org.herac.tuxguitar.ui.swt.SWTApplication.createDisplay(SWTApplication.java:71)
        at org.herac.tuxguitar.ui.swt.SWTApplication.<init>(SWTApplication.java:18)
        at org.herac.tuxguitar.ui.swt.SWTApplicationFactory.createApplication(SWTApplicationFactory.java:9)
        at org.herac.tuxguitar.app.ui.TGApplication.<init>(TGApplication.java:27)
        at org.herac.tuxguitar.app.ui.TGApplication$1.createInstance(TGApplication.java:64)
        at org.herac.tuxguitar.app.ui.TGApplication$1.createInstance(TGApplication.java:62)
        at org.herac.tuxguitar.util.singleton.TGSingletonUtil.getInstance(TGSingletonUtil.java:12)
        at org.herac.tuxguitar.app.ui.TGApplication.getInstance(TGApplication.java:62)
        at org.herac.tuxguitar.app.synchronizer.TGSynchronizerControllerImpl.<init>(TGSynchronizerControllerImpl.java:18)
        at org.herac.tuxguitar.app.TuxGuitar.createUIContext(TuxGuitar.java:115)
        at org.herac.tuxguitar.app.TuxGuitar.createApplication(TuxGuitar.java:101)
        at org.herac.tuxguitar.app.TGMainSingleton.launchTuxGuitar(TGMainSingleton.java:57)
        at org.herac.tuxguitar.app.TGMainSingleton.launchSingleton(TGMainSingleton.java:45)
        at org.herac.tuxguitar.app.TGMainSingleton.main(TGMainSingleton.java:35)

expected result
tux guitar can be open when install from github,
like when install from ubuntu repo
apt install -y tuxguitar

@guiv42
Copy link
Collaborator

guiv42 commented Nov 13, 2023

@sugizo: it should work with the windows standalone version. No need to use the installer, no need to use the deb version. In my win10 config, custom presets are correctly saved in an xml file with the path you mentioned.
So, I see 2 different options:

  1. something differs between your config and mine, to be identified
  2. Possibly user interface is not intuitive enough: did you explicitly "saveAs" your custom tuning before clicking OK in dialog? See video below. Yet there is no warning if dialog is closed with custom tuning unsaved.
simplescreenrecorder-2023-11-13_13.12.39.mp4

@sugizo
Copy link
Author

sugizo commented Nov 13, 2023

excellent, tested work on windows,
my bad from previous tested, not consider
that the save button is not active
until user type something

btw, for tuxguitar on wsl,
is it normal to got that result above,
or
should i create new issue for that ?

thanks and best regards

@guiv42
Copy link
Collaborator

guiv42 commented Nov 13, 2023

good news :)

About wsl: TuxGuitar is already delivered for many platfoms (Linux: archive + deb + rpm, Windows standalone + installer, macOS, FreeBSD, Android). But it does not guarantee any compatibility with wsl. So, personally I would not consider this an issue, and I do not plan to work on this topic (so many TODOs already...)

@guiv42
Copy link
Collaborator

guiv42 commented Nov 13, 2023

@helge17: I'm OK with your graphical adaptation.
Before updating help section: I'm a bit frustrated @sugizo did not succeed to use the feature first time. Other users will for sure face the same problem. I can see several options for improvement (other suggestions welcome!). When user clicks OK in dialog with current preset unsaved:

  1. open a confirmation popup: Unsaved current preset, confirm ? (OK/Cancel)
  2. save custom preset with a default name
  3. save custom preset with an empty name

Option 1 has the drawback of adding a string to translate, and does not make any clearer how to "save as". A bit complex.
Option 2 also requires an additional string to be translated
Option 3 might be a simple way out. Even if multiple custom presets have an empty name they will remain accessible in drop-down list (showing the list of strings). I'd say it's my favorite option. Might be even better if option to "saveAs" is enabled even is current preset is not new, in this case the new name could replace the old.

What do you think?

@sugizo
Copy link
Author

sugizo commented Nov 14, 2023

miss dry kiss
Make It Simple
Dont Repeat Yourself
Keep It Simple

why not simplify back to square 1 :
when tuxguitar create the user's folder, it include tunings.xml
and
everytime user edit (press edit icon),
add (press add icon),
or delete (press delete icon) ,

it also affect tunings.xml on user's folder
so, no need to use save button in GUI,
because it already covered with ok button

and if,
user want to reset their tunning settings back to what tuxguitar provide,
they simply delete tunings.xml on their users profile,
and
open tuxguitar again, that will recreate or recopy from tuxguitar share folder

same flow like chess software about chess engine configuration

what do you think ?

@guiv42
Copy link
Collaborator

guiv42 commented Nov 14, 2023

user shall never need to manipulate xml files.
That's OK today: tuxguitar xml file is unchanged and never modified online. User's config xml file only stores custom presets. So, only custom presets are accessible read/write (TG presets are read-only, so always available). Keep it simple ;)

Okay... so, "OK" button somehow replaces "Save". That comes down to my option 3: tolerate cutom presets with empty names.
Then, to ease renaming:

  • keep SaveAs enabled only when text field is not empty
  • permanently enable text field (currently only available when configured tuning is new)
  • SaveAs an already existing custom tuning overwrites old name by new name

I'll try that

@sugizo
Copy link
Author

sugizo commented Nov 14, 2023

case
how do you want user when face this condition :
user open midi file e.g. :
rolling stone - paint it black.mid
that contain lead guitar
and rhythm guitar,

in lead (ronnie wood) using standard tuning
and
rhythm (keith richard) using open g

objective
the user want to learn both rhythm and lead

expected result
1 user can select the tuning default, either standard or open g
2 user can sort or reorder the list of tuning (optional),
e.g. on case above :

  • standard tuning
  • drop d
  • open g
  • whatever tuning list ...

on right side, have some button like up or down, to reorder,
or whatever that easy for you (as developer)

@helge17
Copy link
Owner

helge17 commented Nov 15, 2023

To be honest, I wouldn't save the custom tuning every time the user changes the tuning in their current song by pressing the OK button. For example, if someone is experimenting with new tunings, every time they press the OK button, a new tuning will be saved, even if it was just an (unsuccessful) experiment. So their tuning list gets cluttered with useless tuning presets.

I think a tuning should only be saved if the user really wants to save it, just like your text editor, TuxGuitar or whatever program you use only saves a document when you tell it to.

But I agree that somehow the user should more easily recognize that they need to manually save their tuning if they want to preserve it in the tuning list. So I think it's a good idea to always enable "Save As", even if the current preset isn't new. Maybe you could prefill the text field with "Untitled" if the tuning is new, using the already existing message file.save.default-name=Untitled (and maybe extend it with a number "Untitled 1" etc., like LibreOffice does for example). I think it would also help the user to have a mouseover description of the buttons in the tuning dialog, like TuxGuitar has for many other buttons.

Furthermore, if the user forgets to save their tuning in the preset list, it is not completely lost: it is still saved in their song file.

@sugizo
Copy link
Author

sugizo commented Nov 16, 2023

I think a tuning should only be saved if the user really wants to save it, just like your text editor, TuxGuitar or whatever program you use only saves a document when you tell it to.

how about cloud thing, they just make it auto save e.g. google doc

problem in tuning UI

  1. the ability to set default tuning (most favorite tuning (should be on top of other tuning) or in the first choice when user open tuning dialog)
  2. the ability to sort tuning (purpose to move the most used tunning to top and less used to bottom)
  3. the ability to copy tuning
    e.g. when user want to create new tuning base on existing tuning,
    but change several notes,
    like from standard tuning to drop d tuning
  4. the ability to edit tuning using keyboard type,
    e.g. when user want to change the tuning,
    they must scroll the list,
    it's easier if they can type it

temporary solution
not see this feature on 1.6,
so, what do i do to achieve it ?

edit tuning.xml from share folder,

  • problem 1 half solved, because the default is still goes to standard tuning
    move my favorite one on top or near standard tuning
  • number 2 problem solved
    reorder tuning, move less used tuning to bottom
  • the rest problem is just keyboard activity (copas n edit)

the way edit tuning.xml is faster
than
use mouse to reorder the tuning list from tuxguitar UI (more effective and efficient)

objective of tuning.xml on user directory
can backup the settings, everytime update the tuxguitar, or try new version (like snapshot before)

@guiv42
Copy link
Collaborator

guiv42 commented Nov 16, 2023

OKay...
First of all thank you for your feedbacks. Designing UIs is a difficult exercise I really dislike.

I just sent pull request #152, where I tried to take into consideration your remarks:

  • SaveAs button and text area always enabled
  • a default name is presented when preset is new ("Untitled N")
  • toolTipText added to buttons, still to translate in all languages (only values for English & French are defined)

@helge17 : 2a1e4ce introduced a small regression.
Height of drop-down lists area differs wether buttons are displayed or not (if preset is TG's or user's). If you open the dialog with a TG preset, then switch to a user's custom preset the bottom of text area and SaveAs button is truncated.
KO

It's exactly the same issue we had some time ago with the width of skin selector. This time I bypassed it with an arbitrary margin. A bit quick & dirty, but I did not have the patience to implement the same solution as with skin selector: there are several levels of panels/sub-panels, this is a bit more complex to recalculate and propagate height dynamically. With this PR I re-introduced the margin, visually it should be OK (I also added a comment for justification).

@sugizo : there is no such thing as a "default tuning" when user opens the tuning dialog. When opened, dialog displays the tuning of the currently selected track.
Tracks' tuning settings are saved to tablature file: if you work with a track tuned in "open-G", save file (.tg format, not midi), exit TuxGuitar, re-open your file and open tuning dialog, it displays "open-G"
Then for sure there is a default tuning configuration when a new song is created, but this can be customized. E.g. if you usually play in "drop-D", then create an empty song, set track's tuning to "drop-D", save your file somewhere. Then, menu "File/Set custom template", and navigate to your file. From now on, each time a new song is created it will have 1 track tuned in "drop-D".
That being said, from now on one xml file will be present in your config folder, as soon as you have saved 1 custom preset. Then you are fully free to edit manually this file if this method suits you better (you can add, modify, delete or re-order your presets there).

To be very honest: I spent a very significant amount of time on this feature already.
So, except if you tell me there is a blocking issue (or an undetected bug) I don't plan to go any further.
Still, the help section needs to be updated now.

@sugizo
Copy link
Author

sugizo commented Nov 17, 2023

can find scales.xml but no chords.xml,
why ?

could you also add scales.xml to user profile too ?

objective is same like tunings.xml above
users can add, modify (delete, or edit), reorder, backup

@helge17
Copy link
Owner

helge17 commented Nov 17, 2023

I think a tuning should only be saved if the user really wants to save it, just like your text editor, TuxGuitar or whatever program you use only saves a document when you tell it to.

how about cloud thing, they just make it auto save e.g. google doc

I understand what you mean. But Google Docs has a bit more intelligence than TuxGuitar: not every edit is saved in the history, only at certain intervals. There is a separate history for each document, separate menus to manage the history, automatic deletion of older entries, etc. In TuxGuitar, there is only one list of custom tunings, where (with auto-save) every tuning you've ever tried is stored in a single list that you have to manage manually.

Perhaps there is a better example of this: a web browser. It has bookmarks that you save manually and a history that is saved automatically. I think our use case is closer to bookmarks.

can find scales.xml but no chords.xml,

Try ~/.config/tuxguitar/config/customchords.xml

Anyway, @guiv42 did a great job and I think the feature can stay as it is, thanks, @guiv42! I will take care of the help section and some translations.

helge17 added a commit that referenced this issue Nov 18, 2023
…ialog, limit preset name length, increase width of dialog
@helge17
Copy link
Owner

helge17 commented Nov 18, 2023

If translation strings or custom preset names become too long, the edit buttons will disappear.

grafik

67829dd limits the length of the custom preset name to 20 characters and increases the width of the dialog to possibly avoid this.

One last question: shouldn't the "Transpose affected Notes" checkbox immediately be activated as soon as you change tuning? Currently it is only activated if you click on a string under "Strings".

@sugizo
Copy link
Author

sugizo commented Nov 19, 2023

the "Transpose affected Notes" better activated
as soon as user change tuning

thank you

@guiv42
Copy link
Collaborator

guiv42 commented Nov 19, 2023

PR #154 refreshes checkboxes 'enabled' property when user selects one preset.
@helge17 : thank you very much for the correction of the width issue.
By the way, #52 stroke again: the same width computation error occurs on radio buttons and checkboxes. So, in this case the checkbox label in bottom-right corner gets truncated :(
truncated_checkbox

@guiv42
Copy link
Collaborator

guiv42 commented Nov 22, 2023

@sugizo : can this issue be closed now ?
Feature is available in pre-release, from 2023-11-19

@sugizo
Copy link
Author

sugizo commented Nov 23, 2023

steps

powershell -Command "Remove-Item C:\tuxguitar-*\ -Recurse"
cd %homepath%\Downloads
curl -LC - https://github.com/helge17/tuxguitar/releases/download/2023-11-19-snapshot/tuxguitar-2023-11-19-snapshot-windows-swt-x86_64.zip -o tuxguitar.zip
powershell -Command "Expand-Archive -LiteralPath %HOMEPATH%\Downloads\tuxguitar.zip -DestinationPath C:\tuxguitar"
powershell -Command "Copy-Item -Path 'C:\tuxguitar\*' -Destination 'C:\' -Recurse"
powershell -Command "Remove-Item C:\tuxguitar -Recurse"
powershell -Command "Remove-Item %HOMEPATH%\Downloads\tuxguitar.zip"
C:\tuxguitar-2023-11-19-snapshot-windows-swt-x86_64\tuxguitar.exe
notepad %homepath%\AppData\Roaming\tuxguitar\config\tunings.xml

result
1 work fine on gui, new custom tuning will automatically save on user profile
2 edit existing tuning, will refer to existing tuning and not save on user profile "
e.g.
drop d :
d, a, d, g, b, e
wont save on user profile

last question before closing issue
for number 2, is this intended or not ?

think the flow is tuxguitar copy every tuning on share folder to user profile,
then after that, tuxguitar only read the user profile tuning not from share folder any more,

while tested 2023-11-19, tuxguitar see from both :
share folder and user profile,

yeah, like a two side knife,
but fine for me

thanks and best regards

@guiv42
Copy link
Collaborator

guiv42 commented Nov 23, 2023

Yes, this is fully intentional. See description of modification

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

3 participants