Jump to content

Harmonic noteheads in a chord: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m New category
Tags: Mobile edit Mobile web edit
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
If you have a lot of chords including harmonic noteheads, typing <code>\tweak style #'harmonic-mixed</code> may be to long and make the code unreadable. To avoid that, you can define a function with a shorter name (in the code below it is only named <code>\har</code>).
If you have a lot of chords including harmonic noteheads, typing <code>\tweak style #'harmonic-mixed</code> may be to long and make the code unreadable. To avoid that, you can define a function with a shorter name (in the code below it is only named <code>\har</code>).


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


Line 13: Line 13:
[[Category:Tweaks and overrides]]
[[Category:Tweaks and overrides]]
[[Category:Expressive marks]]
[[Category:Expressive marks]]
[[Category:Snippet]]

Latest revision as of 23:33, 21 November 2025

If you have a lot of chords including harmonic noteheads, typing \tweak style #'harmonic-mixed may be to long and make the code unreadable. To avoid that, you can define a function with a shorter name (in the code below it is only named \har).

\version "2.24"

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

har = \tweak style #'harmonic-mixed \etc
  
{
 <c' \har c''>2 <c' \har c''>4 <c' \har c''>8 <c' \har c''>
}