Incipit bar plug-in

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Incipit bar plug-in

subcontrabombarde
Dear ManuScript experts,

I'd like to automate the repetitive task of creating an empty "Incipit bar"
which I need very frequently for scholarly editions. I have attached a
picture of the desired outcome (the empty bar will then be filled with
historical clefs and note symbols, put in as text objects).

<http://sibelius-manuscript-plug-in-developers.3224780.n2.nabble.com/file/t394921/incipit.png>

In order to achieve the desired outcome by means of a plug-in, the first
four inspector values in the "Bar" section need to be manipulated:
- Brackets
- First Barline
- Clef
- Key signature
Is there any way to do this by using the ManuScript language?

If not, can anyone think of a feasible workaround?
For example: Would it be possible to cross-copy an "Incipit bar" from a
template file with all the necessary settings preserved in the copy process?

Thanks in advance for your help!
Best wishes,
Tobias



--
Sent from: http://sibelius-manuscript-plug-in-developers.3224780.n2.nabble.com/

_______________________________________________
Plugin-dev mailing list
[hidden email]
http://lists.avid.com/mailman/listinfo/plugin-dev_lists.avid.com
Reply | Threaded
Open this post in threaded view
|

Re: Incipit bar plug-in

johngm
Not completely sure I understand what you're trying to do.  Is it simply a
matter of creating an absolutely plain empty bar, no bar lines or anything?
The "instrument" names ahead of the bar and the braces on the system after
the bar are already in place, and you just want to insert the completely
empty bar between the instrument names and the rest of the system? (or
perhaps I should say move all those properties from the first bar to the
second?)

Assuming you're doing that now using normal operations with the Sibelius
menus, there's a good chance you could create a plugin that would do the
same thing.  Since I'm not sure how to go about creating an incipit bar like
that manually, I'm not sure how you'd do it in Manuscript, but you can
certainly use Manuscript to read and set properties for any bar in a score.
If all you're doing is removing properties from the first bar and adding
them to the second bar, there's a good chance you could that using
Manuscript.

John Mainwaring
[hidden email]

-----Original Message-----
From: Plugin-dev <[hidden email]> On Behalf Of
subcontrabombarde
Sent: Monday, July 16, 2018 7:33 PM
To: [hidden email]
Subject: [Plugin-dev] Incipit bar plug-in

Dear ManuScript experts,

I'd like to automate the repetitive task of creating an empty "Incipit bar"
which I need very frequently for scholarly editions. I have attached a
picture of the desired outcome (the empty bar will then be filled with
historical clefs and note symbols, put in as text objects).

<http://sibelius-manuscript-plug-in-developers.3224780.n2.nabble.com/file/t3
94921/incipit.png>

In order to achieve the desired outcome by means of a plug-in, the first
four inspector values in the "Bar" section need to be manipulated:
- Brackets
- First Barline
- Clef
- Key signature
Is there any way to do this by using the ManuScript language?

If not, can anyone think of a feasible workaround?
For example: Would it be possible to cross-copy an "Incipit bar" from a
template file with all the necessary settings preserved in the copy process?

Thanks in advance for your help!
Best wishes,
Tobias



--
Sent from:
http://sibelius-manuscript-plug-in-developers.3224780.n2.nabble.com/

_______________________________________________
Plugin-dev mailing list
[hidden email]
http://lists.avid.com/mailman/listinfo/plugin-dev_lists.avid.com


_______________________________________________
Plugin-dev mailing list
[hidden email]
http://lists.avid.com/mailman/listinfo/plugin-dev_lists.avid.com
Reply | Threaded
Open this post in threaded view
|

Re: Incipit bar plug-in

Dave Foster
In reply to this post by subcontrabombarde
Hi Tobias,

As I understand it, the workflow that you're trying to automate is the following (walk it through in Sibelius to check that it reproduces your image):

1. Create a single bar at the start of the piece
2. System select the (new) first bar
3. Uncheck "Initial barline" in the inspector
4. Uncheck "Clefs" in the inspector
5. Uncheck "Key Signature" in the inspector
6. Notations / Barlines / Invisible
7. Select all rests in bar 1
8. Hide
9. System select the second bar
10. Change "Gap before bar" to 2 in the inspector

This seems to work for me - you don't need to bother with the "Brackets" checkbox, as losing the initial barlines automatically hides this anyway. 

In terms of automating via a plugin, we are restricted by what is exposed to the Manuscript language. Notably, some Inspector items are currently available for manipulation in a plugin, and here steps 1-5 are not possible with a plugin. The following code will do steps 6-10:

score = Sibelius.ActiveScore;
// 6.
score.SystemStaff.NthBar(1).AddSpecialBarline(5);
// 7. & 8.
for each staff in score
{
for each BarRest br in staff.NthBar(1)
{
br.Hidden = true;
}
}
// 9. & 10.
score.SystemStaff.NthBar(2).GapBefore = 2;

return 1;

I'm sure someone else will point out if I've missed something and that some of the required values are, in fact, exposed. You could fudge the clefs and key signatures by creating blank objects in the new bar 1, reseting them in bar 2, then hiding the remnants, but if you've got to manually un-check the "Initial barline" thing anyway, you may as well do all 3!

I don't think it would work to copy from another file, as these values don't seem to be copied and pasted.

Hope this helps,

Dave


On 17 Jul 2018, at 00:33, subcontrabombarde <[hidden email]> wrote:

Dear ManuScript experts,

I'd like to automate the repetitive task of creating an empty "Incipit bar"
which I need very frequently for scholarly editions. I have attached a
picture of the desired outcome (the empty bar will then be filled with
historical clefs and note symbols, put in as text objects).

<http://sibelius-manuscript-plug-in-developers.3224780.n2.nabble.com/file/t394921/incipit.png>

In order to achieve the desired outcome by means of a plug-in, the first
four inspector values in the "Bar" section need to be manipulated:
- Brackets
- First Barline
- Clef
- Key signature
Is there any way to do this by using the ManuScript language?

If not, can anyone think of a feasible workaround?
For example: Would it be possible to cross-copy an "Incipit bar" from a
template file with all the necessary settings preserved in the copy process?

Thanks in advance for your help!
Best wishes,
Tobias



--
Sent from: http://sibelius-manuscript-plug-in-developers.3224780.n2.nabble.com/

_______________________________________________
Plugin-dev mailing list
[hidden email]
http://lists.avid.com/mailman/listinfo/plugin-dev_lists.avid.com


_______________________________________________
Plugin-dev mailing list
[hidden email]
http://lists.avid.com/mailman/listinfo/plugin-dev_lists.avid.com
Reply | Threaded
Open this post in threaded view
|

Re: Incipit bar plug-in

subcontrabombarde
Hi John and Dave,

Thanks a lot for your help!

Dave's workflow is exactly what I do manually each time.
There are two actions that would be helpful to add:

1b. System select (new bar -1), check Inspector value "section end" in order
to make the instrument names appear before the next bar
1c. Create a system break after (new bar -1) in order to start a new system
with the instrument names and the empty bar

Can anybody confirm that there is really no way of manipulating the
inspector values "Initial barline", "Clefs" and "Key signature" by using
ManuScript?

Thanks and best wishes,
Tobias




--
Sent from: http://sibelius-manuscript-plug-in-developers.3224780.n2.nabble.com/

_______________________________________________
Plugin-dev mailing list
[hidden email]
http://lists.avid.com/mailman/listinfo/plugin-dev_lists.avid.com
Reply | Threaded
Open this post in threaded view
|

Re: Incipit bar plug-in

johngm
The bar object has several methods that manipulate the barline, clef and key
signature.

From the document Sibelius_2018.1_ManuScript_Language_Guide.pdf:
AddClef(pos,concert pitch clef[,transposed pitch clef])
AddInstrumentChange(pos,styleID[,add_clef[,show_text[,text_label[,show_warni
ng[,warning_label,
[full_instrument_name[, short_instrument_name]]]]]])
AddKeySignature(pos,num sharps,major key[,add double barline[,hidden[,one
staff only]]])
AddTimeSignature(top,bottom,allow cautionary,rewrite music[,use symbol])

You definitely want to get an up to date version of the manual.

There are also "get" routines for some of these things, and others are
defined as variables (to which you can assign values in many cases), such as
GapAfter and GapBefore.

There's a Bracket object as well.

They're all described in the somewhat opaque style of the ManuScript
Language Guide, so it would be a non-trivial task to figure out whether you
can do what you want with them.  You would really have to need to do this a
LOT to justify figuring out how to write a plug-in rather than doing it by
hand, score after score. On the other hand, you would justifiably feel a
great sense of satisfaction if you manage to do it.  It would be a real
accomplishment to do it in a general way (one that works for any number of
staves in your score for example), but it seems likely that you could get at
least most of the way there and perhaps leave a few details to clean up by
hand.

You would have to keep an open mind about how you want it to work.  For
instance, I set out to write a plug-in to *convert* a score with swing
written out in 12/8 time to a score in 4/4 time without the swing (triplet
quarter-eighth rewritten as 2 eighth notes), but soon realized that it would
be much better to *copy* the original into a brand-new score in the new time
signature.

Good luck with the project.

John Mainwaring
[hidden email]

-----Original Message-----
From: Plugin-dev <[hidden email]> On Behalf Of
subcontrabombarde
Sent: Wednesday, July 18, 2018 6:51 PM
To: [hidden email]
Subject: Re: [Plugin-dev] Incipit bar plug-in

Hi John and Dave,

Thanks a lot for your help!

Dave's workflow is exactly what I do manually each time.
There are two actions that would be helpful to add:

1b. System select (new bar -1), check Inspector value "section end" in order
to make the instrument names appear before the next bar 1c. Create a system
break after (new bar -1) in order to start a new system with the instrument
names and the empty bar

Can anybody confirm that there is really no way of manipulating the
inspector values "Initial barline", "Clefs" and "Key signature" by using
ManuScript?

Thanks and best wishes,
Tobias




--
Sent from:
http://sibelius-manuscript-plug-in-developers.3224780.n2.nabble.com/

_______________________________________________
Plugin-dev mailing list
[hidden email]
http://lists.avid.com/mailman/listinfo/plugin-dev_lists.avid.com


_______________________________________________
Plugin-dev mailing list
[hidden email]
http://lists.avid.com/mailman/listinfo/plugin-dev_lists.avid.com