horizontal alignment suggestions
I'm having a difficult time figuring out a spacing puzzle. I'd like to have a series of systems centered in the middle of the page. That part isn't the problem. The problem comes when the system has an instrumentName set. The system is moved slightly to the right to accomodate the instrumentName. Essentially, I'd like the instrumentName to not be calculated as part of the system width. Is this possible? Where would I find out how to do this? Or, is there another way that I'm just not aware of? Thanks for any help James E. Bailey ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: horizontal alignment suggestions
Hi James, Essentially, I'd like the instrumentName to not be calculated as part of the system width. I'm confused: when I try it, the instrumentName *isn't* calculated as part of the system width: \version 2.12.2 \paper { line-width = 5\in indent = 0 } music = \relative { \repeat unfold 16 { c' } } \score { \new Staff \music } \score { \new Staff \with { instrumentName = MyInstrument } \music } Can you send an example of where it doesn't work as expected? Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: tablature.ly
Neil Puttock schrieb: 2009/5/2 Marc Hohl m...@hohlart.de: Ok, so I inserted the following lines in my scm/parser-clef.scm: ;; a function to add new clefs at runtime (define-public (add-new-clef clef-name clef-glyph clef-position octaviation c0-position) Append the entries for a clef symbol to supported clefs and c0-pitch-alist (set! supported-clefs (acons clef-name (list clef-glyph clef-position octaviation) supported-clefs)) (set! c0-pitch-alist (acons clef-glyph c0-position c0-pitch-alist))) [ I don't know if everything is correct, see below, but when everything works, I'll send patches.] That looks fine. I'd just suggest changing `octaviation' to `octavation'. Ups, that's a germanism. In Germay, we say Oktavierung and even Tabulatur, so I have to look more carefully in the future. I tried to follow your suggestions, and after some trial and error, I have rearranged my tablature.ly as follows (see attachment): #(add-new-clef moderntab markup.moderntab 0 0 0) % this function decides which clef to take #(define (clef::print-modern-tab-if-set grob) (let* ((glyph (ly:grob-property grob 'glyph))) (if (eq? glyph markup.moderntab) You can't compare strings using eq?; try equal? or (more idiomatic since we know 'glyph is a string) string=? Ok, I didn't know that. (ly:modern-tab-clef::print grob) (ly:clef::print grob #(define (ly:modern-tab-clef::print grob) I don't think it's necessary to split this out of the function above. Also, `ly:' is reserved for Scheme functions which have been exported from the C++ source. (ly:grob-property grob 'staff-space 1) (let* ((staff-symbol (ly:grob-object grob 'staff-symbol)) (line-count (ly:grob-property staff-symbol 'line-count)) (staff-space (ly:grob-property staff-symbol 'staff-space))) (grob-interpret-markup grob (make-customTabClef-markup line-count staff-space Two further points: Just to be on the safe side, when retrieving 'staff-space, a default value should be given, since it's not normally set: (ly:grob-property grob 'staff-space 1) Is this line placed properly? I don't understand this quite right, does this line define the default value if 'staff-space is not set at all and doesn't override 'staff-space if it s set before? I mean add `1' to the the following line: (staff-space (ly:grob-property staff-symbol 'staff-space 1) If 'staff-space can't be found, i.e., it's not set, then ly:grob-property will return the default value instead. Ah, now this makes sense to me. As I mentioned previously, unless you want to code a smaller clef for changes, you'll want to set 'full-size-change = ##t. This will shut up any complaints about missing a glyph for markup.moderntab_change. You can set it within the new stencil callback using ly:grob-set-property!: (ly:grob-set-property! grob 'full-size-change #t) Where have I to put this? I surely want changes to be enabled for the standard clefs, so I have to put it after the comparison for markup.moderntab. On the other hand, when it's put too late, then 'glyph has the value markup.moderntab_change, so the test for markup.moderntab will fail. Actually, you can forget this, since it seem to work fine without overriding 'full-size-change. And a final question: I put the override for the TabStaff.Clef #'stencil into \tabNumbersOnly resp. \tabFullNotation, so if the user doesn't call one of these commands, the clef selection mechanism won't work. Is there a workaround, or - even better - can \tabNumbersOnly be invoked automatically when tablature.ly is included? This doesn't alter the defaults for older files but would give the desired functionality (i.e. numbers only) for tablature users. You could place all the default overrides inside a \layout block, in the same manner as the settings for TabVoice are done in engraver-init.ly. Anyway, when I put all the pieces together, lilypond still complains about not finding markup.moderntab, so I have made some mistakes. Only the string matching, so you've done really well all things considered. Thank you for your help, I will write a new example file and send all patches and stuff to Carl when I'm ready for it. Marc Regards, Neil ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: generalize the idea in snippet 372
Hi Wilbert, based on the idea of http://lsr.dsi.unimi.it/LSR/Item?id=372 I created this small function that creates a filtering function to remove certain event types from a music expression: Very nice work! Please add it to the LSR when you have a chance -- it would be very useful. Regards, Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: horizontal alignment suggestions
Hi Kieren, Am 03.05.2009 um 14:47 schrieb Kieren MacMillan: Hi James, Essentially, I'd like the instrumentName to not be calculated as part of the system width. I'm confused: when I try it, the instrumentName *isn't* calculated as part of the system width: Can you send an example of where it doesn't work as expected? Kieren. Perhaps it's just my inability to explain what I want. I'd like to have the two systems centered on the page, regardless of what the instrumentName is. \version 2.12.2 \markup { \fill-line { \score { \new Staff \with { instrumentName = Instrument Name } { a4 g a f } \layout { indent = 0 } } } } \markup { \fill-line { \score { \new Staff { a4 g a f } \layout { indent = 0 } } } } James E. Bailey ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: horizontal alignment suggestions
Hi James, Perhaps it's just my inability to explain what I want. I'd like to have the two systems centered on the page, regardless of what the instrumentName is. Ah... well, the best I can do right now is this (manual) workaround: \version 2.12.2 \paper { line-width = 8.5\in indent = 0 } \layout { \context { \Staff \override InstrumentName #'X-extent = #'(0 . 0) } } music = \relative { a4 g a f } \markup \fill-line { \score { \new Staff \music \layout {} } } \markup \fill-line { \score { \new Staff \with { instrumentName = \markup \translate #'(-16 . 0 ) MyInstrument } \music \layout {} } } I tried various alignment properties/settings, but didn't find any that solved your issue. There's likely a way to make a Scheme function which automatically \translate-s the text the correct amount, but I don't have time to investigate it. Hope this helps! Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
colored voices
I want to have one voice all in red but can't find how to set the color of the dot after a dotted note, does anyone know? Kees ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: colored voices
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am Sonntag, 3. Mai 2009 19:57:44 schrieb Kees van den Doel: I want to have one voice all in red but can't find how to set the color of the dot after a dotted note, does anyone know? Yes, simply set the color for the Dots object (see http://lilypond.org/doc/v2.13/Documentation/user/lilypond-internals/Dots#Dots for the grob documentation): \relative c'' { \override Dots #'color = #'(1 0 0) c2... r16 } Cheers, Reinhold - -- - -- Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/ * Financial Actuarial Math., Vienna Univ. of Technology, Austria * http://www.fam.tuwien.ac.at/, DVR: 0005886 * LilyPond, Music typesetting, http://www.lilypond.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQFJ/eB4TqjEwhXvPN0RAmDgAJ9Zp6/SvBHhuFjyePOXfKKZdc6tLACeMv2w rTA6MRvQql1hY0ugdMmqJAk= =tSJ+ -END PGP SIGNATURE- ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: colored voices
Hi Kees (and Reinhold), Better yet would be to modify LSR snippet 443 (http:// lsr.dsi.unimi.it/LSR/Snippet?id=443) to accept an arbitrary set of grobs to be colorized (rather than the whole Staff). This is beyond my current Scheme-fu, but someone out there would make easy work of it. =) Cheers, Kieren. On 2009-May-3, at 14:20, Reinhold Kainhofer wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am Sonntag, 3. Mai 2009 19:57:44 schrieb Kees van den Doel: I want to have one voice all in red but can't find how to set the color of the dot after a dotted note, does anyone know? Yes, simply set the color for the Dots object (see http://lilypond.org/doc/v2.13/Documentation/user/lilypond-internals/ Dots#Dots for the grob documentation): \relative c'' { \override Dots #'color = #'(1 0 0) c2... r16 } Cheers, Reinhold - -- - -- Reinhold Kainhofer, reinh...@kainhofer.com, http:// reinhold.kainhofer.com/ * Financial Actuarial Math., Vienna Univ. of Technology, Austria * http://www.fam.tuwien.ac.at/, DVR: 0005886 * LilyPond, Music typesetting, http://www.lilypond.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQFJ/eB4TqjEwhXvPN0RAmDgAJ9Zp6/SvBHhuFjyePOXfKKZdc6tLACeMv2w rTA6MRvQql1hY0ugdMmqJAk= =tSJ+ -END PGP SIGNATURE- ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
collision with crescendo text
Dear community, in the below quoted snippet, the crescendo -text should have more space. How can I do it? I made a trial, but without success. Here the short example: \version 2.13.0 dynalong= { \override DynamicTextSpanner #'extra-spacing-width = #'(0 . 0) \override DynamicTextSpanner #'extra-spacing-height = #'(-inf.0 . +inf.0) } %unfortunately this doesn't work \relative c'' { \dynalong \crescTextCresc \once \override DynamicTextSpanner #'dash-period = #-1.0 bes2 \ des \sf c1 } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: horizontal alignment suggestions
Am 03.05.2009 um 18:13 schrieb Kieren MacMillan: Hi James, Perhaps it's just my inability to explain what I want. I'd like to have the two systems centered on the page, regardless of what the instrumentName is. Ah... well, the best I can do right now is this (manual) workaround: \version 2.12.2 \paper { line-width = 8.5\in indent = 0 } \layout { \context { \Staff \override InstrumentName #'X-extent = #'(0 . 0) } } music = \relative { a4 g a f } Thanks, I think this may be just what I needed! I'll let you know how this works out for me. James E. Bailey ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Chord Names Tweak
Jonathan, On 5/2/09 2:23 PM, Jonathan Townes edmundtow...@gmail.com wrote: Hello all, Does anyone have suggestions for tweaking the position of accidental in chord names. For example, the flat sign in in the chord name Ab? I find in the default Lilypond setting the flat symbol is too big and too low on the base line. Thanks, Jonathan Unfortunately, this is not an easy tweak, because there is no property in the chord-name-interface that allows control of this (the chord-name functionality of LilyPond is in need of a major rewrite; I hope to get to it this summer, but we'll see). If I were going to try it, I'd alter scm/chord-name.scm. In that file, you'll find (define-public (alteration-text-accidental-markup alteration) (make-smaller-markup (make-raise-markup (if (= alteration FLAT) 0.3 0.6) (make-musicglyph-markup (assoc-get alteration standard-alteration-glyph-name-alist ) To change the positioning of the flat, you change 0.3 to a different number. To change the positioning of the sharp, you change 0.6 to a different number. In order to change the size of the flat (and not the sharp, too) you will need to do some rewrite on this procedure. In terms of making the change, you have two choices. One is to make the change in scm/chord-name.scm. The other is to redefine the function in your .ly file #define-public (alteration-text-accidental-markup alteration) (make-smaller-markup (make-raise-markup (if (= alteration FLAT) 0.3 0.6) (make-musicglyph-markup (assoc-get alteration standard-alteration-glyph-name-alist ) This definition will override the one in scm/chord-name.scm. Hope this helps, Carl ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user