Re: [frogs] bend implementation

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


Carl Sorensen schrieb:
[...]
But then, what's the difference between

c \bend c { d e f }

where the second c resembles the note from which the bend amount is
calculated,
and my

c\startBend d e f\stopBend

where the first c is used a) to print the note c and b) to tell the
engraver that everything following the c is to be considered as a bent note,
relative to the c? Ok, it's another syntax form and I am unsure which is
better
(for example, what would be the cleverest way to code a pre bend in both
approaches?)
but the fundamental principle is the same in my opinion.


Well, I could be wrong on all this.  But \startBend comes *after* the c that
is the unbent note.  So the bend engraver would need to look backwards in
time to get the unbent note, which seems to me to be a difficult thing to
do.  Iterators move forward in time, not backward in time.
Oops, then I seem to be terribly wrong. I thought that

c\startBend d e

will concern the c, not the notes afterwards. This is similar to

c\< d e

which starts a crescendo at the c, not at the d ...
Secondly, the \startBend syntax doesn't allow for a prebend.

But
c \bend d { e d}

allows me to do a pre bend without printing the note.
Well, the pre bend *is* indicated by a parenthesized stemless
grace note, but this should be doable anyway.

After writing my last message, I also had the idea that your
approach would be the clue to write pre bends in an easy way.
It's not so much the syntax that I'm talking about here; it's the music
structures I'm thinking about.  Just like there is RelativeOctaveMusic that
contains a bunch of note-events, I'm thinking that BendMusic could contain a
bunch of note-events, as well as a reference pitch.

It might be possible to do \bend similar to \relative, where with \relative
if you don't specify a pitch, the first pitch in the \relative music is the
reference pitch.

\bend {c d e f}

would do an unbent c, followed by a bent d, e, and f.

In contrast

\bend c {d e f}
would do a prebend from c to d, then do a bent d, e, and f.

I'm not positive this is the right way, but I think it's getting closer. And
I think that defining a BendMusic or BentMusic music expression is the best
way I've thought of yet to get bends in the music tree.

Ok, the Ben[d|t]Music music expression approach seems to be
sensible - do you have some places in the sources for me to get a feel
of working on such a structure?

Thanks

Marc


---
----
Join the Frogs!


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