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

Octava does not propagate to voices leading to incorrect rendering #127

Open
arshiacont opened this issue Jun 2, 2021 · 13 comments
Open

Comments

@arshiacont
Copy link

Octava command does not seem to be effective across voices and repeating it will create more visual elements which is not intended.

Consider this score excerpt:
image

How would one notate the Octava in Guido? so that it takes effect on both voices?

Here are two failing attempts:

(1) Octava on first voice:

{[ \staff<1> 
  \clef<"g2"> \key<2> \meter<"C">  
 \stemsUp \slurBegin:1<curve="up">  b2/8
 empty/8  d3/8 empty/8 
 \oct<1> g/8 empty/8  b/8 empty/8 
  ]
 , 
[ \staff<1> 
  \stemsDown 
  \beamBegin:1  
  \tuplet<"3", dispNote="/16">( b2/24  d/24 g/24)
 \tuplet<"3", dispNote="/16">( b/24 g/24 d/24) \beamEnd:1   
 \beamBegin:1 \tuplet<"3", dispNote="/16">( d3/24 g2/24 b/24)
  \tuplet<"3", dispNote="/16">( d3/24 b2/24 g/24) \beamEnd:1 
 \beamBegin:1 \tuplet<"3", dispNote="/16">( g3/24  b2/24 d3/24)
 \tuplet<"3", dispNote="/16">( g/24 d/24 b2/24) \beamEnd:1  
 \beamBegin:1  \tuplet<"3", dispNote="/16">( b3/24  d/24 g/24)
 \tuplet<"3", dispNote="/16">( b/24 g/24 d/24)\beamEnd:1 
 ]
  }

(2) Octava on both voices:

{[ \staff<1> 
  \clef<"g2"> \key<2> \meter<"C">  
 \stemsUp \slurBegin:1<curve="up">  b2/8
 empty/8  d3/8 empty/8 
 \oct<1> g/8 empty/8  b/8 empty/8 
  ]
 , 

[ \staff<1> 
  \stemsDown 
  \beamBegin:1  
  \tuplet<"3", dispNote="/16">( b2/24  d/24 g/24)
 \tuplet<"3", dispNote="/16">( b/24 g/24 d/24) \beamEnd:1   
 \beamBegin:1 \tuplet<"3", dispNote="/16">( d3/24 g2/24 b/24)
  \tuplet<"3", dispNote="/16">( d3/24 b2/24 g/24) \beamEnd:1 
  \oct<1>
 \beamBegin:1 \tuplet<"3", dispNote="/16">( g3/24  b2/24 d3/24)
 \tuplet<"3", dispNote="/16">( g/24 d/24 b2/24) \beamEnd:1  
 \beamBegin:1  \tuplet<"3", dispNote="/16">( b3/24  d/24 g/24)
 \tuplet<"3", dispNote="/16">( b/24 g/24 d/24)\beamEnd:1 
 ]
  }
@dfober
Copy link
Member

dfober commented Jul 10, 2021

There is now a new hidden attribute for \octava.
I know this solution has limitations in your case since the octava sign you may choose to show may not have the right 'y position. I've started to investigate an automatic solution but again, it shows to be a bit tricky.

@zhwei8090
Copy link

zhwei8090 commented Nov 24, 2021

I also encountered this problem
{[ \staff<1> \set<autoHideTiedAccidentals="on"> \auto<autoInstrPos="on"> \instr<"Piano"> \accol<id=0, range="1-2"> \barFormat<style= "system", range="1-2"> \bar<hidden="true"> (* meas. 1 *) \clef<"g2"> \key<0> \meter<"4/4", autoBarlines="off", autoMeasuresNum="system"> \oct<1> \stemsDown \beamBegin:1 c3/8 \stemsDown e/8 \stemsDown d/8 \stemsDown e/8 \beamEnd:1 \stemsDown \beamBegin:1 c/8 \stemsDown e/8 \stemsDown d/8 \stemsDown e/8 \beamEnd:1 \oct<0> \bar (* meas. 2 *) \oct<1> \stemsDown \beamBegin:1 c/8 \stemsDown e/8 \stemsDown d/8 \stemsDown e/8 \beamEnd:1 \stemsDown \beamBegin:1 c/8 \stemsDown e/8 \stemsDown d/8 \stemsDown e/8 \beamEnd:1 \oct<0> ] , [ \staff<1> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="1"> \bar<hidden="true"> (* meas. 1 *) \stemsUp \beamsOff c3/4 \noteFormat<dx=-38>( _/4) \noteFormat<dx=-58>( _/2) \bar (* meas. 2 *) \stemsUp \beamsOff g/4 \noteFormat<dx=-24>( _/4) \noteFormat<dx=-44>( _/2) ] , [ \staff<2> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="2"> \bar<hidden="true"> (* meas. 1 *) \staffFormat<distance=13> \clef<"f4"> \key<0> \meter<"4/4", autoBarlines="off", autoMeasuresNum="system"> \beamsOff c0/1 \bar (* meas. 2 *) \beamsOff c/1 ] }

@dfober
Copy link
Member

dfober commented Nov 26, 2021

Note that there is no conflict in your example: \oct is only on voice 1.
However I guess this is the kind of output you're expecting :
{
[ \staff<1>
\set<autoHideTiedAccidentals="on"> \auto<autoInstrPos="on"> \instr<"Piano">
\accol<id=0, range="1-2"> \barFormat<style= "system", range="1-2">
\bar<hidden="true">
(* meas. 1 ) \clef<"g2"> \key<0> \meter<"4/4", autoBarlines="off", autoMeasuresNum="system">
\oct<1, dy=5> \stemsDown \beamBegin:1 c3/8 \stemsDown e/8 \stemsDown d/8 \stemsDown e/8 \beamEnd:1
\stemsDown \beamBegin:1 c/8 \stemsDown e/8 \stemsDown d/8 \stemsDown e/8 \beamEnd:1
\oct<0> \bar
(
meas. 2 ) \oct<1, dy=5> \stemsDown \beamBegin:1 c/8 \stemsDown e/8 \stemsDown d/8 \stemsDown e/8 \beamEnd:1
\stemsDown \beamBegin:1 c/8 \stemsDown e/8 \stemsDown d/8 \stemsDown e/8 \beamEnd:1
\oct<0>
] ,
[ \staff<1> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="1"> \bar<hidden="true">
(
meas. 1 ) \oct<1, hidden="on"> \stemsUp \beamsOff c3/4 \restFormat<dy=-7>( _/4) \restFormat<dy=-4>( _/2) \bar
(
meas. 2 ) \stemsUp \beamsOff g/4 \restFormat<dy=-7>( _/4) \restFormat<dy=-4>( _/2)
] ,
[ \staff<2> \set<autoHideTiedAccidentals="on"> \barFormat<style= "system", range="2"> \bar<hidden="true">
(
meas. 1 ) \staffFormat<distance=13> \clef<"f4"> \key<0>
\meter<"4/4", autoBarlines="off", autoMeasuresNum="system"> \beamsOff c0/1 \bar
(
meas. 2 *) \beamsOff c/1
]
}

It requires manual formatting (or a more clever conversion). It looks like there's already manual editing (otherwise I don't understand where the \noteFormat<dx=... comes from).
For the time being, that's the best the guido engine can do.

@arshiacont
Copy link
Author

I believe the most serious Octava issue in the engine is #134 currently.

@zhwei8090 I guess that you are using LibMusicXML... I should cleanup and submit a PR that greatly improves Guido conversion... I'll try doing that ASAP.

@zhwei8090
Copy link

@dfober In fact, the score is like this, there will be conversion problems when there are multiple voices
QQ20211127-162301

@zhwei8090
Copy link

@arshiacont Yes, looking forward to your PR

@arshiacont
Copy link
Author

@zhwei8090 better support for Octava is now available in xml2guido. It uses the new hidden feature added by @dfober . I wrestled alot with octave-shift conversion from musicXML to Guido and so far this is the best I have found but there are limitations such as how to choose which "octava" should be hidden!

I believe an ideal solution would be to have as many Octava on different voices and have the rendering engine somehow "merge" those octavas into the best one and finding the most suitable dy. I guess this is the path Dominique was taking. Let me know if you need help on this.

@zhwei8090
Copy link

@arshiacont I don't know how to describe this problem, it is certain to show a logical problem

@zhwei8090
Copy link

@arshiacont
Dropped an octave, not as expected
image
expected result:
image
testfile.xml.zip

@dfober
Copy link
Member

dfober commented Mar 10, 2022

looking at the gmn code, it see the following for the first voice:

 \oct<0> \stemsUp \beamBegin:1 \acc( d#2/16)

thus the engine shows what is written.
It looks like it's a conversion issue.

ps: it would be nice to reduce the code to the minimum that reproduces the problem, you would probably have discovered the same thing in this case

@arshiacont
Copy link
Author

@zhwei8090 I have seen this before and it is an error that sometimes Finale introduces when encoding to MusicXML! If you look at the content of the MusicXML you'll see that it is actually closing early. If this is not the case, create a new ticket on LibMusicXML repo.

Keeping this ticket open as the multi-voice Octava is still an issue to be resolved (since using the current "hidden" parameter) does not really solve the problem. Ideally the engine should see all GROctavas and only draw the longest on the voice?!?

@zhwei8090
Copy link

@arshiacont @dfober It has been verified that there is indeed a problem when finale exports the xml, and re-editing the xml can solve it

@zhwei8090
Copy link

@arshiacont @dfober Have you encountered this problem? #144

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

3 participants