lilypond-user
[Top][All Lists]
Advanced

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

Re: Possible feature request for 'q' shorthand or tie syntax


From: Jim Long
Subject: Re: Possible feature request for 'q' shorthand or tie syntax
Date: Thu, 20 Sep 2012 18:14:53 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Sep 21, 2012 at 01:32:57AM +0200, David Kastrup wrote:
> 
> Pitches can also be put into a variable, like
> tonic=f
> 
> { \tonic 2 }
> 
> So you want to force writing \tonic2 as well, I assume?  We can also
> place them into variables.  Few minutes ago, someone else proposed a
> function
> 
> av = #(define-music-function (parser location x) (ly:pitch?)
>    #{
>      $x 8 ~ $x 4
>    #})
> 
> Now you can't write $x8 here since then Scheme would look for an
> identifier x8.

As I'm sure you're aware, in bash/sh scripts, many folks write

echo $x

when it is more correct to say

echo ${x}

This eliminates the mistake of $x8 when the programmer really
meant ${x}8

Is there a similar construct in Scheme?  Just guessing, but would

($x)8 ~ ($x)4

be valid (and functionally correct) syntax?  I have no real clue
what to do about your example of

{ \tonic 2 }

Do I understand correctly that these sorts of lilypond-isms
operate as plain text substitution?  Is this a job for a function
akin to \concat, like '\concat { \tonic 2 }'?  Perhaps \concat is
specific to markups, though.

And:

\tonic\tonic 2

yields 'ff 2', yes?  While

\tonic \tonic 2

yields 'f f 2' I presume.  So one has lots of control
concatenating variables, but less with literals?  How does one
concatenate a variable substitution and a literal in such a way
that there is no space between them, such as to get 'f2' or 'ff2'?


> > Just wondering whether I'm an eccentric to always write c4 and <bes
> > d>2 and never f 1 or <c e g> 16.
> 
> No, you are not eccentric.  Most people do this by convention, but not
> every convention makes sense changing into law.

As an unconventional person, I am grateful for that -- I'd rather
be seen as unconventional than an outlaw!

> I am not convinced it will be worth the trouble regarding manual note
> entry as note names are not hard or long to type.

I once had a piece in 6 flats, and wondered whether it would look
better in 6 sharps, and search and replace (at least in vi!)
doesn't quite cut it for safely changing all the gis'es to aes'es
and the e's to fes'es, etc.  A melody that had a lot of tied
notes made the work harder than it would have been if I hadn't
had to change each of the multiple notes in the ties.  It would
have been so much nicer to change only the first note in the tie,
and have the remaining consecutively tied notes inherit their
pitch automatically.  Having a p shortcut (where p is the old q)
to repeat tied figures (either notes or chords) would have
sufficed in that instance.





reply via email to

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