|
From: | Jean Abou Samra |
Subject: | Re: Microtonal midi output |
Date: | Sun, 9 May 2021 21:36:42 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
Le 09/05/2021 à 19:31, Lukas-Fabian Moser a écrit :
Hi Jean,Ah yes, thank you, I didn't know that. But I'm also relieved that DK seems to share my misgivings about the conceptual jumble involved... :-)It is a well-known trick… See https://gitlab.com/lilypond/lilypond/-/issues/3139
Well yes. I'm not particularly happy about it, just that I couldn't find anything simpler, and the function would have been somewhat unuseful without support for non-integers ;-)
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.An option would be to go create an issue at https://gitlab.com/lilypond/lilypond/-/issues and attach your patch there, noting that it is a work-in-progress and configurability should be added. That way, someone might pick it up.- I'm already looking forward to Graham's solution to this problem (post-processing the MIDI files using MTS messages.I haven't tried it (understanding of MIDI is above my pay grade), but it shoud certainly yield better results.I looked into it a bit today, and I can gladly report that (while the code still needs some cleaning up), I managed to patch my LilyPond to automatically generate the MTS messages that Graham's Python script adds in post-processing. (Of course, that wouldn't have been possible without being able to use Graham's code as a cheat sheet!)As an example I attach the midi files generated by \score { { <c' e'>4 r <$(ly:make-pitch 0 0 -1/4) e'> r <c' e'> r <$(ly:make-pitch 0 0 1/4) e'> r <$(ly:make-pitch 0 0 1/8) e'> r <c' e'> r } \layout {} \midi {} }with official 2.22.0 and with my patched master. Compare with special focus on the pitch of the e (which should be the same for all three chords), and on what happens during release.I'm a bit nervous about my lack of insight in possible side-effects of my tempering with the C++ code, but I'll try to make available a patch that more knowledgeable people can at least take as a starting point.
This looks very nice! I look forward to seeing the patch. Cheers, Jean
[Prev in Thread] | Current Thread | [Next in Thread] |