[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add Modal transformations (issue4126042)
From: |
Benkő Pál |
Subject: |
Re: Add Modal transformations (issue4126042) |
Date: |
Sat, 5 Feb 2011 18:24:57 +0100 |
> Thanks. This is good feedback. I agree that an extra argument could
> be useful. I think of this operation as transposition followed by
> inversion, so Pal's example could be implemented this way:
>
> %% ------------------------------------------------
> modalTransposedInversion =
> #(define-music-function (p l from to-pivot scale music)
> (ly:music? ly:music? ly:music? ly:music? )
> #{
> \modalInversion $to-pivot $scale \modalTranspose $from
> $to-pivot $scale $music
> #})
>
> scale = {c g}
> original = { c4. c'8 g'4. g8 }
> desired = { g4. g,8 c,4. c8 }
> {
> \clef bass
> \original
> \desired
> \modalTransposedInversion c g \scale \original
>
> }
> %% ------------------------------------------------
>
> So it could be left to the user, but I imagine that transposition will
> be wanted more often than not, so I have no problem with altering the
> definitions accordingly.
yes; I just thought that practically the same code can
be used to get the final result, so why not.
> In practice, it will be more efficient to code it as Pal suggests,
> with two index operations -- although I have no idea whether the
> efficiency gain would be significant in terms of LilyPond's total
> processing overhead.
by the way efficiency: my automatic reaction is that
validity check should be moved out from the lambda
expression into the user level function (or just one
level below), but I have absolutely no experience.
> I do like arranging and naming the arguments as suggested above. I
> think it will simplify documentation and usage if the arguments to
> \modalTranspose and \modalInversion (or \modalTransposedInversion if
> you prefer) are as congruent as possible, so that we can have
>
> \modalTranspose from-pitch to-pitch ...
> and
> \modalInversion from-pitch to-pivot ...
>
> I also find that this corresponds to the way I think about it
> musically. I see the original sequence, then imagine where I want the
> first pitch of the inverted sequence to be.
>
> Does anyone have a strong feeling whether we should rename
> \modalInversion to \modalTransposedInversion? Or perhaps leave
> \modalInversion as is and offer \modalTransposedInversion as a
> separate function?
to me inversion is enough, since, as you say, changing
the pivot (whether it's a scale element or not) means
transposition, i.e. transposition is unseparable from
inversion.
p
- Re: Add Modal transformations (issue4126042), (continued)
- Re: Add Modal transformations (issue4126042), k-ohara5a5a, 2011/02/03
- Re: Add Modal transformations (issue4126042), pkx166h, 2011/02/03
- Re: Add Modal transformations (issue4126042), tdanielsmusic, 2011/02/03
- Re: Add Modal transformations (issue4126042), tdanielsmusic, 2011/02/03
- Re: Add Modal transformations (issue4126042), percival . music . ca, 2011/02/03
- Re: Add Modal transformations (issue4126042), Trevor Daniels, 2011/02/05
- Message not available
- Re: Add Modal transformations (issue4126042),
Benkő Pál <=
- Message not available
- Re: Add Modal transformations (issue4126042), Trevor Daniels, 2011/02/05