Re: Use custom font's flat (b) and sharp (#) symbols for chords
Hi again, thx so far. Sorry for my English, I think I did not make myself clear enough, so I'll try to elaborate a little more. What I have: - I am setting notes and chords. - I changed the font for the chords to a custom one (real book style). - Notes (and related accidentals like flat and sharp) are set as usual. - Chord names (and options like 7, sus4 etc.) are set in the custom font. - Chord accidentals (like the b in A flat (Ab) or the # in F sharp (F#) are set with the symbols from Lilypond's font (i.e. accidentals.sharp and accidentals.flat from the Feta font). - Accidentals in chord options (like the b in 7/b9) are set using Feta. What I'd like to have: - The output of notes and related accidentals should remain as is. - Chord accidentals (i.e. for chord names like Ab as well as for chord. options like 7/#9) should be set using the b and # from the custom font. Possible options and problems: 1. I could make Lilypond use the custom font's symbols for flat and sharp by default like suggested (i.e. fiddling with the font directory). Disadvantage: Accidentals for regular notes would also be set with b and # from the custom font. 2. I could make Lilypond set chord options (7/b5 etc.) using the custom b and # by adding exceptions for all needed chords to sequential-music-to-chord-exceptions. Problem: All accidentals in chords (e.g. in Ab or F#) would still use the symbols from Feta. While option 1. is not viable (I do not want to lose Lilypond's accidentals for regular notes), option 2. partly solves the problem (for chord options), but then I would have two different types of accidentals when setting chords. So, what I would ideally like to have is a way of making Lilypond use b and # from a custom font, but exclusively in chord mode. I did quite some searching but did not come up with anything useful, so I already feared it might not be easy (or doable at all...). Any ideas? Thanks Matthias ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Use custom font's flat (b) and sharp (#) symbols for chords
Am 16.02.2011 10:29, schrieb Matthias Hüsken: Hi again, thx so far. Sorry for my English, I think I did not make myself clear enough, so I'll try to elaborate a little more. What I have: - I am setting notes and chords. - I changed the font for the chords to a custom one (real book style). - Notes (and related accidentals like flat and sharp) are set as usual. - Chord names (and options like 7, sus4 etc.) are set in the custom font. - Chord accidentals (like the b in A flat (Ab) or the # in F sharp (F#) are set with the symbols from Lilypond's font (i.e. accidentals.sharp and accidentals.flat from the Feta font). - Accidentals in chord options (like the b in 7/b9) are set using Feta. What I'd like to have: - The output of notes and related accidentals should remain as is. - Chord accidentals (i.e. for chord names like Ab as well as for chord. options like 7/#9) should be set using the b and # from the custom font. Possible options and problems: 1. I could make Lilypond use the custom font's symbols for flat and sharp by default like suggested (i.e. fiddling with the font directory). Disadvantage: Accidentals for regular notes would also be set with b and # from the custom font. 2. I could make Lilypond set chord options (7/b5 etc.) using the custom b and # by adding exceptions for all needed chords to sequential-music-to-chord-exceptions. Problem: All accidentals in chords (e.g. in Ab or F#) would still use the symbols from Feta. While option 1. is not viable (I do not want to lose Lilypond's accidentals for regular notes), option 2. partly solves the problem (for chord options), but then I would have two different types of accidentals when setting chords. So, what I would ideally like to have is a way of making Lilypond use b and # from a custom font, but exclusively in chord mode. I did quite some searching but did not come up with anything useful, so I already feared it might not be easy (or doable at all...). I think you can achieve what you want by writing a scheme function similar to those defined in scm/chord-names.scm. See for example the definition of note-name-german-markup. There you find that accidentals are replaced by -es -eses -is or -isis, respectively. So you could copy most of this definition and place your custom glyphs in there. HTH Marc Any ideas? Thanks Matthias ___ 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
Re: strange output
In data martedì 15 febbraio 2011 13:52:32, hai scritto: See Known issues and warnings in the Notation Reference, section 1.2.6, Grace notes. -- Phil Holmes Ok! Solved! But now this is the log: Processing `Impromptu.ly' Analisi... Interpreting music... Preprocessing graphical objects... Interpreting music... L'output MIDI è inviato a Impromptu.midi... programming error: Going back in MIDI time. continuing, cross fingers programming error: Going back in MIDI time. continuing, cross fingers Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `Impromptu.ps'... Converting to `./Impromptu.pdf'... success: Compilation successfully completed LilyPond [Impromptu.ly] terminato (3.4). -- oiram/bin/selom ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: engraving question - changing stem direction to avoid levitating slur
2011/2/15 Neil Puttock n.putt...@gmail.com: You might try adding the Melody_engraver for this: it changes the neutral-direction based on the stem directions of surrounding notes (but only in the current bar, I think): Wow, I did not know the existence of this engraver! It is not mentioned in the doc (except in the Internals), apparently it is not in the LSR neither. And I have never seen it in a message on these lists (and I am a subscriber since a few years). So thank you, I discovered something today thanks to you. And it looks interesting. Cheers, Xavier -- Xavier Scheuer x.sche...@gmail.com ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Use custom font's flat (b) and sharp (#) symbols for chords
Hi everyone, I'm new to Lilypond and impressed with the ease of writing music and the quality of the output. For writing lead sheets, I changed Lilypond's standard font for printing chord names to a custom font. While this works perfectly, the style difference between the chord symbols and Lilypond's flat and sharp symbols is very obvious. Is there a way to make Lilypond use the custom font's b and # symbols instead of the internal ones? Thanks in advance, Matthias ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: scheme artificial harmonic (transposition within chord)
Neil Puttock wrote: On 15 February 2011 14:25, Rob Canning r...@goto10.org wrote: where lies the error or is there a better way to do this - am slightly suprised there is not a build in function for this... maybe there is? There are several parser limitations you're encountering here. The only way around them is to stay in scheme when creating the new chord: artHarm = #(define-music-function (parser location note) (ly:music?) (let ((harm (ly:music-transpose (ly:music-deep-copy (car (ly:music-property note 'elements))) (ly:make-pitch 0 3 0 (set! (ly:music-property harm 'articulations) (list (make-music 'HarmonicEvent))) (set! (ly:music-property note 'elements) (append (ly:music-property note 'elements) (list harm))) note)) { \artHarm ais } BTW, this only works properly in absolute note mode due to the way transposing interacts with \relative { } blocks (there's a note in the docs warning about this under \transpose). from the docs i see that it might be possible if somehow another \relative can be included within the transpose doesnt work: \relative { \transpose c d {a4 b c d} } does work: \transpose c d { \relative { a4 b c d} } i wonder is it possible to add a relative within the function? or maybe allow the function to accept \relative as part of its input argument?i guess the former would be better if its possible my goal is so that the interval defined in the function is always placed above the root pitch passed as an argument any ideas if this is possible? thanks rob Cheers, Neil ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Use custom font's flat (b) and sharp (#) symbols for chords
So, what I would ideally like to have is a way of making Lilypond use b and # from a custom font, but exclusively in chord mode. I did quite some searching but did not come up with anything useful, so I already feared it might not be easy (or doable at all...). I think you can achieve what you want by writing a scheme function similar to those defined in scm/chord-names.scm. See for example the definition of note-name-german-markup. There you find that accidentals are replaced by -es -eses -is or -isis, respectively. So you could copy most of this definition and place your custom glyphs in there. That's actually quite a good idea. Based on your idea, the following should do the trick: #(define my-alteration-glyph-name-alist '( ;; ordered for optimal performance. (0 . ) (-1/2 . #) (1/2 . b) )) #(define (my-alteration-text-accidental-markup alteration) (make-smaller-markup (make-raise-markup (if (= alteration FLAT) 0.3 0.6) (make-text-markup (assoc-get alteration my-alteration-glyph-name-alist ) My only problem is: How do I get this code to work, i.e. how do I get LilyPond to use this code in chord-mode? I assume I would need to somehow activate it in the ChordNames context, bit how does this actually work? Matthias -- Matthias Hüsken Phone: +49 202 439-3362 Fachbereich Mathematik Fax: +49 202 439-2912 Bergische Universität Gaußstraße 20 D - 42097 Wuppertal e-mail: matthias.hues...@math.uni-wuppertal.de ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: alpha test, horizontal spacing
On Sat, Feb 12, 2011 at 6:04 AM, Jan Warchoł lemniskata.bernoulli...@gmail.com wrote: 2011/2/12 Trevor Daniels t.dani...@treda.co.uk: Jan Warchoł wrote Saturday, February 12, 2011 9:25 AM I agree too, but in my opinion it's a less important problem than the one marked in red in the attachment. (However, it was present in 2.12.3 too). The natural on c is perhaps moved because of the dot on f, but i don't think it should be moved this way. Agreed. Although two almost identical situations are typeset correctly in the same example, with the accidental sliding neatly over the dot. This must be a bug, so copying to Bug list for bug squad to process. I think i have an idea how to explain this bug. I suppose it happens because LilyPond is not aware that the dot is in voiceTwo context (and therefore lower than usual). compile this: { g'4.*1/32 d''!32 g'4.*1/32 e''!32 } { \voiceTwo g'4.*1/32 \voiceOne d''!32 \voiceTwo g'4.*1/32 \voiceOne e''!32 } In the upper line, the first accidental (on d'') is too low to move left (it would collide with the dot). The second accidental (on e'') is high enough to be moved over dot. Everything fine here. Now in the second line the music is the same except that dotted notes are in lower voice. This makes the dots move down, they are a whole staffspace lower. However, Lily fails to notice that, and engraves the naturals exactly like in the upper line. cheers, Janek ___ bug-lilypond mailing list bug-lilyp...@gnu.org http://lists.gnu.org/mailman/listinfo/bug-lilypond What's the status of this? I cannot find an issue on the tracker. Did I miss something? Ralph ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: strange output
Yes - this is a known issue: http://code.google.com/p/lilypond/issues/detail?id=1412 Just ignore the error message. -- Phil Holmes - Original Message - From: Mario Moles To: lilypond-user@gnu.org Sent: Wednesday, February 16, 2011 11:06 AM Subject: Re: strange output In data martedì 15 febbraio 2011 13:52:32, hai scritto: See Known issues and warnings in the Notation Reference, section 1.2.6, Grace notes. -- Phil Holmes Ok! Solved! But now this is the log: Processing `Impromptu.ly' Analisi... Interpreting music... Preprocessing graphical objects... Interpreting music... L'output MIDI è inviato a Impromptu.midi... programming error: Going back in MIDI time. continuing, cross fingers programming error: Going back in MIDI time. continuing, cross fingers Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `Impromptu.ps'... Converting to `./Impromptu.pdf'... success: Compilation successfully completed LilyPond [Impromptu.ly] terminato (3.4). -- oiram/bin/selom -- ___ 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
Re: Use custom font's flat (b) and sharp (#) symbols for chords (solved)
Hi again, thanks a lot for the pointers in the right direction, I finally got my problem solved. It is based on the solution found here: http://www.mailinglistarchive.com/lilypond-user@gnu.org/msg02286.html In case someone else stumbles upon this problem, here is my (shortened) solution: % correct markup for b and # (use symbols from current font...) chordFlat = \markup { \hspace #0.2 \fontsize #-1 \raise #0.1 b } chordSharp = \markup { \hspace #0.1 \fontsize #-1 \lower #0.3 # } % define custom chords mhPopChordsMusic = { c e g bes-\markup { \super 7 } % ... define all other possible chords here... } % Add to existing exceptions mhPopChordsAdd = #(append (sequential-music-to-chord-exceptions mhPopChordsMusic #t) ignatzekExceptions) % fix accidentals with some Scheme (using the current font's symbols) #(define (mh-chord-name-pop-markup pitch) (let* ((alt (ly:pitch-alteration pitch))) (make-line-markup (list (make-simple-markup (vector-ref #(C D E F G A B (ly:pitch-notename pitch))) ;; If it's natural, do nothing (if (= alt 0) (make-line-markup (list empty-markup)) (if (= alt FLAT) ;; Otherwise, handle adding the flat symbol (make-line-markup (list (make-hspace-markup 0.3) ;; WAS: 0.4 (make-small-markup (make-raise-markup 0.7 (make-text-markup b))) )) ;; or handle adding the sharp symbol (make-line-markup (list (make-hspace-markup 0.1) ;; WAS: 0.2 (make-small-markup (make-raise-markup 0.7 (make-text-markup #))) )) ) ) % % use like this: % % { % popChords = % { % \set chordNameExceptions = #mhPopChordsAdd % \set chordRootNamer = #mh-chord-name-pop-markup % } % } % % % or like this: % % \layout % { % \context % { % \Score % chordNameExceptions = #mhPopChordsAdd % chordRootNamer = #mh-chord-name-pop-markup % } % } Thanks again! Matthias ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Use custom font's flat (b) and sharp (#) symbols for chords (solved)
2011/2/16 Matthias Hüsken matthias.hues...@math.uni-wuppertal.de: Hi again, thanks a lot for the pointers in the right direction, I finally got my problem solved. It is based on the solution found here: http://www.mailinglistarchive.com/lilypond-user@gnu.org/msg02286.html In case someone else stumbles upon this problem, here is my (shortened) solution: [...] Hi, In case someone else stumbles upon this problem, it would be great if the solution was on the LSR : http://lsr.dsi.unimi.it/ Could you add this as a new snippet ? http://lsr.dsi.unimi.it/LSR/html/contributing.html Thanks in advance. Cheers, Xavier -- Xavier Scheuer x.sche...@gmail.com ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Use custom font's flat (b) and sharp (#) symbols for chords
On 2/16/11 2:29 AM, Matthias Hüsken matthias.hues...@math.uni-wuppertal.de wrote: Hi again, thx so far. Sorry for my English, I think I did not make myself clear enough, so I'll try to elaborate a little more. Your English is great. I just think that none of us knew how to answer you. So, what I would ideally like to have is a way of making Lilypond use b and # from a custom font, but exclusively in chord mode. I think you mean exclusively in the ChordNames context, rather than exclusively in chord mode I did quite some searching but did not come up with anything useful, so I already feared it might not be easy (or doable at all...). I think you can redefine alteration-text-accidental-markup (it's found in scm/chord-name.scm. I don't think that you need to edit scm/chord-name.scm. A definition in your input file should redefine the existing procedure. HTH, Carl ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Overriding bar-line behaviour
Hi again, while trying to change LilyPond's behaviour concerning bar lines, I stumbled upon some strange behaviour. What I'd like to achieve: When ending a bar with e repetition sign :|, I need double lines (||) at the beginning of the next bar. I found bar-glyph-alist in scm/output-lib.scm and decided to change it to the following lines (shortened for this example): #(define bar-glyph-alist '( ;; regular bar (| . (| . ())) ;; repetitions (|: . (| . |:)) (:| . (:| . ())) (:|: . (:| . |:)) ;; double lines (|| . (|| . ())) ;; double lines combined with repetitions (||: . (|| . |:)) (:|| . (:| . ||)) )) When setting music now, everything works as expected. As I consider changing LilyPond's default files as hacking, I decided to move the list into my .ly file (see attached file) and revert scm/output-lib.scm to its original state. Unfortunately, this does not work: LilyPond leaves the end of the line (where a repetition sign :| should be found) empty, as well as the beginning of the next line. Does anyone have any clues what's going wrong? Thanks, Matthias \version 2.12.2 % override default bar types to allow arbitrarily placed bar lines #(define my-bar-glyph-alist '( ;; regular bar (| . (| . ())) ;; repetitions (|: . (| . |:)) (:| . (:| . ())) (:|: . (:| . |:)) ;; double lines (|| . (|| . ())) ;; double lines combined with repetitions (||: . (|| . |:)) (:|| . (:| . ||)) )) #(define (my-bar-line::calc-glyph-name grob) (let* ( (index-cell (lambda (cell dir) (if (equal? dir 1) (cdr cell) (car cell (glyph (ly:grob-property grob 'glyph)) (dir (ly:item-break-dir grob)) (result (assoc glyph my-bar-glyph-alist)) (glyph-name (if (= dir CENTER) glyph (if (and result (string? (index-cell (cdr result) dir))) (index-cell (cdr result) dir) #f))) ) glyph-name )) \new Score { \new Staff { \override Staff.BarLine #'glyph-name = #my-bar-line::calc-glyph-name \bar |: g'1 \bar :|| \break g'1 \bar || \break } } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: engraving question - changing stem direction to avoid levitatingslur
- Original Message - From: Xavier Scheuer x.sche...@gmail.com To: Neil Puttock n.putt...@gmail.com Cc: Janek Warchoł lemniskata.bernoull...@gmail.com; lilypond-user lilypond-user@gnu.org Sent: Wednesday, February 16, 2011 1:23 PM Subject: Re: engraving question - changing stem direction to avoid levitatingslur 2011/2/15 Neil Puttock n.putt...@gmail.com: You might try adding the Melody_engraver for this: it changes the neutral-direction based on the stem directions of surrounding notes (but only in the current bar, I think): Wow, I did not know the existence of this engraver! It is not mentioned in the doc (except in the Internals), apparently it is not in the LSR neither. And I have never seen it in a message on these lists (and I am a subscriber since a few years). So thank you, I discovered something today thanks to you. And it looks interesting. Cheers, Xavier Now added to the LSR as http://lsr.dsi.unimi.it/LSR/Item?id=751 -- Phil Holmes ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Use custom font's flat (b) and sharp (#) symbols for chords(solved)
- Original Message - From: Xavier Scheuer x.sche...@gmail.com To: Matthias Hüsken matthias.hues...@math.uni-wuppertal.de Cc: lilypond-user@gnu.org Sent: Wednesday, February 16, 2011 5:32 PM Subject: Re: Use custom font's flat (b) and sharp (#) symbols for chords(solved) 2011/2/16 Matthias Hüsken matthias.hues...@math.uni-wuppertal.de: Hi again, thanks a lot for the pointers in the right direction, I finally got my problem solved. It is based on the solution found here: http://www.mailinglistarchive.com/lilypond-user@gnu.org/msg02286.html In case someone else stumbles upon this problem, here is my (shortened) solution: [...] Hi, In case someone else stumbles upon this problem, it would be great if the solution was on the LSR : http://lsr.dsi.unimi.it/ Could you add this as a new snippet ? http://lsr.dsi.unimi.it/LSR/html/contributing.html Thanks in advance. Cheers, Xavier = http://lsr.dsi.unimi.it/LSR/Item?id=750 (thanks, Matthias) -- Phil Holmes ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Overriding bar-line behaviour
Sorry for the noise on the mailing list - I knew it was some stupid mistake... I tried to override the wrong value, it should have been \override Score.BarLine #'break-glyph-function = #my-bar-line::calc-glyph-name instead of \override Staff.BarLine #'glyph-name = #my-bar-line::calc-glyph-name Corrected file attached. Cheers, Matthias Am Mittwoch, 16. Februar 2011 schrieb Matthias Hüsken: Hi again, while trying to change LilyPond's behaviour concerning bar lines, I stumbled upon some strange behaviour. What I'd like to achieve: When ending a bar with e repetition sign :|, I need double lines (||) at the beginning of the next bar. I found bar-glyph-alist in scm/output-lib.scm and decided to change it to the following lines (shortened for this example): #(define bar-glyph-alist '( ;; regular bar (| . (| . ())) ;; repetitions (|: . (| . |:)) (:| . (:| . ())) (:|: . (:| . |:)) ;; double lines (|| . (|| . ())) ;; double lines combined with repetitions (||: . (|| . |:)) (:|| . (:| . ||)) )) When setting music now, everything works as expected. As I consider changing LilyPond's default files as hacking, I decided to move the list into my .ly file (see attached file) and revert scm/output-lib.scm to its original state. Unfortunately, this does not work: LilyPond leaves the end of the line (where a repetition sign :| should be found) empty, as well as the beginning of the next line. Does anyone have any clues what's going wrong? Thanks, Matthias -- Matthias Hüsken Phone: +49 202 439-3362 Fachbereich Mathematik Fax: +49 202 439-2912 Bergische Universität Gaußstraße 20 D - 42097 Wuppertal e-mail: matthias.hues...@math.uni-wuppertal.de \version 2.12.2 % override default bar types to allow arbitrarily placed bar lines #(define my-bar-glyph-alist '( ;; regular bar (| . (| . ())) ;; repetitions (|: . (| . |:)) (:| . (:| . ())) (:|: . (:| . |:)) ;; double lines (|| . (|| . ())) ;; double lines combined with repetitions (||: . (|| . |:)) (:|| . (:| . ||)) )) #(define (my-bar-line::calc-glyph-name grob) (let* ( (index-cell (lambda (cell dir) (if (equal? dir 1) (cdr cell) (car cell (glyph (ly:grob-property grob 'glyph)) (dir (ly:item-break-dir grob)) (result (assoc glyph my-bar-glyph-alist)) (glyph-name (if (= dir CENTER) glyph (if (and result (string? (index-cell (cdr result) dir))) (index-cell (cdr result) dir) #f))) ) glyph-name )) \new Score { \new Staff { \override Score.BarLine #'break-glyph-function = #my-bar-line::calc-glyph-name \bar |: g'1 \bar :|| \break g'1 \bar || \break } } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Shorthand notation for multi-measure rests in music with frequent meter changes ?
I'm currently transcribing parts from music with frequently changing meters and segments where a part is resting. The sequence below is typical. \time 3/4 R1*3/4 | \time 3/8 R1*3/8 | \time 4/4 R1*8/4 | % 2 bars \time 3/8 R1*3/8 | Does anyone know how to write a music function that will support a more compact notation? Being able specify the time signature changes and rests shown above with a syntax like the following would be a nice timesaver. mmr = #(define-music-function ) \mmr 3/4 3/8 2*4/4 3/8 ... The best I've been able to cobble together is too messy to be useful because of the need to use the # sign before arguments, etc. In particular, I haven't found any way to pass a bare fraction like 3/4 into a music function. Thanks, Mike ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Overriding bar-line behaviour
Ok, I give up for tonight - obviously, before writing my last mail I tested while having the new barline definitions in scm/output-lib.scm (instead of reverting that file). Which means I cannot get things to work without modifying scm/output-lib.scm. Any ideas how to put this into a .ly file are most welcome... Matthias Am Mittwoch, 16. Februar 2011 schrieb Matthias Hüsken: Sorry for the noise on the mailing list - I knew it was some stupid mistake... I tried to override the wrong value, it should have been \override Score.BarLine #'break-glyph-function = #my-bar-line::calc-glyph-name instead of \override Staff.BarLine #'glyph-name = #my-bar-line::calc-glyph-name Corrected file attached. Cheers, Matthias Am Mittwoch, 16. Februar 2011 schrieb Matthias Hüsken: Hi again, while trying to change LilyPond's behaviour concerning bar lines, I stumbled upon some strange behaviour. What I'd like to achieve: When ending a bar with e repetition sign :|, I need double lines (||) at the beginning of the next bar. I found bar-glyph-alist in scm/output-lib.scm and decided to change it to the following lines (shortened for this example): #(define bar-glyph-alist '( ;; regular bar (| . (| . ())) ;; repetitions (|: . (| . |:)) (:| . (:| . ())) (:|: . (:| . |:)) ;; double lines (|| . (|| . ())) ;; double lines combined with repetitions (||: . (|| . |:)) (:|| . (:| . ||)) )) When setting music now, everything works as expected. As I consider changing LilyPond's default files as hacking, I decided to move the list into my .ly file (see attached file) and revert scm/output-lib.scm to its original state. Unfortunately, this does not work: LilyPond leaves the end of the line (where a repetition sign :| should be found) empty, as well as the beginning of the next line. Does anyone have any clues what's going wrong? Thanks, Matthias -- Matthias Hüsken Phone: +49 202 439-3362 Fachbereich Mathematik Fax: +49 202 439-2912 Bergische Universität Gaußstraße 20 D - 42097 Wuppertal e-mail: matthias.hues...@math.uni-wuppertal.de ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Right hand notes have too many ledger lines.
This is the code: \version 2.12.3 \score { \new PianoStaff \set PianoStaff.midiInstrument = acoustic grand \tempo 4 = 120 \new Staff { \relative c' { c d c b a c d c c d c b g c d c } } \new Staff { \clef bass \relative c { g c e c f, a c a g c e c f, a c a } } \midi { } \layout{ } } I have attached the PDF output with this email. In his score, the treble clef is supposed to be played with right hand and the bass clef with left hand. However, in the treble clef (right hand), we have two notes ('a' and 'g') which are below the middle C and thus represented by extra ledger lines. Unfortunately, there are too many of these in the music I am writing and the score is full of too many ledger lines. What is the recommended way of writing scores like these? Could you please modify this code to the recommended style so that I can learn the right way to do this? ledger.pdf Description: Adobe PDF document ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Shorthand notation for multi-measure rests in music with frequent meter changes ?
I can't answer your question, but I have two responses to the dilemma. First, R2. is more compact than R1*3/4, and R1*2 is better than R1*8/4. Same with R4*5 vs R1*5/4. Also, if you happen to use Vim -- I keep all my time signatures in a separate file from the notes. It's then simple to map time signatures to keystrokes; entering time signatures can be very very fast. So I hit the letter A and I get \time 1/4 s4. Quick and maybe not helpful answer, but there you go. On Wed, Feb 16, 2011 at 11:53 AM, Michael Ellis michael.f.el...@gmail.com wrote: I'm currently transcribing parts from music with frequently changing meters and segments where a part is resting. The sequence below is typical. \time 3/4 R1*3/4 | \time 3/8 R1*3/8 | \time 4/4 R1*8/4 | % 2 bars \time 3/8 R1*3/8 | Does anyone know how to write a music function that will support a more compact notation? Being able specify the time signature changes and rests shown above with a syntax like the following would be a nice timesaver. mmr = #(define-music-function ) \mmr 3/4 3/8 2*4/4 3/8 ... The best I've been able to cobble together is too messy to be useful because of the need to use the # sign before arguments, etc. In particular, I haven't found any way to pass a bare fraction like 3/4 into a music function. Thanks, Mike ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user -- Neil Thornock, D.M. The recent BYU Symphony Orchestra performance of Plutoids: http://neilthornock.net/mp3s/plutoids.mp3 Assistant Professor of Music Composition/Theory Brigham Young University ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Right hand notes have too many ledger lines.
2011/2/16 Disc Magnet discmag...@gmail.com: This is the code: \version 2.12.3 \score { \new PianoStaff \set PianoStaff.midiInstrument = acoustic grand \tempo 4 = 120 \new Staff { \relative c' { c d c b a c d c c d c b g c d c } } \new Staff { \clef bass \relative c { g c e c f, a c a g c e c f, a c a } } \midi { } \layout{ } } I have attached the PDF output with this email. In his score, the treble clef is supposed to be played with right hand and the bass clef with left hand. However, in the treble clef (right hand), we have two notes ('a' and 'g') which are below the middle C and thus represented by extra ledger lines. Unfortunately, there are too many of these in the music I am writing and the score is full of too many ledger lines. What is the recommended way of writing scores like these? I'd say that two ledger lines is not much, really. I'm not a pro and yet i've seen scores with many more ledgers. I'd say that three and sometimes even four ledger lines aren't too many, if they appear occasionally. It also depends on the type of instrument and the context (for example having three ledger lines in a vertically crowded orchestral score may be problematic, while it would be perfectly natural in, let's say, solo violin score). Of course, if there is a long passage with many ledger lines, it may be good to temporarily change clef or use an ottava bracket. These are described in Notation Reference 1.1.3: http://lilypond.org/doc/v2.13/Documentation/notation/displaying-pitches However, there are no strict rules when to apply these, you must use your own judgement. Remember that swapping clefs too frequently may be as cumbersome too read as numerous ledger lines. hope that helps, Janek ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Shorthand notation for multi-measure rests in music with frequent meter changes ?
Thanks Neil, those are good tips. I'm a long time vim user so shortcuts are certainly a possibility. OTOH, I've recently found that JEdit + LilyPondTool makes a real difference in my productivity compared to vim + some helper scripts I had put together. I know JEdit has its own Java-based macro language but if I'm going to let coding distract me from music (happens waaayyy too often) I might as well put the time into getter better at Scheme. Anyway, I do appreciate the suggestions and may put them to use if creating a music-function looks like too big a time-sink. Cheers, Mike On Wed, Feb 16, 2011 at 2:24 PM, Neil Thornock neilthorn...@gmail.com wrote: I can't answer your question, but I have two responses to the dilemma. First, R2. is more compact than R1*3/4, and R1*2 is better than R1*8/4. Same with R4*5 vs R1*5/4. Also, if you happen to use Vim -- I keep all my time signatures in a separate file from the notes. It's then simple to map time signatures to keystrokes; entering time signatures can be very very fast. So I hit the letter A and I get \time 1/4 s4. Quick and maybe not helpful answer, but there you go. On Wed, Feb 16, 2011 at 11:53 AM, Michael Ellis michael.f.el...@gmail.com wrote: I'm currently transcribing parts from music with frequently changing meters and segments where a part is resting. The sequence below is typical. \time 3/4 R1*3/4 | \time 3/8 R1*3/8 | \time 4/4 R1*8/4 | % 2 bars \time 3/8 R1*3/8 | Does anyone know how to write a music function that will support a more compact notation? Being able specify the time signature changes and rests shown above with a syntax like the following would be a nice timesaver. mmr = #(define-music-function ) \mmr 3/4 3/8 2*4/4 3/8 ... The best I've been able to cobble together is too messy to be useful because of the need to use the # sign before arguments, etc. In particular, I haven't found any way to pass a bare fraction like 3/4 into a music function. Thanks, Mike ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user -- Neil Thornock, D.M. The recent BYU Symphony Orchestra performance of Plutoids: http://neilthornock.net/mp3s/plutoids.mp3 Assistant Professor of Music Composition/Theory Brigham Young University ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Lilypond-book: Adjust left page margin
Hi, currently I'm working on a song book with lilypond-book. I would like to have equal page margins on the left and right of 1 cm. So I configured the page layout with the LaTex geometry package. Lilypond-book adopts the staff length accordingly: The right space from the end of a staff line to the page border is 1 cm. But the left space from the page border to the beginning of the staff line is slightly larger. That bothers me, because the song text following the song notes is nomore aligned with the staff lines. I tried to solve this problem with two approaches: 1) With the lilypond-book option --left-padding=AMOUNT 2) \once \override Staff.StaffSymbol #'X-offset = #0 With both approaches I have no success. Does anybody have an idea how I can adjust the left page margin? Thanks for any hints, Daniel. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Overriding bar-line behaviour
Matthias Hüsken wrote: What I'd like to achieve: When ending a bar with the repetition sign :|, I need double lines (||) at the beginning of the next bar. It looks as though you actually mean ending/beginning lines, not bars. [...] (:|| . (:| . ||)) [...] Unfortunately, this does not work: LilyPond leaves the end of the line [...] empty, as well as the beginning of the next line. Lilypond's barline.cc doesn't recognise your bartype string :|| and quietly sets the bartype to empty before continuing. So unless you extend the C++ hardcoding you are limited to the bartypes listed in the bar-line-interface documentation. If you will be using explicit line breaks like in your snippet I would suggest a \once-like approach as in the attached barRightrepeatDouble.ly. Cheers, Robin barRightrepeatDouble = { \once \override Score.BarLine #'break-visibility = #all-visible \once \override Score.BarLine #'glyph-name = #(lambda(grob) (if (not (= (ly:item-break-dir grob) RIGHT)) :| ||)) } \new Score { \new Staff { \bar |: g'1 \barRightrepeatDouble \break g'1 \bar || \break } } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Right hand notes have too many ledger lines.
Disc Magnet, -Original Message- From: Disc Magnet discmag...@gmail.com Date: Thu, 17 Feb 2011 00:37:04 +0530 To: lilypond-user lilypond-user@gnu.org Subject: Right hand notes have too many ledger lines. This is the code: \version 2.12.3 \score { \new PianoStaff \set PianoStaff.midiInstrument = acoustic grand \tempo 4 = 120 \new Staff { \relative c' { c d c b a c d c c d c b g c d c } } \new Staff { \clef bass \relative c { g c e c f, a c a g c e c f, a c a } } \midi { } \layout{ } } I have attached the PDF output with this email. In his score, the treble clef is supposed to be played with right hand and the bass clef with left hand. However, in the treble clef (right hand), we have two notes ('a' and 'g') which are below the middle C and thus represented by extra ledger lines. Unfortunately, there are too many of these in the music I am writing and the score is full of too many ledger lines. What is the recommended way of writing scores like these? 2 legder lines is perfectly acceptable. Actually there is no 'limit' Indeed many of my flute players show me scores with 4 or more ledger lines above the stave. You can use ottava brackets or you can change the clef however this is 'overkill' for two ledger lines and depending on the instrument remembering to switch up or down an octave or 5th or whatever is much more inconvenient than a few legder lines. There is nothing wrong with what you have written. I suggest you look at http://lilypond.org/doc/v2.13/Documentation/notation/displaying-pitches#ott ava-brackets Or http://lilypond.org/doc/v2.13/Documentation/notation/displaying-pitches#cle f However for something as trivial as this, I wouldn't recommend it. James ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Right hand notes have too many ledger lines.
On 2/16/11 12:07 PM, Disc Magnet discmag...@gmail.com wrote: I have attached the PDF output with this email. In his score, the treble clef is supposed to be played with right hand and the bass clef with left hand. However, in the treble clef (right hand), we have two notes ('a' and 'g') which are below the middle C and thus represented by extra ledger lines. Unfortunately, there are too many of these in the music I am writing and the score is full of too many ledger lines. What is the recommended way of writing scores like these? There are two choices that you would generally have: 1. You can change the voice between staves, either manually or with the use of autochange. 2. You can change the clef in your upper staff by use of the \clef command. The way you do it is up to you and depends on the specifics of the music you are engraving. HTH, Carl ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Barline at the beginning of a piece
Hullo all. I am creating chant templates for the 8 tones, and need repeat barlines at the beginning of each section. I know how to acheive that in the gregorian.ly style, but how do I do this if I do not have that feature on? i.e. no gregorian.sty and cadenzaOn? Before, I would type: \repeat volta 2 { music stuff } with the following underneath global: global = { \key f \major \override Staff.TimeSignature #'stencil = ##f %\override Staff.BarLine #'stencil = ##f \set Score.defaultBarType = empty \bar |: } But, do I still do this now? Thanks. -- In Christ, Michael D ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Right hand notes have too many ledger lines.
Disc Magnet discmag...@gmail.com writes: I have attached the PDF output with this email. In his score, the treble clef is supposed to be played with right hand and the bass clef with left hand. However, in the treble clef (right hand), we have two notes ('a' and 'g') which are below the middle C and thus represented by extra ledger lines. Unfortunately, there are too many of these in the music I am writing and the score is full of too many ledger lines. What is the recommended way of writing scores like these? Huh? Note that the classical instrument for the treble clef is the violin, and it goes down to g (two ledger lines). An instrument with a hard split between right and left hand is the accordion, starting at f for piano accordions (three ledger lines). Nobody wastes any thought about that. In order to save singers ledger lines, in pre-baroque times every voice had its own clef. But nobody does that anymore. Piano scores sometimes switch both hands to the same clef, or octavate one clef. Pretty much the only other clef in use is the C clef used for viola. And some cello parts might switch to this clef when they get quite high. But that's about it. Other than that, people use ledger lines. Could you please modify this code to the recommended style so that I can learn the right way to do this? Looks fine as it is. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Right hand notes have too many ledger lines.
2011/2/16 Disc Magnet discmag...@gmail.com: I have attached the PDF output with this email. In his score, the treble clef is supposed to be played with right hand and the bass clef with left hand. However, in the treble clef (right hand), we have two notes ('a' and 'g') which are below the middle C and thus represented by extra ledger lines. Unfortunately, there are too many of these in the music I am writing and the score is full of too many ledger lines. What is the recommended way of writing scores like these? Could you please modify this code to the recommended style so that I can learn the right way to do this? This example is way much better as it is than with any change of staff or clef for these notes. If, as you say, a staff goes to a hand, think for a moment that two halves of the pianist's brain (so to speak) are reading each staff and those ledger lines help keeping the notes in the same staff and therefore makes them to be more easily read. Overmore, this example makes a very typical piano music fragment as it is typeset. -- Francisco Vila. Badajoz (Spain) www.paconet.org , www.csmbadajoz.com ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user