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

Duplicate Scripts? #690

Open
rpatters1 opened this issue Feb 10, 2024 · 15 comments
Open

Duplicate Scripts? #690

rpatters1 opened this issue Feb 10, 2024 · 15 comments

Comments

@rpatters1
Copy link
Collaborator

What is the difference between cue_notes_overlay.lua and cue_notes_create.lua. From the Notes it seems like they do more or less the same thing. Do we need both?

@rpatters1
Copy link
Collaborator Author

This question is mainly directed at @cv-on-hub and @jwink75.

@cv-on-hub
Copy link
Contributor

cue_notes_create.lua will only create cues on empty staves; cue_notes_overlay.lua produces cues "over" existing music (hence "overlay") as well as on empty measure. I personally don't use "create" any more and find "overlay" more versatile and simpler to use.

Because of the need to avoid existing music in overlay I've removed automated stem-flipping since the logic relied on the target being empty. There are so many other mitigating factors in overlaying that such automation merely adds operational complexity with little or no advantage. Manual corrections will be required.

For my money cue_notes_create.lua can happily be removed.

@jwink75
Copy link
Collaborator

jwink75 commented Feb 10, 2024 via email

@asherber
Copy link
Member

Stem auto flipping (stems away from center) is how I always do cues; I would be very sad to see it go.

@cv-on-hub
Copy link
Contributor

cue_notes _create was made for and used in JetStream

You must be thinking of a different script. This cue_notes_create.lua was made expressly for the repo.

@cv-on-hub
Copy link
Contributor

auto flipping is how I always do cues

It makes sense on empty targets, but really none on targets containing music. This is the only argument I can imagine for keeping cue_notes_create.lua.

@rpatters1
Copy link
Collaborator Author

rpatters1 commented Feb 10, 2024

Is there not a way to include auto-flipping on empty measures in overlay?

@jwink75
Copy link
Collaborator

jwink75 commented Feb 10, 2024 via email

@asherber
Copy link
Member

I disagree that "away from middle" stems doesn't make sense when the target contains music.

Does it really add more complexity to the overlay script (I haven't looked)? I would think the logic would be exactly the same as in the create script, based strictly on the cues notes themselves.

@cv-on-hub
Copy link
Contributor

Does it really add more complexity to the overlay script

It adds operational complexity with the comparatively arcane distinction of freezing up, down, away, or none, which only makes sense when the measure is empty. (Plus the concomitant complexity of having to provide for the erasure of such freezing at a later date). "Overlay" uses the simple expedient of making target note stems oppose the chosen cue stem-direction - a simple, obvious and intelligible choice. Cues might need to be shifted some octaves to sit on the target clef/transposition. This demands trial and error in every scenario with absolutely no single "freeze" decision suiting all conditions.

You seem to be suggesting re-introducing the four freeze-options back in to only take effect in empty targets. Terribly messy for minimum gain! But an argument for retaining the "create" version and not introducing such complexity back in to "overlay".

@asherber
Copy link
Member

I'll have to play with the overlay script before adding anything else here--as I said, I haven't looked at it yet.

@jwink75
Copy link
Collaborator

jwink75 commented Feb 11, 2024 via email

@asherber
Copy link
Member

Okay, I used the overlay script a bit and took a look at its code. From what I can see, an auto stem feature would be perfectly plausible -- instead of specifying up or down stems for the cues (and flipping the target notes the other way), just let the algorithm decide cue stem direction, as it does in the create script. The only use case I can think of offhand where this wouldn't yield desired results is something like this:

image

The auto algorithm would see the cue notes lying above the center line and would want their stems to go up, and hence the target stems would go down. I think this is solvable in code, and even if it's not I would rather have an auto algorithm that works most of the time than not have it at all. But I understand if @cv-on-hub isn't interested in adding it.

In the larger scheme of things, this thread has made me think that we should be careful about removing "duplicate" scripts, unless one offers a true superset of the other's functionalities. If we were to remove the create script without adding the auto stem functionality to the overlay script, it's true that I could still maintain my personal copy of the create script, but that's something that's more complicated for a user who gets scripts from the website rather than working directly with the repo.

@cv-on-hub
Copy link
Contributor

But I understand if @cv-on-hub isn't interested in adding it.

That's true - I'm not. You are expecting immensely simpler source and destination material than I am, and contrary-wise I have found almost NO situation in real life in which an automated solution would have produced acceptable results in _overlay. Even when I used to use _create I never used automatic stem direction, finding better solutions in other ways, especially when clefs can be changed at the destination. Point taken about duplicate scripts, though obviously identical functionality should probably be discouraged. (These two clearly aren't identical).

@cv-on-hub
Copy link
Contributor

The consensus seems to be that cue_notes_overlay.lua and cue_notes_create.lua are sufficiently distinct to co-exist.

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

4 participants