Detecting objects in known coordinates (Dx, Dy in a given bar)

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

Detecting objects in known coordinates (Dx, Dy in a given bar)

Tony Vaughan
I am developing a plugin that places an object (like a vertical arrow) to the
left of a selected note.

Is it possible to test whether there is an object a given distance to the
left of a selected note so I can safely place a vertical arrow to that
note's left or to the left of an object that is already to the note's left?

I realize this could be recursive but it would be neat to be ale to do this.

Thank you in advance.



--
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: Detecting objects in known coordinates (Dx, Dy in a given bar)

Bob Zawalich-3
Be careful with the sort of thing. You can put a line at the same rhythmic
position as a NoteRest object and that is generally your best shot.
Understand that Dx, Dy values are in spaces, which map directly to  a real
world unit like inches once the staff size is set, but rhythmic position is
not fixed in space. If you have 10 bars in a system, 256 units is much
smaller is real length than the same  256 units if there is a single bar in
a system, and a plugin has no way to tell the difference.

If you can get way with checking the Position value of the note you will get
the best results.

Bob


-----Original Message-----
From: Plugin-dev <[hidden email]> On Behalf Of Tony
Vaughan
Sent: Monday, June 18, 2018 10:44 AM
To: [hidden email]
Subject: [Plugin-dev] Detecting objects in known coordinates (Dx, Dy in a
given bar)

I am developing a plugin that places an object (like a vertical arrow) to
the left of a selected note.

Is it possible to test whether there is an object a given distance to the
left of a selected note so I can safely place a vertical arrow to that
note's left or to the left of an object that is already to the note's left?

I realize this could be recursive but it would be neat to be ale to do this.

Thank you in advance.



--
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: Detecting objects in known coordinates (Dx, Dy in a given bar)

Tony Vaughan
Hi Bob

Thanks for getting back to me.

I think I need to explain better what I want to do.

Say I have a note where I want to place a vertical arrow to its left. All
well and good unless there is already another object directly to the left of
that note; like a left hand fingering from your _LH plug-in. In that case I
would want to place the vertical arrow to the left of the left hand
fingering. Therefore, I was wondering whether there was a method I could use
to check whether there is an object at the coordinate I was going to place
the vertical arrow in the first place; something that had parameters of (Dx,
Dy) and returned true if an object already exists in that position.

I hope this gives you a better idea of what I was wanting to do, and why.

The plugin I am developing already positions items like vertical arrows and
right hand fingering to the left of a note and I am now wanting to cover all
my bases by handling events like the preexistence of left hand fingering or,
indeed, accidentals.

Tony



--
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