lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Force Accidentals


From: Stephen
Subject: Re: Force Accidentals
Date: Tue, 19 Jul 2005 14:52:07 -0500

In order to use atonicKey, the user must know to set
the KeySignature print-function to f and not use it with \midi.>

I really revealed my ignorance by not knowing that everything between #{ and #} is Lilypond syntax and I can add the print-function override directly to the function, so the user only has to remember that it won't work with midi:

atonicKey =
 #(def-music-function (parser location) ()
    #{ #(ly:export (make-music 'EventChord
                    'origin $location
                    'elements (list (make-music 'KeyChangeEvent
                                     'tonic (ly:make-pitch -1 4 0)
                                     'pitch-alist '((5 . 1)
                                                    (6 . 1)
                                                    (0 . 1)
                                                    (1 . 1)
                                                    (2 . 1)
                                                    (3 . 1)
                                                    (4 . 1))))))
       \set Score . extraNatural = ##f
       \override Score . KeySignature #'print-function = ##f #})

Stephen

----- Original Message ----- From: "Stephen" <address@hidden>
To: <address@hidden>
Cc: "Mehmet Okonsar" <address@hidden>; <address@hidden>; <address@hidden>
Sent: Tuesday, July 19, 2005 12:01 PM
Subject: Re: Force Accidentals


No, of course, but it is still a work around. It makes me look at accidental_engraver.cc and consider whether to re-write it to allow having no key signature as apposed to assuming a blank key signature is always C Major. If it were a trivial case of allowing a conditional statement to check whether the key signature is equal to null, for instance, and making the natural equivalent to the sharp and flat in that instance, it might be simple enough for me. But first I'd have to study the logic of the entire file and I doubt I have time to do that.

The first thing I thought of was to use the line:

\layout { \context { \Staff \remove Key_engraver } }

And I'd still like to see whether something along those lines could be made to trigger the desired behaviour in the accidental engraver. You know, again, so that the absence of a key signature is given a separate case from C Major.

My preoccupation with simplicity stems from the fact that I am not a programmer and cannot handle the level of detail that a good programmer can, even though I know everything there is to know about C syntax, which isn't much since it is a wonderfully simple language. My desire would always be to leave Lilypond as simple and intuitive as possible as well.

So I am just reminding myself and others that it is a less than ideal solution because it is. In order to use atonicKey, the user must know to set the KeySignature print-function to f and not use it with \midi.

Due to the fact that I understand programming, but am unable to pursue it seriously, it is a dilema for me whether to post to the user forum or the developer forum. Since my comments are intended only to be understood by developers, I stick mostly to the developer forum. But my goal will always be to attempt to make things simple enough that even I can understand them whether as a user of as a developer.

Stephen

----- Original Message ----- From: "Erik Sandberg" <address@hidden>
To: "Stephen" <address@hidden>
Cc: <address@hidden>; <address@hidden>; "Mehmet Okonsar" <address@hidden>
Sent: Tuesday, July 19, 2005 10:25 AM
Subject: Re: Force Accidentals


On Tuesday 19 July 2005 17.12, Stephen wrote:
The latest thing I learned about atonicKey is that is won't work with
\midi.

Of course that is not because it is bad, but because it is not standard and \midi does not anticipate the key signature. If anything is to be blamed,
it is midi which needs to be updated. But is it a low priority and
understandably so. Lilypond's paper output will always have the higher
priority.

If it breaks midi, why don't you just make a separate \score block for midi
output, without the atonicKey command? Accidental displaying conventions
shoulnd't make a difference on midi output anyway.

Erik



_______________________________________________
lilypond-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]