Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export fingering information #85

Open
sonovice opened this issue Dec 4, 2017 · 9 comments
Open

Export fingering information #85

sonovice opened this issue Dec 4, 2017 · 9 comments

Comments

@sonovice
Copy link

sonovice commented Dec 4, 2017

It would be nice to be able to export entered fingering information to the corresponding <fing> elements, see http://music-encoding.org/documentation/3.0.0/fing/

@PRamoneda
Copy link

Hi! First of all thank you for the development of this fantastic plugin!

I am very interested in this topic. How much time do do you think is needed to solve this problem? I have not experience working with ManuScript but I can learn it. I don't understand very well the Sibelius format (.sib files). Are the fingers associated with the notes in the .sib ?

@ahankinson
Copy link
Member

The best place to look for the answer would be in the ManuScript documentation. That largely determines the data that can be pulled out of a score:

http://resources.avid.com/SupportFiles/Sibelius/2018.1/Sibelius_2018.1_ManuScript_Language_Guide.pdf

You would probably want to start by looking at the GuitarFrame objects. There is very minimal support for these objects in the current plugin:

case('GuitarFrame')
{
chordsym = GenerateChordSymbol(bobj);
}

Which generates a <harm> element:

function GenerateChordSymbol (bobj) {
//$module(ExportGenerators.mss)
/*
Generates a <harm> element containing chord symbol information
*/
harm = libmei.Harm();
libmei.AddAttribute(harm, 'staff', bobj.ParentBar.ParentStaff.StaffNum);
libmei.AddAttribute(harm, 'tstamp', ConvertPositionToTimestamp(bobj.Position, bobj.ParentBar));
libmei.SetText(harm, bobj.ChordNameAsPlainText);
return harm;
} //$end

I would suggest that any investigations start there?

@th-we
Copy link
Member

th-we commented Feb 24, 2021

Are we talking about textual fingerings here or about GuitarFrame fingerings? If we're talking about textual ones, the way to go is to register a new text handler for the style ID text.staff.space.fingering here:

RegisterHandlers(textHandlers, CreateDictionary(
'StyleId', CreateDictionary(
'text.staff.expression', 'ExpressionTextHandler',
'text.system.page_aligned.title', 'PageTitleHandler',
'text.system.page_aligned.subtitle', 'PageTitleHandler',
'text.system.page_aligned.composer', 'PageComposerTextHandler',
'text.system.tempo', 'TempoTextHandler',
'text.staff.space.figuredbass', 'FiguredBassTextHandler',
'text.staff.plain', 'CreateAnchoredText'
)
), Self);

@th-we
Copy link
Member

th-we commented Feb 24, 2021

Or for text.staff.space.fingering.guitar. Not sure if GuitarFrames can actually show fingerings.

@PRamoneda
Copy link

Hi!!

Thank you so much for your answers! I am thinking about the textual fingerings (for example in the piano scores). And the idea would be to associate each of the fingers to the note which annotates.

I have seen uses of the harm annotations in the humdrum format. And yes! It would be a perfect way to annotate each note with her finger. RegisterHandlers could work too.

What I am not pretty sure is about if ManuScript will allow me to get each finger with his note associated easily. Or the "API" only will allow me to get each thing separately. Do you know, for example, if is easy to get "coordinates" of the (textual) fingers and the notes on the score?

As you can see I am not very familiarized with ManuScript but I can learn! . Do you know it is possible to do that? My plan, later, is to use that information with music21. And of course, I will PR this to this project whatever I add to the plugin!

Thank you so much for your time!

@ahankinson
Copy link
Member

I think the answer is "it depends". Quite a lot of the Sibelius objects are visually placed, not necessarily attached to notes. If the fingerings are attached to the note or a chord then you should be able to get the data pretty precisely.

If they are not, you will need to use some of the magic methods that have been developed in this plugin to try and infer them. The GetNoteObjectAtPosition method is worth exploring here:

https://github.com/music-encoding/sibmei/blob/develop/src/Utilities.mss#L216

@PRamoneda
Copy link

I think that the fingers are not associated with the notes... They are "floating" in the score or "visually placed". In this scenario do you see the association difficult?

@ahankinson
Copy link
Member

Not difficult, but probably somewhat error-prone. The plugin does a best-guess, but it may not always get it right.

@PRamoneda
Copy link

Ok, Thank you so much! I will evaluate what to do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants