[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: some sort of suppress-accidental?
From: |
Mark Polesky |
Subject: |
Re: some sort of suppress-accidental? |
Date: |
Tue, 16 Jun 2009 21:18:16 -0700 (PDT) |
Han-Wen Nienhuys wrote:
> >> Something like 'suppress-accidental that would fit right where
> >> 'force-accidental goes in the scheme expression. Is that
> >> possible? Would it be difficult to implement?
> >
> > It's quite simple to do.
> >
> > Attached is a patch which uses an ampersand to hide accidentals.
>
> Please don't extend the syntax lightly. Try to make something based
> on music functions or \tweak first; if it finds wide spread adoption,
> you can always add cute syntax later.
Werner LEMBERG wrote:
> Given the infrequency of this request, I second this.
Han-Wen and Werner,
can we still apply it without the parser changes? At least
I'd be able to do this for single notes or entire chords:
_________________________________________
\version "2.13.1"
#(define (EventChord? music)
(eq? (ly:music-property music 'name) 'EventChord))
#(define (NoteEvent? music)
(eq? (ly:music-property music 'name) 'NoteEvent))
#(define (hide-accidental music)
(if (NoteEvent? music)
(ly:music-set-property! music 'hide-accidental #t))
music)
hideAccidental =
#(define-music-function (parser location mus) (ly:music?)
(music-map hide-accidental mus))
\relative { \hideAccidental cs }
_________________________________________
I can't figure out how to use \tweak to get inside chords...
But the presence of the functionality (without the syntax)
should be enough for me (for the moment).
Let me know.
- Mark
- Re: some sort of suppress-accidental?, (continued)
- Re: some sort of suppress-accidental?, Werner LEMBERG, 2009/06/17
- Re: some sort of suppress-accidental?, Mark Polesky, 2009/06/18
- how about \accidental-once #note ? (Re: some sort of suppress-accidental?), Ted Walther, 2009/06/18
- Re: how about \accidental-once #note ? (Re: some sort of suppress-accidental?), Mark Polesky, 2009/06/18
- Re: how about \accidental-once #note ? (Re: some sort of suppress-accidental?), Ted Walther, 2009/06/18
- Re: some sort of suppress-accidental?, Ted Walther, 2009/06/18
- Re: some sort of suppress-accidental?, Graham Percival, 2009/06/18
- Re: some sort of suppress-accidental?, Ted Walther, 2009/06/18
- Re: some sort of suppress-accidental?, Werner LEMBERG, 2009/06/18
- Re: some sort of suppress-accidental?, Ted Walther, 2009/06/18
- Re: some sort of suppress-accidental?,
Mark Polesky <=
- Re: some sort of suppress-accidental?, Graham Percival, 2009/06/17
- Re: some sort of suppress-accidental?, Mark Polesky, 2009/06/17
- Re: some sort of suppress-accidental?, Mark Polesky, 2009/06/17
- Re: some sort of suppress-accidental?, Neil Puttock, 2009/06/17
- Re: some sort of suppress-accidental?, Mark Polesky, 2009/06/17