bugDenemo - Bugs: bug #29554, Rebar-script, and script fixes for...

 
 

bug #29554: Rebar-script, and script fixes for 2 commands

Submitter:  None
Submitted:  Thu 15 Apr 2010 02:45:38 AM UTC
   
 
Category:  Feature request Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 13 Aug 2010 08:10:57 AM UTC, comment #14: 

now in git

Richard Shann <rshann>
Group administrator
Thu 12 Aug 2010 06:10:57 PM UTC, comment #13: 

This thread contains the updated Rebar.  It fixes the problem denemo has counting tuplets that begin in one bar and continue into the next by terminating all tuplets at the end of each bar and beginning them again in the next.  Now also, hitting cancel actually cancels.  It also works with both Anacrusis and Shortmeasure tags.  The up-to-date file is the one posted on July 24, (file #21044).
-Dan W.

Anonymous
Sat 24 Jul 2010 01:54:38 AM UTC, comment #12: 

Yet another bug was found and fixed.  If you hit cancel during a prompt, it ignored this and kept going, much to my dismay at the time as it split notes across the barline relentlessly.  This should be fixed in this version.
-DW

(file #21044)

Anonymous
Fri 23 Jul 2010 10:07:40 PM UTC, comment #11: 

A minor bug in the scrip was fixed--it was due to denemo's ignoring tupletstarts from previous bars when calculating whether bar is full.  Fixing this led to adding the feature to this command that it ends tuplets at the end of each bar and restarts them in the next, if the tuplet would have crossed the bar.-DW

Anonymous
Fri 23 Jul 2010 09:53:00 PM UTC, comment #10: 

I should clarify, it works with both tags, Anacrusis and ShortMeasure. 
-DW

Anonymous
Fri 23 Jul 2010 09:48:51 PM UTC, comment #9: 

I've improved the Rebar script.  I'm not even sure it was working after some of the changes made to denemo recently.

1.It has its own renamed SplitMeasure and DeleteBarline commands, so that if those other commands are changed its not affected.  (This might have been an issue when these were changed)

2.It works with the new renaming of Anacrusis to ShortMeasure.

3.It now stops when it can't correctly do a measure due to the missing duration requiring the insertion of a tuplet, and lets you know why it stopped. (e.g., insert two quarters, then two eight triplets, then two quarters.  It will stop on that measure)  This would require work if it's worth it, but it seems that it's best for the user to handle these measures.  Rebarring them might just make a mess when a note was forgotten inside a tuplet.

4.I tested it on some pretty pathological cases and it works on those, but there are probably some weird unforeseen scenarios.  The script is attached, taken from my .denemo directory.

-Dan W.

(file #21041)

Anonymous
Mon 28 Jun 2010 07:44:37 PM UTC, comment #8: 

Thank you very much for your hard work. The scripts are now in git, in time for the upcoming 0.8.18 release.
I have removed the paste bug lines and all seems well.

Richard Shann <rshann>
Group administrator
Thu 06 May 2010 03:44:33 PM UTC, comment #7: 

The script DOES have support for splitting notes across barlines (including tuplets), contrary to the impression when reading the first paragraph in previous comment.
-DW

Anonymous
Thu 06 May 2010 03:38:26 PM UTC, comment #6: 

Guys,
  I have a version of Rebar that looks good to me.  It has support for time signature changes, anacrusis, grace notes, arbitrary tuplets--but not nested tuplets, splitting notes across barlines (including tuplets), allows the user to decide to rebar all staffs or just the current one from the cursor or from the beginning.

[Modifying the script to allow nested tuplets probably won't be too hard.  There's already a variable NumTuplets that counts the nesting; basically you'd have to convert TupletScaleFactor from a single number to a list of numbers that would function as a stack, adding to it as you encountered the next nesting of tuplets.]

This is where I'm going to leave the script.  Although it can be fun as a challenge, programming really isn't for me.  I hope this is a helpful contribution and thanks for all the work you guys do on this project.  I hope the code comments are helpful if you decide to fix or improve the script; there's a debugger still in the Rebar script that currently is not called but might be helpful for debugging the nested tuplets if you decide to do that.
The two supporting scripts, SplitMeasure and DeleteBarline, are included for completeness.  NOTE: SplitMeasure is in now yet another version; it leaves the cursor at the beginning of the second bar; if this version is not used, Rebar won't work.  Same goes for DeleteBarline, although that version has stayed the same over the course of the Rebar stuff.
There's a strange denemo file to test the Rebar function.  It works fine on my denemo; if it doesn't go on yours, probably there's some issue with the SplitMeasure or DeleteBarline; make sure it's using these versions I'm attaching.
There is a workaround for the paste bug in the Rebar script.  When the bug is fixed, it tells you exactly what to delete in the script comments.
To avoid any doubt, consider these contributions to be public domain, and convert to GPL version 2 or 3 as you wish.
Be well, and thanks for all the support for grace notes, etc.,
-Dan W.

(file #20466, file #20467, file #20468, file #20469)

Anonymous
Fri 23 Apr 2010 01:04:33 PM UTC, comment #5: 

d-GetDurationInTicks now yields 0 for grace notes. Does this help?

Richard Shann <rshann>
Group administrator
Fri 16 Apr 2010 08:14:08 PM UTC, comment #4: 

This should be a good, usable version of Adjust the Barlines/ Rebar.
It seems that the bugs I wrote of were due to overwriting the default scripts and somehow Denemo was still using the old versions-maybe after I logged in the second time it did this?  Using Windows XP so who knows.  Didn't take time to find out.  But I don't think it should be a problem once you update the default scripts to these versions.  I'm including a little test denemo file to try it all out with so you see how it works.

Remember, the SplitMeasure and DeleteBarline scripts need to be updated for Rebar to work.  I think these two are functioning properly now so hopefully the caveats "Does not work in all situations!" is obsolete.  If not, what are the problem situations where these commands don't work?
I updated the Rebar to allow the user to select to Rebar the current staff entirely or from the cursor onward, or to Rebar all staves.  The cursor position is popped at the end to try to put it back where it was but this is only an approximation when the barlines have shifted.
Also, when TimeSig changes are encountered, for now, ie until TimeSigs can be read in by scheme, the user is asked to enter it manually.  It might have to be confirmed a couple of times in the same bar if that bar needs multiple passes to make it correct, but you can just hit enter.
Still no support for tuplets, or grace notes.  This can be fixed when scheme support for identifying these is there.
When various things are fixed/added, it hopefully will be easy to find the areas in the script to update; I put a lot of comments in.
-Dan W.

(file #20242, file #20243, file #20244, file #20245)

Anonymous
Fri 16 Apr 2010 12:57:53 AM UTC, comment #3: 

Some weird bugs are appearing.  Ignore this script for the time, but hopefully it'll be ready soon.  Sorry--
-DW

Anonymous
Thu 15 Apr 2010 03:02:52 AM UTC, comment #2: 

Not sure why when I download it it doesn't extract.  Here are the raw files.

(file #20223, file #20224, file #20225)

Anonymous
Thu 15 Apr 2010 03:00:33 AM UTC, comment #1: 

Sorry, I don't think the file I attached is readable.  Try this one-
Dan W.

(file #20222)

Anonymous
Thu 15 Apr 2010 02:45:38 AM UTC, original submission:  

This rebar script is fairly functional.  It depends upon fixing two other scripts, the ones for(d-DeleteBarline) and (d-SplitMeasure).  These improved scripts are included as well.

To use the rebar, you currently have to type in the time signature.  It also stops when you come to a timesig change.

You type in the timesig like 4/4 or 3/4.
By default the rebar does not go to the beginning of the staff, nor does it do more than one staff or voice.  But that would be a trivial thing to adapt.
When the measure is overfull and a note needs to be divided, the user is prompted whether to split this note, split all the rest, or stop and deal with it personally.
It includes a work-around for the paste bug but the lines are all tagged with FIXME and PASTE BUG so it'll be easy to just delete those when the bug's fixed.
There are a lot of comments so that it can be understood.
Obviously this can be improved when we can read in via scheme the initial timesig and changes.
Also, I wonder if it would be desirable to have the function automatically simplify bizarre tied note combination, like
d16 ~ d8. to just d4
I've given it a few tests but it probably needs a lot more.
It'll need to be upgraded to work with tuplets definitely, and grace notes as well, and who knows what else.  So this is kind of an alpha version.
Let me know what you think and especially if there are areas the scheme can be improved.  I could probably have used case instead of if to some advantage for one.
-Dan W.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #21044:  ReBar added by None (15KiB - application/octet-stream)
file #21041:  ReBar added by None (14KiB - application/octet-stream)
file #20466:  ReBar added by None (13KiB - application/octet-stream)
file #20467:  DeleteBarline added by None (905B - application/octet-stream)
file #20468:  SplitMeasure added by None (942B - application/octet-stream)
file #20469:  RebarTest.denemo added by None (1KiB - application/octet-stream)
file #20242:  DeleteBarline added by None (905B - application/octet-stream - These are the most up-to-date as of 4-16-10. Don't use older ones.)
file #20243:  ReBar added by None (10KiB - application/octet-stream - These are the most up-to-date as of 4-16-10. Don't use older ones.)
file #20244:  RebarTest.denemo added by None (1KiB - application/octet-stream - These are the most up-to-date as of 4-16-10. Don't use older ones.)
file #20245:  SplitMeasure added by None (849B - application/octet-stream - These are the most up-to-date as of 4-16-10. Don't use older ones.)
file #20223:  DeleteBarline added by None (905B - application/octet-stream)
file #20224:  SplitMeasure added by None (849B - application/octet-stream)
file #20225:  ReBar added by None (8KiB - application/octet-stream)
file #20222:  Fixed Denemo Commands.zip added by None (5KiB - application/zip)
file #20221:  Fixed Denemo Commands.zip added by None (5KiB - application/zip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rshann (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 17 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-13 rshann Open/ClosedOpen Closed
    2010-07-24 None Attached File- Added ReBar, #21044
    2010-07-23 None Attached File- Added ReBar, #21041
    2010-06-28 rshann StatusNone Fixed
    2010-05-06 None Attached File- Added ReBar, #20466
        Attached File- Added DeleteBarline, #20467
        Attached File- Added SplitMeasure, #20468
        Attached File- Added RebarTest.denemo, #20469
    2010-04-16 None Attached File- Added DeleteBarline, #20242
        Attached File- Added ReBar, #20243
        Attached File- Added RebarTest.denemo, #20244
        Attached File- Added SplitMeasure, #20245
    2010-04-15 None Attached File- Added DeleteBarline, #20223
        Attached File- Added SplitMeasure, #20224
        Attached File- Added ReBar, #20225
    2010-04-15 None Attached File- Added Fixed Denemo Commands.zip, #20222
    2010-04-15 None Attached File- Added Fixed Denemo Commands.zip, #20221

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code