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

Slur does not begin or end on stem #100

Closed
arshiacont opened this issue Oct 28, 2019 · 5 comments
Closed

Slur does not begin or end on stem #100

arshiacont opened this issue Oct 28, 2019 · 5 comments

Comments

@arshiacont
Copy link

This is a pattern that appears often.

Take the following snippet and watch Slur behavior where they do not start or end on the stem end:

{[
   (* meas. 1 *)  \clef<"g2">  \meter<"C"> \stemsUp {c/4, e/4, g/4  } {c/8, e/8, g/8  } {c/8, e/8, g/8  } 
   \slurBegin:1<curve="up"> {f/8., a/8.  } {e/16, g/16  } f/4 \slurEnd:1 \bar 
   (* meas. 2 *) 
   \slurBegin:1<curve="up"> c2/4 {e1/8, b&/8} {f/8, a/8  } \slurEnd:1 \slurBegin:1<curve="up">  
   g/4. \stemsUp \beamsOff \acc( g#/8)
 \slurEnd:1 \bar 
   (* meas. 3 *)  \slurBegin:1<curve="up"> a/4 \stemsUp \beamsOff {e/4, g/4  } \slurEnd:1 \slurBegin:1<curve="up"> \beamBegin:1 {a0/8, f1/8  } c/8 {a0/8, f1/8  } c2/8 \slurEnd:1 \beamEnd:1 ]
  }

image

@arshiacont
Copy link
Author

This might be related to #87

@dfober
Copy link
Member

dfober commented Oct 29, 2019

This might be related to #87

I think so too.
Did you notice that when removing the <curve="up">, you'll get a correct result?
The problem here is that the slur is underspecified, generally when enforcing a direction, additional dy parameters are also required.
But I understand your point, which is however beyond the initial engine design. I think that could be solved but I'm afraid it's a serious investment. I'll have a look asap (which means in a long time now)

@arshiacont
Copy link
Author

Good to know!

All the scores I sent are MusicXML conversions. I simplified the score for the purpose of bug reporting. In the full score, there are multiple voices and that's why there is a Curve direction. If I remove the <curve="up"> it'll be drawn on the bottom and colliding with other voices.

I'll try to dig into the implementation of the Slur in Guido and compare with others to see whether there are simple things to do.

@arshiacont
Copy link
Author

In case it helps for unit tests, this is another incarnation of the same problem but this time on a cross-staff.. :

{[ \staff<1> \accol<id=0, range="1-2"> \barFormat<style= "system", range="1-2"> 
   (* meas. 1 *)  \clef<"g2"> \key<-1> \meter<"2/4", autoBarlines="off", autoMeasuresNum="system">  
\tuplet<"", dispNote="/16">( \restFormat<dy=19>( _/24)
 \staff<2> \stemsUp \slurBegin:1<curve="up"> \beamBegin:1 \beamBegin:2 e0/24 \stemsUp d1/24)
 \beamEnd:2 \beamEnd:1 \stemsUp \beamBegin:1 \beamBegin:2 \tuplet<"", dispNote="/16">( \acc( b0/24)
 \staff<1> \stemsUp e1/24 d/24)
 \beamEnd:2 \beamEnd:1 \acc( b/8)
 \slurEnd:1 _/8 \bar 
   (* meas. 2 *)  \tuplet<"", dispNote="/16">( \restFormat<dy=16>( _/24)
 \staff<2> \stemsUp \slurBegin:1<curve="up"> \beamBegin:1 \beamBegin:2 e0/24 \stemsUp c1/24)
 \beamEnd:2 \beamEnd:1 \stemsUp \beamBegin:1 \beamBegin:2 \tuplet<"", dispNote="/16">( a0/24 \staff<1> \stemsUp e1/24  c/24)
 \beamEnd:2 \beamEnd:1 \stemsUp \beamsOff a/8 \slurEnd:1 _/8 \bar 
   (* meas. 3 *)  \tuplet<"", dispNote="/16">( \restFormat<dy=17>( _/24)
 \staff<2> \stemsUp \slurBegin:1<curve="up"> \beamBegin:1 \beamBegin:2 \acc( e&0/24)
 \stemsUp c1/24)
 \beamEnd:2 \beamEnd:1 \stemsUp \beamBegin:1 \beamBegin:2 \tuplet<"", dispNote="/16">( a0/24 \staff<1> \stemsUp \acc( e&1/24) c/24)
 \beamEnd:2 \beamEnd:1 \stemsUp \beamsOff a/8 \slurEnd:1 _/8 \bar 
   (* meas. 4 *)  \tuplet<"", dispNote="/16">( \restFormat<dy=15>( _/24)
 \staff<2> \stemsUp \slurBegin:1<curve="up"> \beamBegin:1 \beamBegin:2 \acc( e0/24)
 \stemsUp c1/24)
 \beamEnd:2 \beamEnd:1 \stemsUp \beamBegin:1 \beamBegin:2 \tuplet<"", dispNote="/16">( g0/24 \staff<1> \stemsUp \acc( e1/24) c/24)
 \beamEnd:2 \beamEnd:1 g/8 \slurEnd:1 _/8 ]
 , 
[ \staff<2>
   (* meas. 1 *)  \clef<"f4"> \key<-1> \meter<"2/4", autoBarlines="off", autoMeasuresNum="system"> 
   \stemsDown \beamsOff {\acc( g#-2/2)
, \acc( g#-1/2)
  } \bar 
   (* meas. 2 *)  \stemsDown {a-2/2, a-1/2  } \bar 
   (* meas. 3 *)  \stemsDown {\acc( f#-2/2)
, \acc( f#-1/2)
  } \bar 
   (* meas. 4 *)  \stemsDown {g-2/2, g-1/2  } ]
  }

image

@dfober
Copy link
Member

dfober commented Nov 29, 2019

fixed (and pushed)

@dfober dfober closed this as completed Nov 29, 2019
arshiacont added a commit to Antescofo/guidolib that referenced this issue Feb 22, 2022
…UID-149-SlurOnChord

* commit '5146fe657573b3cfbe5619709e97a7748b9f9060': (46 commits)
  moved to regressions tests
  new regression tests
  fix incorrect slur position for beamed chords (issue grame-cncm#100)
  fix framework dir
  add references menu
  fix missing mkdir
  fix publish target
  fix image url
  revise publish target
  remove local branch ref
  todo list extended
  change mappings url
  web site (in progress)
  change mappings url
  new issue
  jsdoc revised
  tabs replaced with space
  jsdoc update
  fix link
  javadoc target
  ...
dfober added a commit that referenced this issue Dec 29, 2022
arshiacont added a commit to Antescofo/guidolib that referenced this issue Jul 19, 2023
…o-develop

* commit '7e578c4ce64562945d7120492457898356922186':
  remove comments
  fix incorrect beaming with issue grame-cncm#100
  beaming (still in progress but almost there)
  beaming (in progress)
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

2 participants