Re: [frogs] Music expressions and iterators (was: bend implementation)

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


Carl Sorensen schrieb:

[...]

Then I am able to do something like

c4 \startBend d e f \stopBend

and this compiles witout an error (and wihout a visible difference to c4
d e f, of course).

I am not sure whether I am right, but I tried to do it the way slurs are
integrated, so I
thought that the \startBend will add the make-span-event call to the
previous note, i.e. the c;
so c is the first note that is "seen" by the engraver, and f being the last.

I did not imagine using bend as a span event.  I imagined using it as an
event on each note that needed to be bent, like a string-number event.
But is my assumption concerning the spanner behavior right, even if we don't
use bends as spanners? Is the c the start of the spanner in the above case?
So it would be
c4 d\bend e\bend f\bend

This seems more right to me, but I can't give strong reasons for it.  I do
have an argument for extensibility below.
I wonder if it would be better to use a span event - once we got the
reference pitch, the engraver can compute the bend amount of
each note in the spanner range.

For the pre bend problem, we have to distinguish a pre bend
from a grace bend, the former been drawn as a grace note
without stem and in parentheses. So I thought about marking
this note as "pre bend" with some command which sets the property
of the stem of this grace note to a special value - perhaps we introduce
Stem #'style and set this to #pre-bend or something similar.

The StringBend engraver can now get the information from the stem of the
first note in the bend spanner and can now compute everything as expected.

I hope that there will be a possibility to mark bends with some short signs like \^ ... \v or something similar so we could avoid typing too much (I even trought about using guillements « ... » for this purpose, acting like slur parentheses, so instead of c ( d e f ) we can draw bend via c « d e f », but the accessibility on several keyboard layouts
has to be double-checked first).

So ideally, we'll have something like

c8 \startBend d4 c8 \stopBend (a bend starting from c to d and a release to c again)

\grace c8 \startBend d4 c8 \stopBend (a grace bend)

\preBend c8 \startBend d4 c8 \stopBend (a pre bend)

or even with some shorter symbols ...

I think this will take care of all the bends that don't exist in chords, and
I think you can start there.
I am not sure how this should be handled generally - glissandos don't work
in chords either, and perhaps the right way to do this is to use seperate
voices in cases where some notes sound unbent while one string is bent -
but if this approach is extensible in the future anyway and we don't
have to redo the whole
thing, I probably don't have to care about this right now.

That's the key question -- is this approach extensible in the future?

The only approach that I'm positive is extensible in the future and to any
construct is to have \bend have an argument containing a pitch, which would
be the amount a pitch should be bent by:

c4 d\bend #'(ly:make-pitch 0 1 0) e\bend #'(ly:make-pitch 0 2 0) f\bend
#'(ly:make-pitch 0 3 0)

Hmmmm - I wonder what would be the more guitar-like approach,
giving the notes and let lilypond calculate the difference - or
give just the bend amount and let lilypond display the right note?

Something like

c4 \bend4 2 \bend8 0

would translate to

c4 /\ d4 /\ c8

in the output (we have to consider the durations then - I don't know
whether this works the way I pseudo-coded it, and I would certainly give
the bend amount in half tone steps as an argument, not a ly:make-pitch 0 2 0;
this has the drawback that the duration must be written in every case,
until there is a way to enable optional arguments).

This is similar to the tablature input discussion earlier on the list;
it is now difficult to draw tablatures when you have to translate
(hand-written) tablatures to notes to get a proper input for lilypond
in order to let lilypond again translate this into tablature numbers.
Here, I am not sure how guitarists think, but normally, it is more interesting how strong I have to pull a string ( ½, 1 or even 1½ and more as David Gilmour way too often does), not what pitch this will sound like, so in my opinion, the
situations are comparable.

And the more I think about it, the more I like this idea ...

What do you think?

Ok. How should I proceed with that? I think it would be easier for you
and me
if I create patches that aren't meant to be pushed but to simplify the
exchange of
ideas. Should I push to rietveld *without* announcing lilypond-devel, so
you can easily
comment the whole thing?

That sounds like a good idea.  And as we got closer, if you wanted to, you
could announce the patches on -devel to get ideas from other developers,
instead of just me and Neil.
Ok, I will proceed as mentioned above, as soon as we have found the
right "user interface".

Thanks for your ideas and explanations!

Marc


---
----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/