{"id":136,"date":"2009-01-22T09:55:30","date_gmt":"2009-01-22T13:55:30","guid":{"rendered":"http:\/\/eugenecormier.com\/blog\/2009\/01\/22\/31-revision-21\/"},"modified":"2014-02-04T22:48:05","modified_gmt":"2014-02-05T02:48:05","slug":"31-revision-21","status":"publish","type":"post","link":"https:\/\/eugenecormier.com\/?p=136","title":{"rendered":"Combine noteheads of different values in Lilypond"},"content":{"rendered":"<p>I&#8217;ve been recently typesetting some classical guitar notation into Lilypond and wanting to get as close to the original as possible I noticed that Lilypond was handling doubled notes with different values incorrectly (for my purposes).<\/p>\n<p><\/p>\n<p>Here is some example code to demonstrate what I mean:<\/p>\n<blockquote><p>\\relative c&#8221;{<br \/>\n<<{ g8 c g c g2 }\n\\\\{ g4. c8 g2 }>><br \/>\n}<\/p><\/blockquote>\n<p>Produces:<BR><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/eugenecormier.com\/wp-content\/uploads\/2009\/01\/lilyex11.jpg\" alt=\"lilyex1\" width=\"200\" height=\"63\" class=\"alignnone size-full wp-image-192\" srcset=\"https:\/\/eugenecormier.com\/wp-content\/uploads\/2009\/01\/lilyex11.jpg 200w, https:\/\/eugenecormier.com\/wp-content\/uploads\/2009\/01\/lilyex11-150x47.jpg 150w, https:\/\/eugenecormier.com\/wp-content\/uploads\/2009\/01\/lilyex11-100x32.jpg 100w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/p>\n<p><BR><BR><br \/>\nTo get around this use the &#8220;Staff.NoteCollision&#8221; command like this:<\/p>\n<blockquote><p>\\relative c&#8221;{<br \/>\n\\override Staff.NoteCollision #&#8217;merge-differently-dotted = ##t<br \/>\n<<{ g8 c g c g2 }\n\\\\{ g4. c8 g2 }>><br \/>\n}<\/p><\/blockquote>\n<p>And the resulting output:<BR><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/eugenecormier.com\/wp-content\/uploads\/2009\/01\/lilyex21.jpg\" alt=\"lilyex2\" width=\"200\" height=\"68\" class=\"alignnone size-full wp-image-193\" srcset=\"https:\/\/eugenecormier.com\/wp-content\/uploads\/2009\/01\/lilyex21.jpg 200w, https:\/\/eugenecormier.com\/wp-content\/uploads\/2009\/01\/lilyex21-150x51.jpg 150w, https:\/\/eugenecormier.com\/wp-content\/uploads\/2009\/01\/lilyex21-100x34.jpg 100w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/p>\n<p><BR><BR><br \/>\nPlease note: this is how it works on my Lilypond which is an older version (2.10.33) which ships with Ubuntu 8.10. If you are using the newest stable version (2.12.1) the command looks a little different:<\/p>\n<blockquote><p>\\relative c&#8221;{<br \/>\n\\mergeDifferentlyDottedOn<br \/>\n<<{ g8 c g c g2 }\n\\\\{ g4. c8 g2 }>><br \/>\n}<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been recently typesetting some classical guitar notation into Lilypond and wanting to get as close to the original as possible I noticed that Lilypond was handling doubled notes with different values incorrectly (for my purposes). Here is some example code to demonstrate what I mean: \\relative c&#8221;{ } Produces: To get around this use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":508,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-136","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lilypond"],"_links":{"self":[{"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=136"}],"version-history":[{"count":18,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":464,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/posts\/136\/revisions\/464"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=\/wp\/v2\/media\/508"}],"wp:attachment":[{"href":"https:\/\/eugenecormier.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eugenecormier.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}