bug-lilypond
[Top][All Lists]
Advanced

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

Re: Documentation suggestion: Cannot change volume mid-note in MIDI


From: David Kastrup
Subject: Re: Documentation suggestion: Cannot change volume mid-note in MIDI
Date: Sun, 27 Feb 2022 16:31:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

"BenWiederhake.GitHub" <BenWiederhake.GitHub@gmx.de> writes:

> Hi,
>
> tl;dr: Changing the volume mid-note should be documented as unsupported.
>
> I'd like to write the equivalent of "play the note c with the duration
> 1, but become quieter and quieter over the course of the duration".
> There are some ways to make this appear nicely for \layout{}, but I
> can't figure out how to make it work for \midi{}.
> I have tried several ways, including "c4\>~ c~ c~ c\ppppp", but the MIDI
> output always seems to have constant volume. As a bad workaround, I will
> probably use "c4\> c c c\ppppp", which has four audibly-separate
> attacks, and therefore not quite what I want.
>
> Did I miss something? What else could I try?
>
> Here's a nearly-minimal example:
> ----
> \version "2.22.1"
> notes = \relative e' { \tempo 4 = 60
>   f4 d8 e f4 g | f4 d8 e f4 b, |
>   % This "c1" note should not have constant volume for the entire time
>   c4\>~ c~ c~ c\ppppp | }
> \score{\new Staff{\notes} \layout{}}
> \score{\new Staff{\set Staff.midiInstrument = #"cello" \notes} \midi{}}
> ----
>
> I got feedback on IRC that you can't have a single midi note change its
> volume, and that the MIDI file format doesn't really support it in the
> first place.

Wind and string instrument passages usually use the MIDI expression
controller for this.  It doesn't work polyphonically as in per-note but
rather per-channel, but with the usual per-Staff channel mapping used in
LilyPond, that should be good for covering some distance.  But LilyPond
would need to support it.

-- 
David Kastrup



reply via email to

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