mpogue2 / SquareDesk

Fully-featured music player and sequence designer, designed for square dance callers
10 stars 4 forks source link

Feature: Add a New From Template button, and a 2-column cuesheet template #728

Open sharmanr opened 1 year ago

sharmanr commented 1 year ago

Many laptops' displays these days are wide but not tall, so when displaying lyrics it would be nice if the cue-sheets had two (or more!) columns.

I tried using css, to have "left" and "right" classes, but although they worked in a browser they didn't work in SquareDesk (I think qttextedit ignored them). However, using html tables they work fine. The recipe is simple:

<BODY>
common stuff, e.g. title
<TABLE><TR><TD>
stuff for first column
</TD><TD>
stuff for second column
</TD></TR></TABLE>
</BODY>

This can be demonstrated by applying the patch cuesheet-patch.txt which alters the default lyric cue-sheet, starting the second column on the middle break. It would be really nice if the SquareDesk lyrics editor could have a button to split into two columns at the current mouse location. cuesheet-patch.txt

mpogue2 commented 1 year ago

Interesting idea, but I think this will break the Lyrics > Auto-scroll cuesheet feature.

Just brainstorming here:

Option 1) It might be possible to automatically change cuesheets to 2-column (maybe just on playback?). Then, a preference "[X] Use 2 columns for cuesheet playback" or similar. This still breaks Auto-scroll in the same way, but that's a solvable problem too. So, single column for Editing (no need to change the editor to be able to convert or edit 2-column stuff), 2-column for playback (if and only if preference is checked).

Option 2) Provide editing feature to make 1-column into 2-column. Automatically turn OFF Auto-scroll for 2-column cuesheets. (This seems a little counterintuitive to me, because the Auto-scroll Cuesheet checkbox could be checked but not used, but I'm just enumerating options here...)

sharmanr commented 1 year ago

Hi Mike.

I hadn’t played with AutoScroll; I’d seen a reference to it but had forgotten about it. I just tried it — very clever! I see if you move the playback bar it jumps correspondingly!!! Presumably it means you have to explicitly write all 7 parts in the cuesheet for it to work. Now I see why your example Make Cuesheets By Something was so long.

I agree 2-column mode is incompatible with autoscroll — you can’t have both at the same time.

With Squareview, I often had the opener/break/closer on the left and one or two figures on the right, or something like that. One advantage of that is that it’s easy to change the figure or figures to suit what is appropriate that night; for use with autoscroll you’d have to change all of them which is a little annoying.

Regarding your option 1, I don’t see why just on playback. The editor works fine editing 2 column lyric sheets as it is. You can even do things like cut part from the left, paste it to the right side, and so on. It works a treat.

Option 2 has two things: (a) changing 1 column to 2 column and (b) disabling auto-scroll for 2-column. I think it would be useful to have (b) even if (a) were not done. It would have to assume a standard way of writing 2 column sheets, perhaps simply searching for “” would be sufficient.

Richard

On Nov 11, 2022, at 9:42 PM, Mike Pogue @.***> wrote:

Interesting idea, but I think this will break the Lyrics > Auto-scroll cuesheet feature.

Just brainstorming here:

Option 1) It might be possible to automatically change cuesheets to 2-column (maybe just on playback?). Then, a preference "[X] Use 2 columns for cuesheet playback" or similar. This still breaks Auto-scroll in the same way, but that's a solvable problem too. So, single column for Editing (no need to change the editor to be able to convert or edit 2-column stuff), 2-column for playback (if and only if preference is checked).

Option 2) Provide editing feature to make 1-column into 2-column. Automatically turn OFF Auto-scroll for 2-column cuesheets. (This seems a little counterintuitive to me, because the Auto-scroll Cuesheet checkbox could be checked but not used, but I'm just enumerating options here...)

— Reply to this email directly, view it on GitHub https://github.com/mpogue2/SquareDesk/issues/728#issuecomment-1312375393, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASFRXOM7VYQP4NM3SSFLSOTWH4U4DANCNFSM6AAAAAAR4GVFH4. You are receiving this because you authored the thread.

sharmanr commented 1 year ago

Entering feature creep mode... When editing a lyric sheet with say a figure, have a key or button to duplicate the current figure to figure 2 or 3 or 4; similarly something to duplicate an opener to break or closer. Then one could write a simple opener and figure then transform it into a complete 7 segment things all ready for autoscroll!

mpogue2 commented 1 year ago

I didn't know that the editor worked in 2-column mode! It might require (as you suggested) a way to go from 1 to 2 column mode (and back again). I do like the idea of having more up on the screen at once, e.g. OPENER/BREAK/CLOSER on the left, and FIGURE(S) on the right. I'll have to try that and see if it fits on the screen all at the same time. I think I have another Feature Suggestion somewhere that actually would allow for highlighting in such a case anyway... (highlighting by actual highlighting, but aware that OPENER/MIDDLE BREAK refers to a single section having TWO meanings).... intriguing possibilities here!

mpogue2 commented 1 year ago

Also see #722 for some similar ideas!

danlyke commented 1 year ago

I've wanted a second column in cue sheets to store my singing call figures. Have a second document there that may or may not be linked to the song, where we can display choreo notes, feels super useful,.

mpogue2 commented 1 year ago

This brings up something else that now bugs me. After thinking about this more, I now think there's a more serious UX problem here with the default cuesheets in general: If there is any match (and usually there is nowadays!), then the default cuesheet won't show up at all.

This suggests an alternate way of fixing that part of this, while preserving the existing one column layout.

Option 3: add a new menu option

File > New Cuesheet > Single Column
                    > Double Column

Then, we'll provide two separate templates, and either (or all, if we find them by regex) can be loaded into the menu item at startup time, and the user can choose which template to use. Pick a template, modify, then do Save Lyrics... or Save Lyrics As..., and it is added to the list for that singing call (if it matches, which it will do, if you named it something that matches).

Then, for a complete solution, we probably will still want Option 2's Toggle 1/2 column (perhaps a menu item only, since this is probably pretty rarely used), and Option 1's "make auto-scroll work correctly for double column cuesheets" (as per #143).

We might also want to delete the default sequence sheet for Patter, since I don't think anybody has ever used it, and it will be obsoleted by the Sequence Editor in the long term anyway (James Thompson is starting to look at this, using the Helper codebase as a start, located here).

sharmanr commented 1 year ago

That's nice. I like the idea of being able to sometimes ignore an existing cuesheet and use a template.

sharmanr commented 1 year ago

I found a minor problem with 2-column cuesheets. It seems that QTextDocument inserts a <P> before a <TABLE>. So if the line before the "<Table>", typically the title/label line, happens to end with a <BR> there is an extra line between the title and the beginning of the lyrics.
You can edit out in SquareDesk but it comes back in! You need to remove that <BR> with an external edit (which presumably is how you put the <table> there in the first place). (Though if there ever is a SquareDesk feature to "split" a cuesheet into 2-columns the <BR> before the <TABLE> should be removed!)

Edited by @mpogue2 so that the less than and greater than symbols appear properly.

mpogue2 commented 1 year ago

I think I have a slightly better way to make new cuesheets (currently missing from the UX). See this entry.

I'm currently adding a NEW button to the SD Current Sequence pane, as part of making SD ready for C1 sequence development. I think adding a NEW button right next to UNLOCK on the cuesheet editor, with a context menu for New > Single Column | Double Column, will work pretty well. We might ALSO want to add it to the Lyrics menu, but adding a NEW button right next to UNLOCK is probably a good idea.

sharmanr commented 1 year ago

That's nice. It would handle the case where there was a cuesheet already but we want a different one, as well as the case where there wasn't one.

danlyke commented 1 year ago

I'd like to be able to pull up a second column with different material in it, eg: singing call figures.

mpogue2 commented 1 year ago

@sharmanr I think we could also make this extensible, that is, any file that has a name of the form "lyrics.template.foo.html" would be populated into the NEW context menu as "foo" (and into the main menu, if we do that).

So, "lyrics.template.Single Column.htm" and "lyrics.template.Double Column.htm" would be the built in templates (that come with SquareDesk), but user could add more by just sticking more templates into the lyrics folder of the musicDir. The names (e.g. "foo") would be sorted into alphanumeric order, to provide a consistent context menu ordering, or we could even make the filenames "<order>.lyrics.template.<name>.htm", if the fact that "Double Column" alphabetically sorts before "Single Column" disturbs our sense of order.... :-)

Or something like that.

We're getting pretty fancy now, but in this case stuff like locating the template files is a couple LOC in a loop, and sorting is one LOC, and creating the context menu is a couple of LOC in a loop, so this isn't a super complex thing to write or support.

mpogue2 commented 4 months ago

Either a NEW button, or list all the templates in the cuesheet dropdown menu? See user request in #1122.

mpogue2 commented 3 months ago

OK, I've made an attempt to implement this feature:

Commit: c1b71d0b50c8ae3e5980c3a799819d026faa56d5

We already had the 2-column cuesheet template in /lyrics/templates, this just makes it a lot easier to use all of the templates, because there's much less manual effort.