lilypond-user
[Top][All Lists]
Advanced

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

Re: Hidden dynamic that can be heard on midi ouput


From: Paolo Prete
Subject: Re: Hidden dynamic that can be heard on midi ouput
Date: Mon, 8 Jun 2020 18:36:18 +0200


On Mon, Jun 8, 2020 at 6:33 PM Paolo Prete <paolopr976@gmail.com> wrote:
Hello,

it can be useful to create dynamics that can be heard only in the midi output. Then I used the below procedure. However, if I try to make a function with the same command, there's a syntax error. How can I fix it?
Thanks!


%%%%%%%%%%%%%%
midiDynamic = #(define-music-function (parser location dyn) (ly:music?)
#{ -\tag #'display \! -\tag #'midi $dyn #})

music = {

c'\pp

% WORKS
c'-\tag #'display \! -\tag #'midi \ff

% DOESN'T WORK, FIXME
% c'\midiDynamic \fff

}

\score {
  \keepWithTag #'layout
  \new Staff { \music }
  \layout {}
}

\score {
  \keepWithTag #'midi
  \new Staff { \music }
  \midi {}
}
%%%%%%%%%%%%%%

Note too that the "\!" symbol is here used to make it work at the end of hairpins too.

 

reply via email to

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