[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Older bar type.

From: Mats Bengtsson
Subject: Re: Older bar type.
Date: Wed, 07 May 2003 10:25:56 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

You are probably the best person to judge if the output looks right.

We already have builtin support for older style note heads, rests,
clefs and so on, so it could be interesting to add also this feature.
However, you have just given a nice example of how flexible Lilypond
is for each user to add his own features. As a first step, I propose
that we add your example to the list of examples in input/test/,
i.e. to the tips-and-tricks document.


Tim Nowaczyk wrote:
On Mon, May 05, 2003 at 11:46:50PM -0500, Tim Nowaczyk wrote:

Well, here's a patch that does what I want, but I'd rather do this in
scheme in the header.  The included patch adds a new barline ":4|" that
creates the correct symbol.

I'm trying to learn all this, but I've never used lisp before.  Here's the
scheme code I have so far.  I'm trying to override the ':|' symbol with
a custom one.

  Well, no pointers, so I struck out on my own.  Am I asking a stupid
  question, does no one know or does no one care?  That's my main
Here's what I've got. It looks right, but I don't know if
  it is really spaced correctly.

\version "1.7.18"
\include ""

\header {
  title     = "Candenzen f\\\"ur Gitarre"
  composer  = "Anton Diabelli"
  enteredby = "tim"

#(define (brew-custom-barline grob) (if (string=? (ly:get-grob-property grob 'glyph) ":|" )
       ( (dot (ly:find-glyph-by-name (ly:get-default-font grob) "dots-dot"))
         (dot (ly:molecule-translate-axis dot 1.5 1))
         (colon4 (ly:molecule-combine-at-edge dot 1 -1 dot .5 0))
         (colon4 (ly:molecule-combine-at-edge colon4 1 -1 dot .5 0))
         (colon4 (ly:molecule-combine-at-edge colon4 1 -1 dot .5 0))
       (ly:set-grob-property! grob 'glyph "|.")
       (ly:molecule-combine-at-edge (Bar_line::brew_molecule grob) 0 -1 colon4 
.5 0)
     (Bar_line::brew_molecule grob)

global = \notes
  \key c \major
  \clef "G_8"
  \time 4/4
  \skip 1*4
  \bar ":|"

upNotes = \notes \relative c
  <e2 g c> <g b> |
  <g c> <a d> |
  <e g c> <d g b> |
  <e1 g c>

downNotes = \notes \relative c
  c2 d e f g, g c1

\context Staff <
      \property Staff.BarLine \override #'molecule-callback = 
      \context Voice = upVoice \upNotes
      \context Voice = downVoice \downNotes
  \header {piece="No. 1"}

        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Phone: (+46) 8 790 8463                         
        Fax:   (+46) 8 790 7260
        Email: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]