From: Arshia C. <ars...@an...> - 2016-09-05 16:57:49
|
Dominique, Thanks for your response. I believe I’m getting there slowly by improving the libMusicXML’s xml2guido and adding a Space tag when necessary. I check the “necessity” by looking at the note duration and the string length and for now, adding space tags using heuristics. I believe that there’s a simple relation between an event duration and the default “space” (in HS) in the rendering result. If I can get access to that relation, I can easily automatise everything. And of course, I’ll push everything on the libMusicXML’s GitHub when it passes our multiple tests. Cheers, Arshia PS: Note that I finally ended up following the XML scheme for Lyrics which more or less comply to the Guido format if you set a lyric tag on each Guido Event (and avoid making lyrics phrases). This just ends up in a better translation… . > On 05 Sep 2016, at 10:00, Dominique Fober <fo...@gr...> wrote: > > >> Le 4 sept. 2016 à 12:17, Arshia Cont <ars...@an... <mailto:ars...@an...>> a écrit : >> >> Thank you Dominique for the response. >> >> The StaffFormat is definitely what’s needed for the vertical spacing between staves! A simple question: When you put a number there, say “-5”, what’s the default unit used? > > default unit is half-space but you can use any other unit (e.g. mm, cm, in…) > >> And what would you recommend to us as unit so that it’d be ‘relatively’ correct on both Guido Desktop and say iOS+Android rendering? > > half-space is relative to the current rendering, so it’s the better to use that > >> >> Regarding the horizontal collision / spacing: >> >> Though your solution solves the problem locally, the problem remains. You’d ideally want the ‘renderer’ to calculate the space not only based on local lyric text but also the rest of the GR context. > > right > >> My guess is that Guido already does that for everything except for Lyrics. > > there are probably other exceptions > >> For example, when you have a new Clef definition in the middle of a measure, Guido Renderer adjusts spacing… . My wild guess is that a lot of other renderers work like this for Lyrics… . >> What do you think? > > Of course, taking account of lyrics at notes spacing level is the best solution, but it’s not yet the case. The spacing algorithm has been designed by Kai Renz years ago. Although it’s clearly formalized (see kai_renz_diss.pdf in the doc folder), the implementation style is a bit old, which makes it difficult to improve. > > One day, the main engine algorithms should be redesigned (a lot of code factorization to do, a more functional approach…) that’s a pending task for years. Only the time is missing for that (I think it’s a significant task). > > >> >> If “not”, then I’d certainly need to “calculate” the \space tag value based on context! Do you have any suggestions on how to “detect” collisions (or when that tag is needed) to start with? > > actually that’s quite difficult, spacing can vary greatly depending on many settings (page size, line breaks, settings of the rendering engine…). One solution could be to extend the \space tag (with an additional parameter) so that it applies the corresponding space only when necessary, i.e. only when the ‘normal’ space is less than the required space. That’s really not elegant but probably more easy to do than to modify the spacing algorithm. > > — > Dominique > >> >> Many thanks, >> >> >> Arshia >> >>> On 02 Sep 2016, at 15:08, Dominique Fober <fo...@gr... <mailto:fo...@gr...>> wrote: >>> >>> >>>> Le 2 sept. 2016 à 13:17, Arshia Cont <ars...@an... <mailto:ars...@an...>> a écrit : >>>> >>>> Dominique, >>>> >>>> As a sample score, attached is a direct import (from MusicXML) of Schubert’s “Der Wanderer” (voice + piano) to demonstrate the effect. >>>> >>>> While rendered (for example in QT GuidoEditor), look at : >>>> >>>> - measure 7 (first appearance of Lyrics) where texts horizontally overlap. >>>> - measure 8: Note how the lyrics “her” collapses with the beaming of the lower voice (vertical spacing) which happens almost all the time. >>> >>> You can make space between notes using the \space tag, that’s one way to solve the horizontal collision issue, >>> regarding vertical collisions with the next staff, you can also make space between staves using the \staffFormat<dy=nnn> tag. >>> See the revised document attached >>> >>>> >>>> For the Horizontal overlap, you can also check the “bach_lyrics.gmn” in the Guido Sample where “ge-schlach-“ is systematically overlapping ‘ge’ and ’schlock’. >>> >>> that’s now corrected and pushed to git (dev branch) >>> >>> — >>> Dom >>> >>>> >>>> Cheers, >>>> >>>> Arshia >>>> >>> <schubert.gmn> >>>> >>>> >>>> <schubert.gmn> >>>> >>>> >>>> >>>>> On 02 Sep 2016, at 13:11, Dominique Fober <fo...@gr... <mailto:fo...@gr...>> wrote: >>>>> >>>>> >>>>>> Le 2 sept. 2016 à 12:32, Arshia Cont <ars...@an... <mailto:ars...@an...>> a écrit : >>>>>> >>>>>> Hello Guido list, >>>>>> >>>>>> I have recently achieved in converting MusicXML lyrics to Guido format using the Advanced Guido Proposal / lyrics additions. >>>>>> >>>>>> I was wondering if there are ways to control their rendering? I see several problems that do not seem to be related to the dx,dy parameters: >>>>>> >>>>>> (1) Sometimes the note/event spacing should be increased to avoid overlapping of lyric text in adjacent events. >>>>>> (2) Sometimes the lyric text vertically overlaps the stems or stems from the voice below. >>>>>> >>>>>> Are there parameters in the renderer that controls these behaviors? >>>>> >>>>> could you send some sample gmn code to illustrate? >>>>> — >>>>> Dom >>>>> >>>>>> >>>>>> Thanks in advance, >>>>>> >>>>>> >>>>>> Arshia Cont >>>>>> ------------------------------------------------------------------------------ >>>>>> _______________________________________________ >>>>>> Guidolib-devel mailing list >>>>>> Gui...@li... <mailto:Gui...@li...> >>>>>> https://lists.sourceforge.net/lists/listinfo/guidolib-devel >>>>> >>>> >>> >> > |