Peter Gentry | 18 Nov 13:28 2014
Picon

Beginners problem with display in an include file


\version "2.18.2"
;;; OS Vista and Frescobaldi
;;; attempt to improve include file enharmonic.ly
;;; why does guile display fail to produce an output to thefresobaldi log file
#(ly:message "Test debug 1\n")
#(define (naturalize-pitch p)
(let ((o (ly:pitch-octave p))
(a (* 4 (ly:pitch-alteration p)))
;;; alteration, a, in quarter tone steps,
;; for historical reasons
(n (ly:pitch-notename p)))
(cond
((and (> a 1) (or (eq? n 6) (eq? n 2)))
(set! a (- a 2))
(set! n (+ n 1)))
((and (< a -1) (or (eq? n 0) (eq? n 3)))
(set! a (+ a 2))
(set! n (- n 1))))
(display a)
(cond
 ((> a 2) (ly:message "a>2"))
 ((< a -2) (ly:message "a<-2"))
)
(cond
((> a 2) (set! a (- a 4)) (set! n (+ n 1)))
((< a -2) (set! a (+ a 4)) (set! n (- n 1))))
(cond
 ((< n 0) (ly:message "n<0"))
 ((= n 0) (ly:message "n=0"))
(Continue reading)

Pierre Perol-Schneider | 18 Nov 11:14 2014
Picon

Markup : convert to v2.18/v2.19 generate error

but this gives me
"error: unexpected post-event".

So I've come up with this function :

ti =
#(define-music-function (parser location button) (string?)
  (if cadb
    #{
      \markup
      \override #'(direction . 0)
      \fontsize #-1.5 #button
    #}
    #{
      \markup
      \override #'(direction . (rang button))
      \underline \fontsize #-1.5 #(touchnum button)
    #}))


but I'm still stuck with another error :

error: music function cannot return \markup \override #'(direction rang button) \underline \fontsize #-1.5 "3"


Herewith is a tiny example that shows the problem.

TIA, cheers,
Pierre



Attachment (arnaudEssai.ly): text/lilypond-source, 1892 bytes
_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
ingbolbograr | 18 Nov 06:34 2014
Picon

Defining a variable for path names

I have two different versions of each of my lilypond files, each with a
different header.  At the top of each file, I have this:

\include "C:/songs/lilypond_header_file_1.ly"
%\include "C:/music/lilypond_header_file_2.ly"

I'd like to be able to use a global variable that is set in only one place
(maybe somewhere in C:\Program Files
(x86)\LilyPond\usr\share\lilypond\current\ly) to determine which header file
to use.  That way, at the top of each file I could write something like

\include "$header_file"

and I would know that whenever I compile a given file, it would use the
header file that I specified.

How do I do this?

Thanks.

--
View this message in context: http://lilypond.1069038.n5.nabble.com/Defining-a-variable-for-path-names-tp168784.html
Sent from the User mailing list archive at Nabble.com.
ivan.k.kuznetsov | 18 Nov 00:38 2014
Picon

Nalesnik's Roman number analysis code


Mr. Nalesnik: thank you for making public your scheme code
for writing Roman Numeral/figured bass analysis:

   http://comments.gmane.org/gmane.comp.gnu.lilypond.general/70354

This code has been invaluable to me for writing examples for a music
theory course.

I have one small issue, and that is, when I want to
put three Arabic numerals that are to be in one vertical line
after a roman number, the numbers are not rendered this way,
as demo-ed by my attached sample lilypond file.

Yes, I know that the figured bass "6 5 3" is usually abbreviated
as "6 5", but for the purposes of instruction, I find it desirable to
sometimes have all three Arabic numbers.

Is there a way that your code can be expanded to accommodate
three Arabic numbers in one vertical column?

I see that your above post is dated March of 2012, and
so perhaps, you have some more recent code that has
been made available?

Thank you again for your code.  Ivan.

P.S.  For those you would like to run my sample lilypond file, you
need to download the rN.ly file from the above link,
edit out everything after "... %%% EXAMPLE %%% ..."
and include this file in the same directory.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\include "english.ly"

\include "rN.ly" % Used as is, except delete everything after "EXAMPLE"

\score {

  \new Staff = "f_major" \with { \remove "Time_signature_engraver" }
  {
    \time 4/4
    \key f \major
    \clef "treble"
    \voiceOne { <c'' e' g' bf'>1 }
  }
  \addlyrics{
       \markup \rN { V 6 5 3 }
  }
}
Stefan Thomas | 17 Nov 21:34 2014
Picon

bracket for semitone

Dear community,
I would like to draw a bracket for a semitone, like You can see it at
http://www.musiklehre.at/Bilder/b0048.gif
How can this be done in lilypond?
_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Jay Vara | 17 Nov 13:37 2014

Replace slur events with skip

I tried to change the tiedNoteToSkip procedure to also skip slurs. For some reason, it does not seem to work the same way. It skips the first note in a 3 note slur, but not the second. 

Here is the script:

\version "2.19.15"

#(define (name-of music) (ly:music-property music 'name))

tiedNoteToSkip = #(define-music-function (parser location music) (ly:music?)

(let ((prev-was-tie? #f))

(map-some-music

(lambda (evt)

(cond ((memq (name-of evt) '(EventChord NoteEvent))

(let ((old-flag prev-was-tie?))

(set! prev-was-tie? #f)

(let ((res (music-filter (lambda(x)

(or (not (or (eq? (name-of x) 'SlurEvent)

(eq? (name-of x) 'TieEvent)))

(begin (set! prev-was-tie? #t) 

#f)))

evt)))

(if old-flag (skip-of-length evt) res))))

(else (ly:music-property music 'duration #f))))

music)))

music = \relative c' {e4 e8 ( d16 e16) g2 g g16 (c16 a8) g4 c4 ~c~ c}

mus = \tiedNoteToSkip \music

\score {

\new Staff {

<<

\new Voice {

\music

}

\context NoteNames {

\mus

}

>>

}

\layout {

\context {

\Voice

%\consists \SarigamaEngraver

\remove Note_heads_engraver

\remove Rest_engraver

\consists Completion_heads_engraver

\consists Completion_rest_engraver

}

} }




_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Jayaratna | 17 Nov 09:17 2014
Picon

Forcing Litlypond-book

Dear members,

I have a group of .ly files that I need to update because o some changes I
have made on a layout file which is included in some files of my document
(not all of them). Executing lilypond-book gives no updating, because the
files themselves have not been changed. Is there a way to force
Lilypond-book processing all the files without having to clear my folder of
all the generated files all the times?

thank you,
A

--
View this message in context: http://lilypond.1069038.n5.nabble.com/Forcing-Litlypond-book-tp168763.html
Sent from the User mailing list archive at Nabble.com.
Guy Stalnaker | 16 Nov 23:39 2014
Picon

Beaming on the quarter note

All,

I've done the search and found much of relevance, but nothing that
gives me what I want.

I'd like beaming restricted to quarter-note groups for all meters I
may use in a score (4/4, 3/4, 5/4, 6/4). I'm not using triple meters
in this work so such is irrelevant to my purpose.

What's happening is that the automatic beaming is beaming sets of 4
eighth-notes in 4/4 measures, and 6 eight-notes in 3/4 meaures if all
the notes in them are eighth-notes. This may be fine for
instrumentalists, but it is not fine for choral pieces where beaming
by beat pulse is my preference.

Is there a method short of manual beaming to tell Lilypond to group
beaming by quarter notes always no matter the ?/4 time?

Thanks,

Guy Stalnaker
jimmyg521 <at> gmail.com
Patrick or Cynthia Karl | 16 Nov 19:25 2014

Problem with ChordNames

I am using LilyPond 2.19.15 on a mac running OSX 10.10 (Yosemite).

The following snippet (from section 2.7.2 Displaying Chords of the Notation Manual):

 \version "2.19.15"

\new ChordNames {
  \chordmode {
    c2 f4. g8
  }
}

fails with the following in the log file:

Drawing systems...
Layout output to `document.ps'...
warning: do not know how to embed "BitstreamVeraSans-Roman"="/Library/Fonts/Vera.tff"
Converting to `./document.pdf'...
warning: `(gs -q -dSAFER -dDEVICEWIDTHPOINTS=595.28 -dDEVICEHEIGHTPOINTS=841.89
-dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -r1200 -sDEVICE=pdfwrite
-sOutputFile=./document.pdf -c.setpdfwrite -fdocument.ps)' failed (256)

fatal error: failed files: "/var/folders/3_/fhptxgks4vd0t5spsm5mbjd80000gn/T/frescobaldi-G7De3Y/tmp_ThbNw/document.ly"
Exited with return code 1.

This seems to be identical to a problem reported in 2011 (Can't embed font for chord changes), but the answer
was that OSX 10.6.7 had a font bug.  Is this still the case?  Is there a workaround?
Patrick Hubers | 16 Nov 18:29 2014
Picon

Slur and tuplet bracket colliding

Hi,

I'm having a situation where slurs and tuplet brackets are colliding. The strange thing is that the slur is placed closer to the notes when no tuplet is present, but with the tuplet the slur is placed higher from the notes, ending up in a collision location.

Is there a way to have the slur drawn close to the notes, even when the tuplet is present? Is this slur placement "intended behaviour" or a bug?

Minimal sample (left slur is problematic, right slur is ok):

melody = \relative c'' {

\tuplet 3/2 { c,2( b'4) } r2

c,4( b') r2

}



Thanks in advance!

Patrick Hubers


_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Peter Crighton | 16 Nov 18:00 2014
Picon

Lyrics & Chords sheet

Hello all,

I’m in the process of creating sheets that only contain lyrics and correctly aligned chords. (This belongs to other sheets with music in them, otherwise LilyPond probably wouldn’t be the ideal choice for this. But I want to do these all together in LilyPond.)
I have two approaches so far, and none of them are ideal …


#1:

\version "2.19.13"

% Thanks to Thomas Morley for this function!
addMarkup =
#(define-music-function (parser location mrkp)(markup?)
   #{
     \once \override ChordName.before-line-breaking =
     #(lambda (grob)
        (ly:grob-set-property! grob 'text
          #{
            \markup
            \override #'(direction . -1)
            \dir-column { $(ly:grob-property grob 'text) #mrkp }
          #}))
   #})

\new ChordNames \chordmode {
  \override ChordName.extra-spacing-width = #'(0 . -0.1)

  \addMarkup \markup {
    \hspace #5
    \override #'(font-family . serif)
    "Wir stecken doch al"
  }
  d
  \addMarkup \markup {
    \override #'(font-family . serif)
    "le in einem K"
  }
  fis:m/cis
  \addMarkup \markup {
    \override #'(font-family . serif)
    "artenhaus,"
  }
  b:m
  d:/a \break
  
  \addMarkup \markup {
    \hspace #5
    \override #'(font-family . serif)
    "das sich Leben nen"
  }
  g
  \addMarkup \markup {
    \override #'(font-family . serif)
    "nt und schau’n zum F"
  }
  b:7/fis
  \addMarkup \markup {
    \override #'(font-family . serif)
    "enster raus."
  }
  e:m
}

\paper {
  indent = 0
  ragged-right = ##t
}

\layout {
  \context {
    \Score
    \remove "Bar_number_engraver"
  }
}


#2:

\version "2.19.13"

\markup {
  \column \fontsize #1.5 {
    \line {
      \score {
        \chords {
          d
          \override ChordName.extra-offset = #'(25 . 0)
          fis:m/cis
          \override ChordName.extra-offset = #'(31 . 0)
          b:m
          \override ChordName.extra-offset = #'(40 . 0)
          d:/a
        }
        \layout {}
      }
    }
    \line {
      \hspace #5
      "Wir stecken doch alle in einem Kartenhaus,"
    }
    \vspace #1
    
    \line {
      \score {
        \chords {
          g
          \override ChordName.extra-offset = #'(24 . 0)
          b:7/fis
          \override ChordName.extra-offset = #'(44 . 0)
          e:m
        }
      }
    }
    \line {
      \hspace #5
      "das sich Leben nennt, und schau’n zum Fenster raus."
    }
  }
}

\paper {
  indent = 0
}


With #1 I like that a new chord gets aligned perfectly with the respective syllable. But if there is not a new syllable on a chord change (happens with a tied note), I only can align the chord to a letter, not anywhere in between letters. Is there a way to offset the chord independently of the markup?
The other drawback with #1 is that it is a lot to write. Can I override the font-family generally only for the markup, but not for the chord name? (Probably with the same method as solving question one.)

#2 gives me more precision in positioning the chords and it allows me to not split up a line of lyrics, but it obviously involves a lot of trial and error, so it’s not perfect either.

Anyway, both versions are quite inelegant. If somebody has an idea how to approach this better, I’d be very grateful!
Ideally I could completely separate chords and lyrics at the input stage and then put them together line by line in a score. But I have no idea how to even begin with such an approach.

Cheers,
Peter

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de
_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Gmane