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

[myank] Fix insertZerothMeasure and allow line yank for anacruses #84

Merged
merged 5 commits into from
Dec 12, 2023

Conversation

WolfgangDrescher
Copy link
Contributor

Closes #83

@WolfgangDrescher
Copy link
Contributor Author

Currently it is not possible to myank with -l option, if a kern file does not have any measure numbers (e.g. https://github.com/craigsapp/bach-370-chorales/blob/94734465d7e71857a9233d04f3431c72c461ef0e/kern/chor087.krn)

myank -I -l 22-39 will throw Error: There are no measure numbers present in the data although it is not important for a myank with the lines option enables whether there are measure numbers or not.

My current approach to this is to change in Tool_myank::insertZerothMeasure:

if (stopline < 0 && !getBoolean("lines")) {

and in Tool_myank::expandMeasureOutList

if (maxmeasure <= 0 && !getBoolean("lines")) {

But it's not working yet…

# Conflicts:
#	min/humlib.cpp
#	min/humlib.h
@craigsapp
Copy link
Owner

What is the status of this PR? I see "But it's not working yet…", so I should be ignoring it for now? :-)

@WolfgangDrescher
Copy link
Contributor Author

It's actually another problem than the one I fixed in this PR. Should have opened another issue or PR. However, I managed to find a way to fix the problem with myank -l when there are no measure numbers encoded.

If in Tool_myank::getMeasureStartStop the measurelist vector does not have any elements and the -l option is used, it will add a measure to measurelist with the whole kern data where start is 0 and stop is dataend.

It's ready for review now.

@WolfgangDrescher
Copy link
Contributor Author

Is there anything I need to change in this PR? From my side, it's ready to merge.

@craigsapp craigsapp merged commit 83d17e1 into craigsapp:master Dec 12, 2023
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

Successfully merging this pull request may close these issues.

[myank] Pickups do not work
2 participants