lilypond-user
[Top][All Lists]
Advanced

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

Re: Shortcut for epeated chords?


From: Papa Eric
Subject: Re: Shortcut for epeated chords?
Date: Fri, 28 Mar 2008 23:20:58 +0100
User-agent: Thunderbird 1.5.0.14 (Windows/20071210)

Thanks to all for anwering so quickly!

I don't know Scheme, but Looking at files like italiano.ly, I see that it supports macros:
-------------------
pitchnamesItaliano = #`(
        (dobb . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
        (dobsb . ,(ly:make-pitch -1 0 THREE-Q-FLAT))
        (dob . ,(ly:make-pitch -1 0 FLAT))
        (dosb . ,(ly:make-pitch -1 0 SEMI-FLAT))
...
#(ly:parser-set-note-names parser pitchnames)
-----------

is it possible to more note-name-like items to the list for example

setx . a function that takes the following expression which must be a chord, and stores it in some dynamically accessible variable X. It returns nothing (substituted with nothing).

x . a function that takes an integer argument and return stored X with duration modified accordingly

xtie. a function same as x adding a tie

etc...


The idea is that with those fake notes:

{ a8 b setx <a b c d> x#8 x#16 xtie#4 x#8 }

would render like { a8 b <a b c>8 <a b c>16 <a b c>4~ | <a b c>8 }

being intermediary { a8 b \x #8 \x #16 \xtie #4 | \x #8 } with the first argument to each \x actually <a b c>8 but hidden in a dynamic/global variable rebound at each setx?

Is this idea feasible?

Joseph Wakeling a écrit :
Graham Percival wrote:
No; we understand it quite well.

From what I could see, Mats' example did not implement what was requested.

Adding something like this to the basic syntax could be quite
problematic.  We already get enough complaints about changing the
syntax, so we certainly shouldn't rush to add a new construction
like this.

Fair enough.  I _do_ understand that.  I would also note that it's only
a relevant consideration if you want Lilypond's syntax to be focused on
being human-*writeable*, rather than human-readable.

I suggest that you try writing a scheme function that meets your
needs; once it's done, submit it to LSR and share it with other
people.  In a few months or years, if it's a widely, we may add it
to the official lilypond packages.

I don't have any knowledge/experience with Scheme right now, but do plan
to change that; if at that point I can implement this idea, I'll give it
a go.








reply via email to

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