lilypond-devel
[Top][All Lists]
Advanced

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

Re: entering music without \time


From: Erik Sandberg
Subject: Re: entering music without \time
Date: Fri, 3 Sep 2004 10:22:17 +0200
User-agent: KMail/1.6.2

On Thursday 02 September 2004 01.17, Némo wrote:
> Hello,
>
> speaking about reduction, can I propose one more time my idear about
> lighter syntax for tuplet, something like a macro ?
> Here is the link to my last post :
> http://lists.gnu.org/archive/html/lilypond-devel/2004-02/msg00114.html
>
> Since "{ }" are used for music expression and "[ ]" for manual beam why
> not use "#" or any other sign, or nothing (ok, I know, frog eater have
> strange idear :o) ?
>
> To resume, something like that :
>
> a8 #2/3# r b d g b a8 g16 #6/7# a f d r b g
> Or that
> a8 2/3 r b d g b a8 g16 6/7 a f d r b g
>
> would stand's for
>
> \times 2/3 {a8 r b} \times 2/3 {d g b} a8 \times 6/7 {g16 a f d r b g}

I have been thinking about this too. 

What you ask for is really very close to the current syntax a8*2/3; but with 
triplet brackets added automagically. What you suggest is to add information 
in the note duration about whether it is a triplet and the triplet fraction. 
However, my guess is that the coders don't want to touch the definition of 
duration if they don't really have to.

Also, there are some problems; e.g. things like \times 2/3 {c8 c16 c c8} 
wouldn't be possible to notate, but \times could of course be used for those 
occasions. 

I have an alternative suggestion of how to do this kind of triplet shorthand:
Some scheme code could be written that converts things like {a8*2/3 b c d8} to 
\times 2/3 {a8 b c} d8. I.e. something like
\tupletify {a8*2/3 b c d8}, or even better, {bla bla bla \tupletifyOn a8*2/3 b 
c d8 \tupletifyOff R1*4 }

I can try a quasi-formal definition of what the tupletification would do:

For each note, detect its tuplet fraction A/B. This could e.g. be done by 
comparing the actual duration (1/12 for a8*2/3) with the duration it looks 
like it has; i.e. 1/8 for a8*2/3. Take the fraction Actual/Visual duration 
and reduce it to A/B s.t. gcd(A,B)=1.

Or, take this method if it's possible to implement: just check how the 
duration of each note was written syntactically; iff the factor was written 
on the form a8*A/B, A,B integers, this note would be considered a tuplet with 
A/B as its fraction. So if you write it like a8*1*2/3, it would not be 
considered a tuplet.

Now when this is done, take each maximal sequence of notes with the same 
fraction A/B, and create the equivalent of \times A/B around it.


Sadly, I don't know if this stuff would be possible to do today in Lilypond; I 
am not a scheme hacker myself. Hackers / Nicolas, does this stuff sound 
reasonable in any way?

> The only problem I see is for syntax highlighting (and time coding).

This would not be a problem with my version, if it is realistic.

Erik




reply via email to

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