lilypond-user
[Top][All Lists]
Advanced

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

Re: What is the problem with "\relative"? (Was: Do we really offer the f


From: Keith OHara
Subject: Re: What is the problem with "\relative"? (Was: Do we really offer the future?)
Date: Sun, 26 Apr 2015 05:52:04 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Martin Tarenskeen <m.tarenskeen <at> zonnet.nl> writes:

> I often use LilyPond to quickly enter a very simple tune or 
> small pianosheet needing just a simple texteditor (Vim). I use \relative 
> all the time. c g c e g is soo much faster and easier than c''' g'' 
> c''' e''' g''' g'''.

If there were a version of \transpose c c'' that was a short as \relative,

  \relative c'' { c g c e g }
  \octave 2 { c g, c e g }

then the \relative method is not any shorter.
The second line lets me see that the Gs are in different octaves.

>
> And personally I find lilypond code in \relative mode easier to read.
> 
> I agree that for complex scores with much music in variables \relative 
> mode can have annoying side-effects.
> 

I wish the manual did not use the implicit \relative c'' {} 
(sometimes \relative c' {} ) enclosing the examples.  As soon as
the input gets complicated, \relative becomes difficult to figure out.
Learning Manual 2.2.3 has

  \relative c'' {
    \new PianoStaff <<
      \new Staff { \time 2/4 c4 e | g g, | }
      \new Staff { \clef "bass" c,,4 c' | e c | }  >>   }

where it could have

  \new PianoStaff <<
    \new Staff \octave 2 { \time 2/4 c4 e | g g, | }
    \new Staff \octave 1 { \clef "bass" c,4 c | e c | } >>

if there was a function

octave = 
#(define-music-function
  (parser location octaves music)
  (integer? ly:music?)
  (_i "Raise or lower @var{music} by a nubmer of @var{octaves}.")
(make-music 'TransposedMusic
  'element (ly:music-transpose music (ly:make-pitch octaves 0 0))))




reply via email to

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