newbie question

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

newbie question

hanstutschku

How call the 'Beam Groups' function from within a plugin with specific parameters?
I have a score where a lot of the 5/4 and 3/4 bars are not beamed in the way I would like.
Instead of going to every bar manually, I thought to scan through the score bar by bar from
within a plugin, retrieve the time sig, and then call 'Beam Groups' with specific parameters.

Any help appreciated

Thanks,
Hans

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

Re: newbie question

Bob Zawalich-3

Plugins do not have access to the beam groups command/structure. You can simulate it but it is a lot of work.

 

You can certainly find out the time signature using CurrentTimeSignature. You can determine the beat size from that, and you can process notes voice by voice and set the beams for individual notes. That is actually pretty tricky though. Note that there is no End Beam setting for BeamType. An End beam is typically a Continue beam that is followed by a start beam or a note or rest whose duration does not allow for a beam.

 

So it really depends on how much work you are willing to put into it. I see no easy way to do this.

 

Good luck

 

Bob

 


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

Re: newbie question

Martin Marris
In reply to this post by hanstutschku

>>I have a score where a lot of the 5/4 and 3/4 bars are not beamed in the way I would like.<<

 

Just thought I would mention the obvious ... have you tried redefining the time signature's beaming rule?

 

 

This works on a global basis for a new score, but I think that if the score already exists, you can change the beaming rule, select a passage, and then Reset Design to apply the rule selectively. (This will also reset the design of other parameters so it may not be that useful; it’s a brute-force approach.)

 

Martin

 


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

Re: newbie question

Bob Zawalich-3

If you are doing the work in Sib itself and not a plugin,  you can select bars with a specific time signature and then use Appearance> Reset Notes > Reset Beam Groups to set up the desired beaming for those bars.

 

This will at least not reset anything other than the beaming. Check out the section on beam groups in the reference.

 

There is no way to passage select non contiguous bars with the same time signature, so you will likely need to select bars manually. One could probably write a plugin that would select all the notes in bars with a specific time signature, but it would be a bit messy. I suspect that the manual method is probably the best unless you have a larger score with lots of time signature changes.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Martin Marris
Sent: Wednesday, September 28, 2016 2:53 AM
To: 'A mailing list for Sibelius plug-in developers' <[hidden email]>
Subject: Re: [Plugin-dev] newbie question

 

>>I have a score where a lot of the 5/4 and 3/4 bars are not beamed in the way I would like.<<

 

Just thought I would mention the obvious ... have you tried redefining the time signature's beaming rule?

 

 

This works on a global basis for a new score, but I think that if the score already exists, you can change the beaming rule, select a passage, and then Reset Design to apply the rule selectively. (This will also reset the design of other parameters so it may not be that useful; it’s a brute-force approach.)

 

Martin

 


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

Re: newbie question

hanstutschku
Thanks Bob and Martin for your answers.

Is was a large score with constant time signature changes. Here is what I came up with:
I wrote a plugin which would color all notes in all 5 4 bars. That helped to visually reference them.
Then I used KeyboardMaestro (on Mac) to record key strokes with the particular settings for
the bar subdivisions. I scrolled through the score, selected the bars individually, executed the keyboard master
script and went on to the next bar. After all 5 4 bars had been processed, I went on to the 3 4 bars etc etc.
It took me a couple of hours for a function I would think would be useful for others: resetting
the beaming for all bars of the same type in a score which has already music in there - or which was
imported through XML).

Bob, you have literally programmed hundreds of plugins for Sibelius. Did you ever come across the need
to call a Sibelius menu or function from within ManuScript? 
I could see a LOT of use for such a mechanism. 

thanks anyways
Best, Hans



On Sep 28, 2016, at 11:42 AM, Bob Zawalich <[hidden email]> wrote:

If you are doing the work in Sib itself and not a plugin,  you can select bars with a specific time signature and then use Appearance> Reset Notes > Reset Beam Groups to set up the desired beaming for those bars.
 
This will at least not reset anything other than the beaming. Check out the section on beam groups in the reference.
 
There is no way to passage select non contiguous bars with the same time signature, so you will likely need to select bars manually. One could probably write a plugin that would select all the notes in bars with a specific time signature, but it would be a bit messy. I suspect that the manual method is probably the best unless you have a larger score with lots of time signature changes.
 
 
From: [hidden email] [[hidden email]] On Behalf Of Martin Marris
Sent: Wednesday, September 28, 2016 2:53 AM
To: 'A mailing list for Sibelius plug-in developers' <[hidden email]>
Subject: Re: [Plugin-dev] newbie question
 
>>I have a score where a lot of the 5/4 and 3/4 bars are not beamed in the way I would like.<<
 
Just thought I would mention the obvious ... have you tried redefining the time signature's beaming rule?
 
<image001.png>
 
This works on a global basis for a new score, but I think that if the score already exists, you can change the beaming rule, select a passage, and then Reset Design to apply the rule selectively. (This will also reset the design of other parameters so it may not be that useful; it’s a brute-force approach.)
 
Martin
 
_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev


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

Re: newbie question

Bob Zawalich-3

The equivalent of a lot of the calls the user has access to in Sibelius are available to plugins, but not all of them are. They would get added one by one, and I spend many years working with Daniel trying to get more access to the internals of Sibelius.

 

I still ask the current team and from time to time little changes are made, but I don’t have an expectation that much will be done. Most people use an external application like Keyboard Maestro when they need that.

 

Sibelius is capable now of executing external programs and so one could conceive of calling Keyboard Maestro from a plugin, for example, but I suspect synchronization and  determining what had changed could be a real problem.

 

Even now there are lots of things you just can’t do in a plugin.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Hans Tutschku
Sent: Wednesday, September 28, 2016 9:08 AM
To: A mailing list for Sibelius plug-in developers <[hidden email]>
Subject: Re: [Plugin-dev] newbie question

 

Thanks Bob and Martin for your answers.

 

Is was a large score with constant time signature changes. Here is what I came up with:

I wrote a plugin which would color all notes in all 5 4 bars. That helped to visually reference them.

Then I used KeyboardMaestro (on Mac) to record key strokes with the particular settings for

the bar subdivisions. I scrolled through the score, selected the bars individually, executed the keyboard master

script and went on to the next bar. After all 5 4 bars had been processed, I went on to the 3 4 bars etc etc.

It took me a couple of hours for a function I would think would be useful for others: resetting

the beaming for all bars of the same type in a score which has already music in there - or which was

imported through XML).

 

Bob, you have literally programmed hundreds of plugins for Sibelius. Did you ever come across the need

to call a Sibelius menu or function from within ManuScript? 

I could see a LOT of use for such a mechanism. 

 

thanks anyways

Best, Hans

 

 

On Sep 28, 2016, at 11:42 AM, Bob Zawalich <[hidden email]> wrote:

 

If you are doing the work in Sib itself and not a plugin,  you can select bars with a specific time signature and then use Appearance> Reset Notes > Reset Beam Groups to set up the desired beaming for those bars.

 

This will at least not reset anything other than the beaming. Check out the section on beam groups in the reference.

 

There is no way to passage select non contiguous bars with the same time signature, so you will likely need to select bars manually. One could probably write a plugin that would select all the notes in bars with a specific time signature, but it would be a bit messy. I suspect that the manual method is probably the best unless you have a larger score with lots of time signature changes.

 

 

From: [hidden email] [[hidden email]] On Behalf Of Martin Marris
Sent: Wednesday, September 28, 2016 2:53 AM
To: 'A mailing list for Sibelius plug-in developers' <[hidden email]>
Subject: Re: [Plugin-dev] newbie question

 

>>I have a score where a lot of the 5/4 and 3/4 bars are not beamed in the way I would like.<<

 

Just thought I would mention the obvious ... have you tried redefining the time signature's beaming rule?

 

<image001.png>

 

This works on a global basis for a new score, but I think that if the score already exists, you can change the beaming rule, select a passage, and then Reset Design to apply the rule selectively. (This will also reset the design of other parameters so it may not be that useful; it’s a brute-force approach.)

 

Martin

 

_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev

 


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

Re: newbie question

Martin Marris
In reply to this post by hanstutschku
>> Did you ever come across the need to call a Sibelius menu or function from within ManuScript?<<

I know Bob will answer, but here’s my answer. It actually works better the other way around: you use a macro or automation program (on a Mac, I use QuickKeys; on a Pc , I use a pgram called AutoIt!) and use it in conjunction with Sibelius plugins. When QuickKeys/AutoIt! needs to run a plugin, it goes into the Sibelius Plugins menu to launch the ManuScript routine; but it can also, of course, launch an actual Sibelius menu command and thus do stuff that ManuScript can't. It is even possible to pass data between macro programs and ManuScript – for instance by creating a ManuScript dialogue that data can be pasted into, or by writing text files. I have written some routines that go back and forth between Sibelius and the external automation program thousands of times within a single session.

If you want to do it the other way around, i.e. by having ManuScript itself issue a menu command, you could have ManuScript execute an external macro program for this. In Windows, I have done this using a “watched folder” so that when ManuScript writes a file to that folder, an external routine written in AutoIt! is launched. In the more recent versions of Sibelius (7 onwards) it is actually possible for ManuScript to launch an external program off its own bat (no need for the “watched folder”), at least in the Windows version (I am not sure about Mac).

The problem with all of these solutions is that they are fragile and tend to be very UI-dependent. They work well for us, but only because we are in a controlled environment. We use literally hundreds of “hybrid” solutions (ManuScript in conjunction with external control).

The bad news is that starting with Sibelius 7, the Sibelius UI is written using a language called "Qt" and while this is an excellent system, it is almost totally opaque to external automation programs. You cannot "reach" its controls and fields in any direct way. So I have essentially given up on sophisticated automation of Sibelius 7 or later versions of Sibelius: if it cannot be done with ManuScript, it is difficult. If there is existing Sibelius keyboard shortcut, it's OK, but otherwise it is very hard. (Fortunately we still do about 90 percent of our work in Sibelius 6.)

There are external automation programs (Ranorex, Squish, etc.) that purport to be able to automate Qt dialogues but they only work with the release versions of Qt. Unfortunately the Qt used in Sibelius 7 was customized by Sibelius itself and is not compatible with these automation programs. I am hoping that the Qt used in more recent versions (8 and up) is or will be more "standard" -- but I haven't yet installed 8, so I don't know.

As Bob says, good luck with it!

Martin



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

Re: newbie question

Bob Zawalich-3
Martin is the person I ask when I want to know this sort of thing, so I agree with his assessment.

Sib 8 currently uses the same QT as Sib 7. There is apparently a project in the works to update to QT 5 but it is a long term project. I don't really have any idea what will be possible at that point, but I am not doing much new Sibelius work these days, so I doubt I will really get involved in it.


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

Re: newbie question

hanstutschku
In reply to this post by Martin Marris
Thank you both again very much for taking the time to explain the inner workings.
This all makes sense now.

Another route might be a ‘feature request’ to the Sibelius programmers directly to 
incorporate some way of resetting Beam Groups across all bars of the same type.
This is probably not on their radar as a lot of music does not have constant time signature changes
and one can easily select an entire section of music to reset the beaming.
But in contemporary music this does not tend to be the case. There are very frequent time signature
changes and for a long score it becomes a laborious process.

Anyway, I have my ‘workaround’ for now and will experiment with the next score to define
the time signatures and their Beam Groups before inputting music.

Best, Hans


Hans Tutschku
--------------------
Fanny P. Mason Professor of Music 
Director of the Harvard University
Studio for Electroacoustic Composition (HUSEAC)
Assistant Director for Undergraduate Studies

On Sep 28, 2016, at 1:15 PM, Martin Marris <[hidden email]> wrote:

Did you ever come across the need to call a Sibelius menu or function from within ManuScript?<<

I know Bob will answer, but here’s my answer. It actually works better the other way around: you use a macro or automation program (on a Mac, I use QuickKeys; on a Pc , I use a pgram called AutoIt!) and use it in conjunction with Sibelius plugins. When QuickKeys/AutoIt! needs to run a plugin, it goes into the Sibelius Plugins menu to launch the ManuScript routine; but it can also, of course, launch an actual Sibelius menu command and thus do stuff that ManuScript can't. It is even possible to pass data between macro programs and ManuScript – for instance by creating a ManuScript dialogue that data can be pasted into, or by writing text files. I have written some routines that go back and forth between Sibelius and the external automation program thousands of times within a single session.

If you want to do it the other way around, i.e. by having ManuScript itself issue a menu command, you could have ManuScript execute an external macro program for this. In Windows, I have done this using a “watched folder” so that when ManuScript writes a file to that folder, an external routine written in AutoIt! is launched. In the more recent versions of Sibelius (7 onwards) it is actually possible for ManuScript to launch an external program off its own bat (no need for the “watched folder”), at least in the Windows version (I am not sure about Mac).

The problem with all of these solutions is that they are fragile and tend to be very UI-dependent. They work well for us, but only because we are in a controlled environment. We use literally hundreds of “hybrid” solutions (ManuScript in conjunction with external control).

The bad news is that starting with Sibelius 7, the Sibelius UI is written using a language called "Qt" and while this is an excellent system, it is almost totally opaque to external automation programs. You cannot "reach" its controls and fields in any direct way. So I have essentially given up on sophisticated automation of Sibelius 7 or later versions of Sibelius: if it cannot be done with ManuScript, it is difficult. If there is existing Sibelius keyboard shortcut, it's OK, but otherwise it is very hard. (Fortunately we still do about 90 percent of our work in Sibelius 6.)

There are external automation programs (Ranorex, Squish, etc.) that purport to be able to automate Qt dialogues but they only work with the release versions of Qt. Unfortunately the Qt used in Sibelius 7 was customized by Sibelius itself and is not compatible with these automation programs. I am hoping that the Qt used in more recent versions (8 and up) is or will be more "standard" -- but I haven't yet installed 8, so I don't know.

As Bob says, good luck with it!

Martin



_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev


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

Re: newbie question

Bob Zawalich-3

You would not need to have a mechanism to reset the beam grouping s for bars of the same type, just a way to reset the beam groups on a, similar to the Reset beam Groups command, You would need to be able to specify the groupings, but it would be more general for them to implement it to just work on a selection.

 

In my experience though unless Sib has its own need for new MS features they rarely get implemented unless one can show a significant need for them. Might be worth requesting in IdeaScale, but don’t hold your breath. There have been no new shipping plugins since 7.1, and some, but very few additions to the access.

 

I try my best to be on good terms with the development team, and sometimes we can slip something in.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Hans Tutschku
Sent: Wednesday, September 28, 2016 10:26 AM
To: A mailing list for Sibelius plug-in developers <[hidden email]>
Subject: Re: [Plugin-dev] newbie question

 

Thank you both again very much for taking the time to explain the inner workings.

This all makes sense now.

 

Another route might be a ‘feature request’ to the Sibelius programmers directly to 

incorporate some way of resetting Beam Groups across all bars of the same type.

This is probably not on their radar as a lot of music does not have constant time signature changes

and one can easily select an entire section of music to reset the beaming.

But in contemporary music this does not tend to be the case. There are very frequent time signature

changes and for a long score it becomes a laborious process.

 

Anyway, I have my ‘workaround’ for now and will experiment with the next score to define

the time signatures and their Beam Groups before inputting music.

 

Best, Hans

 


Hans Tutschku
--------------------
Fanny P. Mason Professor of Music 

Director of the Harvard University
Studio for Electroacoustic Composition (HUSEAC)
Assistant Director for Undergraduate Studies

 

On Sep 28, 2016, at 1:15 PM, Martin Marris <[hidden email]> wrote:

 

Did you ever come across the need to call a Sibelius menu or function from within ManuScript?<<


I know Bob will answer, but here’s my answer. It actually works better the other way around: you use a macro or automation program (on a Mac, I use QuickKeys; on a Pc , I use a pgram called AutoIt!) and use it in conjunction with Sibelius plugins. When QuickKeys/AutoIt! needs to run a plugin, it goes into the Sibelius Plugins menu to launch the ManuScript routine; but it can also, of course, launch an actual Sibelius menu command and thus do stuff that ManuScript can't. It is even possible to pass data between macro programs and ManuScript – for instance by creating a ManuScript dialogue that data can be pasted into, or by writing text files. I have written some routines that go back and forth between Sibelius and the external automation program thousands of times within a single session.

If you want to do it the other way around, i.e. by having ManuScript itself issue a menu command, you could have ManuScript execute an external macro program for this. In Windows, I have done this using a “watched folder” so that when ManuScript writes a file to that folder, an external routine written in AutoIt! is launched. In the more recent versions of Sibelius (7 onwards) it is actually possible for ManuScript to launch an external program off its own bat (no need for the “watched folder”), at least in the Windows version (I am not sure about Mac).

The problem with all of these solutions is that they are fragile and tend to be very UI-dependent. They work well for us, but only because we are in a controlled environment. We use literally hundreds of “hybrid” solutions (ManuScript in conjunction with external control).

The bad news is that starting with Sibelius 7, the Sibelius UI is written using a language called "Qt" and while this is an excellent system, it is almost totally opaque to external automation programs. You cannot "reach" its controls and fields in any direct way. So I have essentially given up on sophisticated automation of Sibelius 7 or later versions of Sibelius: if it cannot be done with ManuScript, it is difficult. If there is existing Sibelius keyboard shortcut, it's OK, but otherwise it is very hard. (Fortunately we still do about 90 percent of our work in Sibelius 6.)

There are external automation programs (Ranorex, Squish, etc.) that purport to be able to automate Qt dialogues but they only work with the release versions of Qt. Unfortunately the Qt used in Sibelius 7 was customized by Sibelius itself and is not compatible with these automation programs. I am hoping that the Qt used in more recent versions (8 and up) is or will be more "standard" -- but I haven't yet installed 8, so I don't know.

As Bob says, good luck with it!

Martin



_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev

 


_______________________________________________
Plugin-dev mailing list
[hidden email]
https://avid-listsrv1.avid.com/mailman/listinfo/plugin-dev