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

Hide/show tiers in TextGrid #2601

Open
rolandomunoz opened this issue Feb 26, 2024 · 5 comments
Open

Hide/show tiers in TextGrid #2601

rolandomunoz opened this issue Feb 26, 2024 · 5 comments

Comments

@rolandomunoz
Copy link

I wonder if it would be possible to add a new feature to TextGrid in Praat that allows users to hide and show tiers. This functionality would be valuable for:

  • Users with many tiers: Hiding unused tiers can improve the clarity and organization of the displayed information.
  • Users who need specific tier arrangements: The ability to collapse tiers would allow users to quickly see desired tiers without duplicating structure through manual tier reordering.

Overall, this feature would enhance user experience and workflow efficiency for various use cases within Praat.

@pb05061967
Copy link

I agree with Rolando.

@PaulBoersma
Copy link
Member

This is requested now and then. The problem is always: how should this work? Thus, suppose you want to hide tiers 3, 4, 6, 7 and 10 of a 10-tiered TextGrid. How would you like to do that; e.g. by having a button at every tier? More importantly, what happens next? After all, the problem is largest if you have to edit tons of TextGrids with the same tier names (or just the same number of tiers?). Should Praat remember the numbers of the to-be-hidden tiers, or the names? Across TextGrids, or also across Praat sessions (oops, a potential privacy issue)? How should tiers be unhidden; perhaps a thick line between them suggesting that there are invisible tiers (I rarely manage to show and hide rows in Excel, so those must be unintuitive)? Any explicit help from your side may contribute to our finally implementing this.

@pb05061967
Copy link

pb05061967 commented Jun 14, 2024 via email

@rolandomunoz
Copy link
Author

Thank you for paying attention to this topic. I hope this ideas could help you.

I've divided this issue into three parts:

(A) Commands that could be added to the TextGridEditor menu to show/hide tiers
(B) The graphical mechanisms to show/hide tiers
(C) How Praat should remember the to-be-hidden tiers

I have a feeling that implementing menu commands might be easier than modifying the graphical interface of the TextGridEditor window. Based on this, I think adding menu commands should be implemented first, and once users are familiar with them, you can consider graphical options.

(A) Commands that could be added to the TextGridEditor menu to show/hide tiers

I agree with @pb05061967 . A command like Hide tiers: {2, 3} would be very helpful. Additionally, here are some ideas:

- Hidden tiers should be declared by their numeric position.
- Tiers not declared in the Hide tiers command are displayed by default.
- Hiding tiers does not change the order of the tiers.
- Hiding tiers is only for visualization purposes. Users can still modify, query, and remove them.
- The hide/show tier configuration should be independent for each TextGrid

(B) The graphical mechanisms to show/hide tiers

Once users are familiar with menu commands (section A), this step could be implemented if necessary

I would recommend implementing a Tier Visibility Manager in the TextGridEditor. This dialog would show tier attributes in a table format. It could have columns for: (1) tier position, (2) tier name, (3) tier type, and (4) show/hide status. In the fourth column, users could check or uncheck the visibility of each tier. Additionally, other operations could be done, like moving tiers up and down. Not quite sure, but I rememeber similar features in some sound editors like STC SIS II and Adobe Audition for managing marks.

(C) How Praat should remember the to-be-hidden tiers

(1) Ideally, the hide/show attributes could be saved directly with the TextGrid files. However, this would likely require modifying the TextGrid format, and the new format might not be compatible with older versions of Praat.

(2) As an alternative, as long as Praat is running, the hide/show attributes for each TextGrid object could be remembered. This could be achieved by extending the TextGrid object with those attributes. This means the attributes would only exist within the program itself, not saved in the file."

Thank you for asking us to provide some ideas. I will be attentive to anything.

@PaulBoersma
Copy link
Member

One could think that hiding tiers by number is preferred, because it's analogous to "Mute channels"; however, channels tend not to have names, so the choice between names and numbers doesn't apply there. Choosing numbers also makes hiding tiers easier to script than choosing names, but scripting shouldn't be the major concern, as users that have hitherto asked for hiding tiers just wanted to "click them away" (less so on GitHub than on the User List, I guess). In that respect, most users' preferred "graphical mechanism" is probably not a Tier visibility Manager but just clicking (perhaps on an icon near the tier number), as one can also do to mute a channel (the user clicks on the loudspeaker icon).

As for the feedback of seeing that a tier has been hidden, @pb05061967 suggested that the fact that the number sequence is interrupted should suffice. By proposing "suppose you want to hide tiers 3, 4, 6, 7 and 10 of a 10-tiered TextGrid" I wanted to prevent that type of answer: there will be no gap in the number sequence at tier 10.

Some wishes above can run into a contradiction, such as @rolandomunoz saying that the numbers should be remembered but at the same time saying that tiers can still be removed. In my example, with tiers { 3, 4, 6, 7, 10 } hidden, what should happen when I remove tier 1? Should I shift the numbers of the hidden tiers, so that the identities of the set of hidden tiers stays the same? If so, then we may have to realize that names are better tokens of identity than numbers are (although names aren't necessarily unique, as @pb05061967 noted).

@pb05061967 and @rolandomunoz agree that the hiding should be done for every TextGrid separately. However, the first mentions of tier hiding on the User List were from people who had (say) 500 TextGrids with 30 tiers each, and only had to edit a couple of those tiers. These multi-TextGrid multi-tier cases are the cases in which tier hiding can gain the most, but that gain is possible only if hiding can be remembered across TextGrids.

These are just remarks to weigh in from the users' (not programmers') standpoint. I wanted to mention them so as to make more issues clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants