[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn
From: |
Jean Abou Samra |
Subject: |
Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn |
Date: |
Mon, 20 Mar 2023 12:11:42 +0100 |
User-agent: |
Evolution 3.46.4 (3.46.4-1.fc37) |
Pour le code, quelque chose comme ça devrait le faire :
\version "2.24.1"
#(define Ez_numbers_engraver
(make-engraver
(acknowledgers
((note-head-interface engraver grob source-engraver)
(let* ((context (ly:translator-context engraver))
(tonic-pitch (ly:context-property context 'tonic))
(tonic-name (ly:pitch-notename tonic-pitch))
(grob-pitch
(ly:event-property (event-cause grob) 'pitch))
(grob-name (ly:pitch-notename grob-pitch))
(delta (modulo (- grob-name tonic-name) 7))
(note-names
(make-vector 7 (number->string (1+ delta)))))
(ly:grob-set-property! grob 'note-names note-names))))))
#(define (Relative_alterations_engraver context)
(let ((note-events '()))
(make-engraver
(listeners
((note-event engraver event)
(set! note-events (cons event note-events))))
((pre-process-music engraver)
(let ((tonic (ly:context-property context 'tonic)))
(for-each
(lambda (ev)
(let* ((pitch (ly:event-property ev 'pitch))
(octave (ly:pitch-octave pitch))
(notename (ly:pitch-notename pitch))
(rel-pitch (ly:pitch-diff pitch tonic))
(rel-alt (ly:pitch-alteration rel-pitch)))
(ly:event-set-property!
ev 'pitch
(ly:make-pitch octave notename rel-alt))))
note-events)
(set! note-events '()))))))
\layout {
ragged-right = ##t
\context {
\Voice
\consists \Ez_numbers_engraver
\consists \Relative_alterations_engraver
}
}
#(set-global-staff-size 26)
% Faire automatiquement un bémol au lieu d'un bécarre
\relative c'' {
\easyHeadsOn
\key g \major
g f
}
% Faire automatiquement un dièse au lieu d'un bécarre
\relative c' {
\easyHeadsOn
\key f \major
f b
}
signature.asc
Description: This is a digitally signed message part
- Re: Re : Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, (continued)
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Jean Abou Samra, 2023/03/19
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Vincent Gay, 2023/03/19
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Ya Gloops, 2023/03/19
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Vincent Gay, 2023/03/20
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Ya Gloops, 2023/03/20
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Vincent Gay, 2023/03/20
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Ya Gloops, 2023/03/20
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn,
Jean Abou Samra <=
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Ya Gloops, 2023/03/20
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Ya Gloops, 2023/03/20
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Jean Abou Samra, 2023/03/20
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Ya Gloops, 2023/03/20
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Jean Abou Samra, 2023/03/21
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Ya Gloops, 2023/03/21
- Re: Altérations dièse ou bémol au lieu de bécarre avec easyHeadsOn, Ya Gloops, 2023/03/22