Jump to content

Specifying instrument changes as markups: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m New category
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is just a small useful macro when you need to specify multiple instrument changes on a same staff. Just write <code>\inst &quot;Name</code> before the note the markup should be attached to.
This is just a small useful macro when you need to specify multiple instrument changes on a same staff. Just write <code>\inst &quot;Name</code> before the note the markup should be attached to.


<lilypond version="2.24.0">
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=349
%% http://lsr.di.unimi.it/LSR/Item?id=349


Line 16: Line 16:
[[Category:Editorial annotations]]
[[Category:Editorial annotations]]
[[Category:Scheme]]
[[Category:Scheme]]
[[Category:Snippet]]

Latest revision as of 23:32, 21 November 2025

This is just a small useful macro when you need to specify multiple instrument changes on a same staff. Just write \inst "Name before the note the markup should be attached to.

\version "2.24"

%% http://lsr.di.unimi.it/LSR/Item?id=349

%LSR modified by P.P.Schneider on Feb.2014

inst =
#(define-music-function (string) (string?)
  #{ <>^\markup \bold \box #string #})

\relative c' { c \inst "Horn" d e f }