bugDenemo - Bugs: bug #27968, Split measure-fix

 
 

bug #27968: Split measure-fix

Submitter:  None
Submitted:  Sun 08 Nov 2009 04:53:18 AM UTC
   
 
Category:  None 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
   

Tue 17 Nov 2009 05:52:32 PM UTC, comment #5: 

Just to prevent the problem described in comment #3 with this script in the next version, root/actions/menus/ObjectMenu/MeasureMenu/SplitMeasure should be modified to use the new commands.  Not being able to test them to check their behavior, here's my best guess:

(d-SetMark)
(if (d-MeasureRight)
(begin (d-CursorLeft)
(d-Cut)
(d-CursorRight)
(d-InsertMeasureBefore)
)
(begin
(d-GoToEnd)
(d-Cut)
(d-InsertMeasureAfter)
(d-MeasureRight)
)
)
(d-Paste)

The changes are in the (d-InsertMeasureBefore) and (d-InsertMeasureAfter) commands.  As long as InsertMeasureBefore puts the cursor into the newly inserted measure, and the two new commands only affect one staff,I think this will work properly.  If InsertMeasureBefore doesn't put the cursor into the new measure, probably (d-MeasureLeft) right after (d-InsertMeasureBefore) should give the right behavior.

Anonymous
Thu 12 Nov 2009 09:00:25 AM UTC, comment #4: 

I have add InsertMeasureBefore and After for putting measures in just one staff.

Richard Shann <rshann>
Group administrator
Thu 12 Nov 2009 04:03:13 AM UTC, comment #3: 

This newer script has a problem.  The command InsertMeasure inserts a measure in all staffs.  The result is that all staffs, other than the one you execute SplitMeasure in, end up with an empty measure.  Is there a command to Insert a measure in one staff?  For scripts it's useful to have.
Also, DeleteMeasure just deletes the measure on one staff.  Perhaps the least confusing thing to do would be to introduce a new command, InsertMeasureAllStaffs, and any existing reference to InsertMeasure would be changed to the AllStaffs version to avoid changing behavior of stuff already written.  Maybe the same could be done with AppendMeasure.
Just a suggestion. 

Anonymous
Sun 08 Nov 2009 10:08:29 AM UTC, comment #2: 

Thank you! It is in git now.

Richard Shann <rshann>
Group administrator
Sun 08 Nov 2009 05:04:52 AM UTC, comment #1: 

I think the problem with the original command is when you're splitting measures and the previous one is not full.  E.g., enter
4 c quarter notes.  Split between the 2nd and third, now you have two incomplete measures.  Split the second measure, and the first note of the second measure now joins the first measure, and there's a blank measure in between.

Anonymous
Sun 08 Nov 2009 04:53:18 AM UTC, original submission:  

It seems that using the prescripted command SplitMeasure frequently leads to an empty measure appearing in between, or the measure you're trying to split merging with the previous.  I've written this script that appears to work:

(d-SetMark)
(if   (d-MeasureRight) 
   (begin  (d-CursorLeft) 
   (d-Cut)
   (d-CursorRight)
   (d-InsertMeasure)
   )
   (begin
   (d-GoToEnd)
   (d-Cut)
(d-AppendMeasure)
(d-MeasureRight)
)
 )
(d-Paste)

The condition on MeasureRight is for when you're in the final measure of the staff.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by steele (Updated the item)
  • -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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-12-04 steele Open/ClosedOpen Closed
    2009-11-08 rshann StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code