Re: Making notes in Scheme?
"Marcus Macauley" <[EMAIL PROTECTED]> writes: > I see that there are basically two ways to make notes (music) from > within a Scheme block. As far as I can tell, one way is powerful but > cumbersome, and the other way is simple but not very powerful. I'm > hoping maybe there's a third way that I haven't discovered yet, or > that the second way is more powerful than I know. May I ask what is exactly what you try to achieve? It might be easier to advice you then. BTW, have you tried using \displayMusic? its output can be copy-and-pasted to build music expressions in scheme. nicolas ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Making notes in Scheme?
Nicolas Sceaux wrote: "Marcus Macauley" <[EMAIL PROTECTED]> writes: I see that there are basically two ways to make notes (music) from within a Scheme block. As far as I can tell, one way is powerful but cumbersome, and the other way is simple but not very powerful. I'm hoping maybe there's a third way that I haven't discovered yet, or that the second way is more powerful than I know. May I ask what is exactly what you try to achieve? It might be easier to advice you then. BTW, have you tried using \displayMusic? its output can be copy-and-pasted to build music expressions in scheme. I tried it briefly, and I've seen its use demonstrated in the documentation, but it seems to require an abundance of information for each note, which I'm hoping to avoid. What I'm trying to do is create a music function whereby one can input certain starting values, like: \makeinfinityseries #2 #7 #1 #13 Those values would be used to generate a pitch series; and then that pitch series would be printed in the score. I've got a working version where I specify those values at the top of the file, e.g.: firstNote = #2 secondNote = #7 octave = #1 modulus = #13 and those definitions are followed by the Scheme code, which ends with a (make-music) thing that prints the music, without any \score block (or which is assigned to an identifier that I call from within the \score block). The problem with that is I can only use one set of variables within the score -- I can only print one such pitch series. Of course, I could add another set of variables at the beginning, and process those separately, but I think it would be easiest and most flexible if I could do something like: \score { \makeinfinityseries #2 #7 #1 #13 \bar "|" \makeinfinityseries #2 #9 #2 #13 \break \makeinfinityseries #4 #5 #1 #13 } ...et cetera. But I keep getting stuck with the (make-music) thing not printing music, or the variables being "unbound" at the point where they're used, or various other problems, and so I keep thinking there must be a simpler way to print notes from Scheme. If Lilypond can do: { c'4 d' e' } Surely, I would hope, Scheme can do something simpler than: (make-music 'SequentialMusic 'elements (list (make-music 'EventChord 'elements (list (make-music 'NoteEvent 'duration (ly:make-duration 2 0 1 1) 'pitch (ly:make-pitch 0 0 0 (make-music 'EventChord 'elements (list (make-music 'NoteEvent 'duration (ly:make-duration 2 0 1 1) 'pitch (ly:make-pitch 0 1 0 (make-music 'EventChord 'elements (list (make-music 'NoteEvent 'duration (ly:make-duration 2 0 1 1) 'pitch (ly:make-pitch 0 2 0)) or even: (seq-music-list (list (make-note (list (make-note-req (ly:make-pitch 1 0 0) (ly:make-duration 2 0 (make-note (list (make-note-req (ly:make-pitch 1 1 0) (ly:make-duration 2 0 (make-note (list (make-note-req (ly:make-pitch 1 2 0) (ly:make-duration 2 0)) ...especially as all I want, in this case, is pitches. And because it's possible to manually type notes within a music function in Scheme, e.g.: function = #(define-music-function (parser location var1) (integer?) #{ c'4 d' e' #}) It seems like it should also be possible to substitute variables for those notes, such as: #(define-music-function (parser location var1) (integer?) #{ $firstnote #(list-ref notes 1) #(list-ref notes 2) #}) From what I can tell, the key is the "ly:music" data type, but I don't know how to to use that from within Scheme, if it's even possible, much less how (if possible) to convert e.g. strings to ly:music. The "ly:export" function may also have something to do with it, but if so, I haven't figured out quite what. Thanks for your help, Marcus ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Setting line width from the command line?
> "Mats" == Mats Bengtsson <[EMAIL PROTECTED]> writes: Mats> With lilypond-book, you can easily override the line width Mats> using Mats> \begin[line-width=10\cm]{lilypond} Mats> ... Mats> \end{lilypond} Yes, but if I have a file with 21 songs of four parts each, that means I have to change 83 lines every time I want to fiddle with the margins. If there were a command line switch, I could change just the geometry line and the command line in the makefile. Does anyone know whether there's some other LaTeX syntax which would define a macro or variable so that lilypond-book could use it in this case? Of course, if the bug where the lilypond lines are too long would just get fixed, that would be easier still. -- Laura (mailto:[EMAIL PROTECTED] , http://www.laymusic.org/ ) (617) 661-8097 fax: (501) 641-5011 233 Broadway, Cambridge, MA 02139 ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
oddHeaderMarkup
How can i put the oddHeaderMarkup to the right instead of the left and how can i make appear the same oddHeaderMarkup in the second page numeroHimno = "2" \paper { oddHeaderMarkup = \markup { \bold \large \numeroHimno } between-system-space = 0.3\cm head-separation = 0.1\cm } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Why are variables received by #(define-music-function) unbound in #{ #(scheme code here?) #}
Either I've found a bug, or (more likely) I don't understand how variables are passed between Lilypond and Scheme. Below is an example, where a #(define-music-function...) block receives a variable, stringone. That variable seems to be accessible (i.e. bound, if I have my terminology straight) in two places, but not accesible (i.e. unbound) in the third place. 1. Accesible by Scheme code within #(define-music-function) but outside of #{ #} block 2. Accessible by Lilypond input within #{ #} block 3. Not accesible by Scheme code within #{ #} block Why is this, and is there any way to pass a variable, received by define-music-function, to Scheme code within the #{ #} block? Thanks in advance, Marcus \version "2.9.23" function = #(define-music-function (parser location stringone) (string?) (let ((stringone (string-append stringone " foo"))) #{ % uncommenting the following line yields "ERROR: Unbound variable: stringone" %#(string-append stringone " bar") c1^\markup { $stringone } #})) \relative c'' { \function #"one" } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
about rightHandFinger
Hi:I just read that lilypond includes support for rightHandFinger events. Being a guitarist I was thrilled. I ran the example and tried a couple of experiments to see if I could change the capital P and I that appear, in guitar the fingers are spelt in lowercase p, i, m, a. \rightHandFinger #0 ... #11. 0 and greater than 5 appear as "x". Is there a way to tweak the way it displays the fingerings? -- Daniel Tonda C. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
chordnames in parentheses?
is there any way to put "(" and ")" around a chordname? I am using the 'a2:m f4:dim' type input ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user