grame-cncm / guidolib

Guido project - music score layout engine - music description language
http://guido.grame.fr
Mozilla Public License 2.0
152 stars 34 forks source link

Key, clef and time signature overlap and scores start on top of them when using proportional rendering #91

Open tilgwullfi opened 4 years ago

tilgwullfi commented 4 years ago

Tested library versions: v1.6.6 and v167 We are trying to display a single measure of scores but with the default layout settings the scores aren't looking very good: default

But using different layout settings also doesn't yield a good result. Furthermore force and spring don't have an effect when proportional rendering isn't set...

examples: force=400; spring=1; proportionalRendering=100 force400_spring1_propRendering100

force=400; spring=5; proportionalRendering=400 force400_spring5_propRendering400

force=1500; spring=2.5; proportionalRendering=100 force1500_spring2 5_propRendering100

Wah0airo commented 4 years ago

We have the same problem.

dfober commented 4 years ago

You're using proportional rendering, which is still an experimental feature. When proportional rendering is 'on' (non-null), the values for force and spring are ignored (since there is no stretching).

Instead, the value of proportionalRendering is used to determine the fixed distance between the smallest notes duration (as far as I remember). Note that there is no automatic line break in proportional rendering mode. Note also that elements that do not have a duration don't take place (and thus the collisions); it's up to you to solve them using dx parameters.

I do not recommend using proportional rendering.

tilgwullfi commented 4 years ago

thanks for your suggestions, that will work too i guess (:

it would help (others) if this feature actually would be marked as experimental .. didn't notice that anywhere

tilgwullfi commented 4 years ago

but it's still weird that spring and force (without proportional rendering) aren't havíng any effect ..

dfober commented 4 years ago

Right, the feature should be marked as experimental. Documentation is the weak point (although the language is now fully documented and that's a big step forward :-) I plan to do the same with the programmer documentation (as soon as I find some time). Regarding spring and force, they do have an effect when proportionalRendering is set to 0. You can experiment with that using the Guido Editor preference pane or using the 'Engine Settings' tab of the online editor (https://guidoeditor.grame.fr/)

tilgwullfi commented 4 years ago

i did a bit more testing but couldn't get spring and force to work :/ do they depend on something else? it's just a single measure we want to display and the pagesize is therefore restricted to a minimum

didn't know that there is a online version of the editor, thanks!

dfober commented 4 years ago

you must use the following API to refresh the graphical representation :

GuidoUpdateGR( GRHandler gr, const GuidoLayoutSettings* settings);

try your example with the online editor: if changing the settings works, there's no reason why it shouldn't work in your application. The expected values for the settings fields are described in GUIDOEngine.h (https://github.com/grame-cncm/guidolib/blob/dev/src/engine/include/GUIDOEngine.h)

tilgwullfi commented 4 years ago

thank you very much! that was indeed the missing puzzle piece (:

tilgwullfi commented 4 years ago

reopening because the issue is still relevant .. our problem is solved though