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

RFE: Slur object support #28

Open
ndickson opened this issue Jul 9, 2017 · 0 comments
Open

RFE: Slur object support #28

ndickson opened this issue Jul 9, 2017 · 0 comments

Comments

@ndickson
Copy link

ndickson commented Jul 9, 2017

It would be useful to have basic support for the Slur.ms User object from Noteworthy. It gives more control over slur shape, but even just converting it as a regular slur would be a big help. There are examples of it in the attached WieniawskiViolinConcerto2_3_Cello_2ndViolins.txt in bar 81 (for a 2-note example):

|User|Slur.ms|Pos:1|StartOffsetX:-0.2|StartOffsetY:2|EndOffsetX:0.2
|Note|Dur:8th,Dotted,Accent|Pos:7|Opts:Stem=Down,Beam=First
|Note|Dur:16th|Pos:5|Opts:Stem=Down,Beam=End

and in bars 117-118 (for an 11-note example in some triplets, spacers omitted in this snippet):

|Rest|Dur:8th,Triplet=First
|User|Slur.ms|Pos:-1|Span:11|StartOffsetX:-0.2|EndOffsetX:0.2|Strength:1.4
|Note|Dur:16th,Triplet|Pos:0|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Triplet|Pos:1|Opts:Stem=Down,Beam
|Note|Dur:16th,Triplet|Pos:0|Opts:Stem=Down,Beam
|Note|Dur:16th,Triplet=End|Pos:1|Opts:Stem=Down,Beam=End
|Note|Dur:16th,Triplet=First|Pos:0|Opts:Stem=Down,Beam=First
|Note|Dur:16th,Triplet|Pos:1|Opts:Stem=Down,Beam
|Note|Dur:16th,Triplet|Pos:0|Opts:Stem=Down,Beam
|Note|Dur:16th,Triplet|Pos:1|Opts:Stem=Down,Beam
|Note|Dur:16th,Triplet|Pos:0|Opts:Stem=Down,Beam
|Note|Dur:16th,Triplet=End|Pos:1|Opts:Stem=Down,Beam=End
|Bar
|Note|Dur:8th|Pos:0|Opts:Stem=Down

You might have to be careful in some cases, e.g. in the bassoon part in the first movement, where the direction on the slur is upwards, because the slur is on the upper notes, and where the two grace notes are counted as two notes in the second Slur.ms object:

|User|Slur.ms|Pos:7|Span:3|Dir:Upward|StartOffsetY:4.7|EndOffsetY:5.2|StartOffsetX:-0.5|EndOffsetX:0.4
|Chord|Dur:4th|Pos:1|Opts:Stem=Down,Slur=Upward|Dur2:4th|Pos2:5^
|Chord|Dur:8th|Pos:5|Opts:Stem=Up,Slur=Upward,Beam=First|Dur2:4th|Pos2:-1
|Note|Dur:8th|Pos:n5|Opts:Stem=Up,Beam=End
|User|Slur.ms|Pos:2|Span:3|EndOffsetY:-4|StartOffsetY:-0.3|EndOffsetX:0.5|Strength:0.8
|Note|Dur:16th,Grace|Pos:6|Opts:Stem=Up,Beam=First
|Note|Dur:16th,Grace|Pos:7|Opts:Stem=Up,Beam=End
|Chord|Dur:8th,Triplet=First,Slur|Pos:6|Opts:Stem=Up,Beam=First|Dur2:4th|Pos2:2
|Note|Dur:8th,Triplet,Slur|Pos:5|Opts:Stem=Up,Beam
|Note|Dur:8th,Triplet=End,Slur|Pos:6|Opts:Stem=Up,Beam=End
|Chord|Dur:8th,Slur|Pos:7|Opts:Stem=Up,Beam=First|Dur2:4th|Pos2:-5
|Note|Dur:8th|Pos:8|Opts:Stem=Up,Beam=End

From the MusicXML doc page on the slur tag, it looks like they're specified with separate tags for start and stop. There's a direction attribute on the start, and a number attribute that allows disinguishing multiple concurrent slurs (up to 6), e.g. for the last example above, where the Slur.ms slur, including the two grace notes and the note after that, ends after the start of the slur indicated in the Note options.

Inside the note tag block for the first note of one slur (downward):

<notations>
  <slur number="1" placement="below" type="start"/>
</notations>

Inside the note tag block for the last note of that slur that's also the first note of another concurrent slur (upward):

<notations>
  <slur number="1" type="stop"/>
  <slur number="2" placement="above" type="start"/>
</notations>

and finally, in the note tag block for the last note of the second slur:

<notations>
  <slur number="2" type="stop"/>
</notations>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant