[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: preliminary GLISS discussions
From: |
David Kastrup |
Subject: |
Re: preliminary GLISS discussions |
Date: |
Sat, 01 Sep 2012 11:25:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
Jan Nieuwenhuizen <address@hidden> writes:
> David Kastrup writes:
>
>>> Ah, I was unclear. Right. LilyPond stands out /together/ with Perl in
>>> unreadability; these are the only two languages I know that can have
>>> functions look like statements.
>>
>> Hm? Scheme, C, C++, awk, Lua...
>
> C Perl Ly
> postfix: foo.bar foo->bar a\staccato
> function: foo.baz () foo->baz \relative a
>
> Consider this valid .ly file
>
> \new Staff {
> \relative \ff a \staccato b \pp \parenthesize \skip 1
> }
Well, the optional argument for \relative is something we should have
sent to heck years ago. f would have been a nicer default value anyway
(it makes the first element of \relative's argument be in absolute
pitch).
> % INVALID, can you guess why?
> %\new Staff {
> % \relative a \ff \staccato b \pp \parenthesize \skip 1
> %}
Sure. \ff \staccato are events without a place to go. \relative a \ff
actually is accepted because LilyPond does not double-check that after
identifying a music function to be in non-post-event syntax that it
does, indeed, after calling return a non-post-event. I think I will
likely implement a warning for that soonish. Or get the syntax change
done where music functions are _first_ parsed, _then_ interpreted as
postevent or otherwise.
> \new Staff {
> \relative c \ff a \staccato b \pp \parenthesize \skip 1
> }
\relative without delimited second argument is just imprudent. The
computer language that can prohibit imprudency has not yet been
invented.
> \new Staff {
> \relative c \parenthesize a \staccato b \pp \parenthesize \skip 1
> }
Same here.
> \new Staff {
> \relative c-\ff a \staccato b \pp \parenthesize \skip 1
> }
Interesting case. Should be equivalent to \relative c \ff since as a
function argument, \ff and -\ff are both valid and identical music
expressions.
> \new Staff {
> \relative c c \ff a \staccato b \pp \parenthesize \skip 1
> }
Again, use braces around c \ff.
> quite hard to guess what will be produced. For example, why is the
> third stave's a one octave lower?
Because it is not part of \relative.
--
David Kastrup
- Re: preliminary GLISS discussions, Jan Nieuwenhuizen, 2012/09/01
- Re: preliminary GLISS discussions,
David Kastrup <=
- Re: preliminary GLISS discussions, Graham Percival, 2012/09/01
- Re: preliminary GLISS discussions, David Kastrup, 2012/09/01
- Re: preliminary GLISS discussions, Han-Wen Nienhuys, 2012/09/01
- Re: preliminary GLISS discussions, David Kastrup, 2012/09/01
- Re: preliminary GLISS discussions, Han-Wen Nienhuys, 2012/09/01
- Re: preliminary GLISS discussions, David Kastrup, 2012/09/01
- Re: preliminary GLISS discussions, Keith OHara, 2012/09/01
- Re: preliminary GLISS discussions, Han-Wen Nienhuys, 2012/09/01