Inserting empty bars. Manual adjustments after insertion point

Continuing the discussion from Inserting a blank page with empty measures in the middle of a piece:


introduction

The following post is not an attempt to blame anyone or anything. My sincere and only hope is that, after reading the lines I wrote, users confronting the same problem will be inspired to come up with their own – and maybe better – workarounds.

Here I go.


par. 1

One annoying thing about the score editor in Cubase is that the distance between staves (especially) and the number of bars per system can’t be preserved when inserting new bars in the beginning (or in the middle) of the project.


par. 2

As a workaround for the 1st annoying thing, @Alejo_Ponce, a user on this forum, asked himself: “What if the XML file of the layout is edited (Score Settings window / Layout page) and then imported back to Cubase?”

Unfortunately, his workaround needs a special software called Oxygen XML Editor. Weirdly enough though, it works.

Editing the XML file of the layout using Oxygen XML Editor (step-by-step). Credit goes to @Alejo_Ponce .
  1. Write on a piece of paper the value of these variables:
    • A. the system where the cursor was located before inserting new bars (for example: 4th system)
    • B. the number of empty systems from A (including A) to the last empty system (you need to count them)
    • C. the sum of A and B.
  2. Open the XML file in Oxigen XML Editor and go to Grid page (the “Grid” button is located at the bottom of the app window).
    • a. Open Quick Find… and type in “GrandStaff”. Then, hit Next two times.
      image
    • b. You’ll arrive here (see below screenshot). Look at the numbers that you jotted down. If A = 6, then you need to select all rows from row 6 to the last one.
      Hit cmd+c to copy these rows!
    • c. Look again at the numbers you wrote on the paper and check what you wrote at number C. If C = 25, then you click on 25 (entire row will get selected).
      Hit cmd+v to paste the rows !
    • d. Now you have a bar count offset in the XML that you edited. Save the changes and then import the XML file back to Cubase. Don’t freak out when you see something like in the following screenshot! The journey is not finished yet. Read further.

par. 3

After editing the XML file using @Alejo_Ponce’s method, we need to use the Number of Bars dialog to restore the bar count of every system starting with system number C.

GIF (Fixing an odd looking system using the Number of Bars dialog)

number of bars dialog


par. 4

The previous method is both time and energy consuming, which is why I wrote the following scripts. Please note that in order to make the scripts work on your MAC, you need to adjust them to fit your configuration.

2 scripts

barcos

barcore


outroduction

I’m open to suggestions, so any reply is more than welcome.

1 Like

Very interesting and nice work!
Although I can not test your script (Mac is not my cup of tea, sorry :blush:).

That being said, restoring number of bars is useful, but that’s not enough unfortunately. What we need is that, when a whole page is inserted in the middle of a score, ALL the layout settings of all following pages to be moved to the right by one page.

The big problem here is that the layout is firmly tied to the page ‘numbers’!

1 Like