lilypond-user
[Top][All Lists]
Advanced

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

Re: Microtonal midi output


From: Lukas-Fabian Moser
Subject: Re: Microtonal midi output
Date: Sat, 8 May 2021 23:50:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

Hi Jean,
(let* ((tones (ly:pitch-tones pitch))
                    (r (ly:moment-main
                         (ly:moment-mod
                           (ly:make-moment tones 0)
                           (ly:make-moment 6 0))))

... using LilyPond's moment-arithmetic (number on the time axis) to deal with non-integer tone counts (numbers on the pitch axis) seems to me like a reasonable contender for an obfuscated Lily coding contest. :-) But impressive it is.

Maybe it's worth pointing out that your solution hardwires enharmonic identification (if I'm not mistaken). Of course I don't know what the OP intends to do, but in lots of real-life applications for re-tuning it's worth keeping the difference between f-sharp and g-flat alive.

As Graham pointed out, LilyPond's habit of setting pitch bends before a note and re-setting it immediately after a note whose alteration is not in 1/2 * Z leads to strange effects with the release (or reverb) of a note. This can be observed in examples involving rests between re-tuned notes. I patched my LilyPond for this: Now it never explicitly resets MIDI pitch bends, instead each and every note gets a pitch-bend command. (Which would be crazy for most applications, but is fine for my special needs involving lots of re-tuned notes.) I didn't have time to find out how to make this user-configurable. - I'm already looking forward to Graham's solution to this problem (post-processing the MIDI files using MTS messages.

Lukas




reply via email to

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