Metronome marks with more options: Difference between revisions
Appearance
No edit summary |
mNo edit summary |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 8: | Line 8: | ||
This snippet also changes the size of metronome marks: | This snippet also changes the size of metronome marks: | ||
* the text (e.g., '''Allegro''') is a bit larger than the default of | * the text (e.g., '''Allegro''') is a bit larger than the default of LilyPond. | ||
* the note (e.g., ♪) is a bit smaller than the default of | * the note (e.g., ♪) is a bit smaller than the default of LilyPond. | ||
'''IMPORTANT:''' | '''IMPORTANT:''' | ||
This snippet is based on a snippet by Arnold Theresius. The original snippet create a formatter called <code>format-metronome-markup-approx</code>, and the default value to <code>tempoEquationText</code> in that snippet is "≈". I changed back this default to | This snippet is based on a snippet by Arnold Theresius. The original snippet create a formatter called <code>format-metronome-markup-approx</code>, and the default value to <code>tempoEquationText</code> in that snippet is "≈". I changed back this default to LilyPond default, and added the <code>tempoBetweenText</code> property. Also, I changed the sizing of some elements, as described above. | ||
' | Arnold's original code is available in snippet [[Tempo (metronome) marks with approximation sign]]. | ||
<lilypond version="2.24" | <lilypond version="2.24"> | ||
%% | %% | ||
% Metronome markup formatter, with more options than the | % Metronome markup formatter, with more options than the LilyPond | ||
% default formatter, and changes in sizing (see below). | % default formatter, and changes in sizing (see below). | ||
% Properties read: | % Properties read: | ||
| Line 32: | Line 32: | ||
% to this color. | % to this color. | ||
% Default: not set. | % Default: not set. | ||
% The size of the text ("Allegro" etc) is a bit larger than | % The size of the text ("Allegro" etc) is a bit larger than LilyPond default. | ||
% Similarly, the size of the note is smaller than | % Similarly, the size of the note is smaller than LilyPond default. | ||
% | % | ||
% To use this snippet, just \include this file. To revert default | % To use this snippet, just \include this file. To revert default | ||
% | % LilyPond formatter inside the score: | ||
% \set Score.metronomeMarkFormatter = #format-metronome-markup | % \set Score.metronomeMarkFormatter = #format-metronome-markup | ||
% | % | ||
| Line 44: | Line 44: | ||
% snippet create a formatter called "format-metronome-markup-approx", | % snippet create a formatter called "format-metronome-markup-approx", | ||
% and the default value to tempoEquationText in that snippet is "≈". | % and the default value to tempoEquationText in that snippet is "≈". | ||
% I changed back this default to | % I changed back this default to LilyPond default, and added the | ||
% tempoBetweenText property. | % tempoBetweenText property. | ||
% | % | ||
| Line 75: | Line 75: | ||
#(define-public (metronome-markup-custom text dur count hide-note eq-sym-def bet-sym-def hide-paren col) | #(define-public (metronome-markup-custom text dur count hide-note eq-sym-def bet-sym-def hide-paren col) | ||
(let* ((note-mark (if (and (not hide-note) (ly:duration? dur)) | (let* ((note-mark (if (and (not hide-note) (ly:duration? dur)) | ||
(make-teeny-markup ; note smaller than | (make-teeny-markup ; note smaller than LilyPond default | ||
(make-note-by-number-markup (ly:duration-log dur) | (make-note-by-number-markup (ly:duration-log dur) | ||
(ly:duration-dot-count dur) | (ly:duration-dot-count dur) | ||
| Line 210: | Line 210: | ||
c'^" "_\markup \column { | c'^" "_\markup \column { | ||
"\\set Score.metronomeMarkFormatter = #format-metronome-markup" | "\\set Score.metronomeMarkFormatter = #format-metronome-markup" | ||
"(which is | "(which is LilyPond's default Metronome Mark Formatter)" | ||
} | } | ||
| Line 227: | Line 227: | ||
[[Category:Scheme]] | [[Category:Scheme]] | ||
[[Category:Tweaks and overrides]] | [[Category:Tweaks and overrides]] | ||
[[Category:Staff notation]][[Category:Snippet]] | [[Category:Staff notation]] | ||
[[Category:Snippet]] | |||
Latest revision as of 06:09, 1 February 2026
If you need, in metronome marks:
- change the default
=sign to other symbol, you can use the propertytempoEquationText. - change the default
-sign between tempo values (e.g. 100-120) to, say, 100~120, you can use the propertytempoBetweenText. - hide the default parenthesis in metronome marks, you can set the property
tempoHideParenthesisastrue. - change the color of the tempo value, you can use the property
tempoNumberColor.
This snippet also changes the size of metronome marks:
- the text (e.g., Allegro) is a bit larger than the default of LilyPond.
- the note (e.g., ♪) is a bit smaller than the default of LilyPond.
IMPORTANT:
This snippet is based on a snippet by Arnold Theresius. The original snippet create a formatter called format-metronome-markup-approx, and the default value to tempoEquationText in that snippet is "≈". I changed back this default to LilyPond default, and added the tempoBetweenText property. Also, I changed the sizing of some elements, as described above.
Arnold's original code is available in snippet Tempo (metronome) marks with approximation sign.