Pairing/Combining Two Sequences Together
[EMAIL PROTECTED] writes: Should result in about the same thing as this: --- \notes \context Voice \relative c' { c4. d8 e4. f8 g4. a8 b4. c8 } --- Just to test things, I defined the function 'combine-dur' like this: --- #(define (combine-dur x) (display \n===\n) (let ((a (ly-get-mus-property x 'elements))) (display (car a)) (display \n===\n) (display (cadr a)) ) x) --- I noticed by looking at what displayed that (car a) was the \myduration sequence and (cadr a) was \music. However, the two resulting sequences do not act like ordinary lists, and normal mapping functions do not work. In addition, (car a) is the unevaluated form of \myduration, with information about how many times to repeat but the repeats themselves not unfolded. At this point I'm at a total loss. Are (car a) and (cadr a) both valid types of music? (ly-get-mus-property mus 'elements) returns a possibly non-empty list of music objects. (ly-get-mus-property mus 'element) returns () or a music object. You should always recurse on both, since constructs like \context Voice layer another Music object over their arguments. If so, why do they return () for every call to ly-get-mus-property? Can I evaluate nested sequences like nested lists? Is there a better way to do all this? Repeats happen in interpreting, i.e. after \apply is done, so what you want can not be done. Better write two functions (apply-duration-to-note mus dur) and (apply-durations-to-sequence muslist durlist) use these to write a function that is called like \apply #(lambda (x) (apply-durations-to-sequence (ly-get-mus-property x 'elements) (list (make-duration 2 1) ;; dotted quarter (make-duration 3 0) ;; eighth )) The apply-durations-to-sequence should loop through its 2nd argument for setting durations. When you go this route, be sure to be careful with nesting other music in the { } . Btw, if you finish the code, could we include it in the examples? -- Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.cs.uu.nl/~hanwen ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
Lilypond crashes while compiling this (correct) file...
Hi all, I have a file, which would not compile thou the end, but only until a certain point. It crashes during the LaTeX portion: Running LaTeX... error: latex: command exited with value 256 Traceback (most recent call last): File /usr/local/bin/ly2dvi, line 863, in ? run_latex (files, outbase, extra_init) File /usr/local/bin/ly2dvi, line 639, in run_latex system (cmd) File /usr/local/bin/ly2dvi, line 247, in system error (msg) File /usr/local/bin/ly2dvi, line 145, in error raise _ (Exiting ... ) Exiting ... When I run ly2dvi -V I see the message that \vbox is too full: (/usr/local/share/lilypond/tex/feta20.tex) (/usr/local/share/lilypond/tex/lilypond-latex.tex LaTeX definitions) (/usr/local/share/lilypond/tex/lily-ps-defs.tex) [footer empty]) Overfull \vbox (0.7539pt too high) has occurred while \output is active [1] Runaway text? ps: beginspecial setspecial 4.00 4. ! TeX capacity exceeded, sorry [main memory size=263001]. \lilypondpaperoutputscale -4.0 0 l.29801} The failing part, run on its own in a new file passes without problems, as the rest of the original file does when run on its own. I attach the file, which is outcommented from line 72 on. It would fail after l 72 c 54 if not excommented. The problem is that this part is part of a score for larger orchestra, and I have to deliver it this week... I would really appreciate any help - if you know the problem... Thanks in advance, Michael [Vl_solo.ly application/octet-stream (6316 bytes)] Vl_solo.ly Description: Binary data
Re: Pairing/Combining Two Sequences Together--Feature request
On Thu, 06 Jun 2002 07:52:31 Han-Wen wrote: [EMAIL PROTECTED] writes: Should result in about the same thing as this: --- \notes \context Voice \relative c' { c4. d8 e4. f8 g4. a8 b4. c8 } --- Just to test things, I defined the function 'combine-dur' like this: --- #(define (combine-dur x) (display \n===\n) (let ((a (ly-get-mus-property x 'elements))) (display (car a)) (display \n===\n) (display (cadr a)) ) x) --- I noticed by looking at what displayed that (car a) was the \myduration sequence and (cadr a) was \music. However, the two resulting sequences do not act like ordinary lists, and normal mapping functions do not work. In addition, (car a) is the unevaluated form of \myduration, with information about how many times to repeat but the repeats themselves not unfolded. At this point I'm at a total loss. Are (car a) and (cadr a) both valid types of music? (ly-get-mus-property mus 'elements) returns a possibly non-empty list of music objects. (ly-get-mus-property mus 'element) returns () or a music object. You should always recurse on both, since constructs like \context Voice layer another Music object over their arguments. If so, why do they return () for every call to ly-get-mus-property? Can I evaluate nested sequences like nested lists? Is there a better way to do all this? Repeats happen in interpreting, i.e. after \apply is done, so what you want can not be done. Better write two functions (apply-duration-to-note mus dur) and (apply-durations-to-sequence muslist durlist) use these to write a function that is called like \apply #(lambda (x) (apply-durations-to-sequence (ly-get-mus-property x 'elements) (list (make-duration 2 1) ;; dotted quarter (make-duration 3 0) ;; eighth )) The apply-durations-to-sequence should loop through its 2nd argument for setting durations. When you go this route, be sure to be careful with nesting other music in the { } . Btw, if you finish the code, could we include it in the examples? I want to suggest the use of placeholders to make the \notes easier to read and maintain. a b b c d d e *8. *16 *8 * * * * becomes a8. b16 b8 b c d d e If you are willing to move your notes out of the .ly file, which is a very good idea, this can easily be processed with sed. # this plugin routine replaces gub gub re* * with regub gub # skip ** if two and write one * fter this procedure. s/\*\*/TwoAsterisksWriteOne/g :again /\*/{ s/\([^ ]*\)[^\*]*\*/\1/ s/[^ ]*// s/^ //g s/\*// t again } s/TwoAsterisksWriteOne/\*/g -- Here is an example of an .ly file with a separate score: % here we have flowing2.ly: \header { title = The river is flowing composer = Traditonal (?) } \include paper16.ly \score { \simultaneous { % accompaniment--chordnames \context ChordNames \chords { \include flowing2-pt1.ly } \addlyrics % melody \context Staff = mel { \property Staff.noAutoBeaming = ##t \property Staff.automaticMelismata = ##t \notes \relative c' { \include flowing2-pt2.ly } } % lyrics \context Lyrics \lyrics { \include flowing2-pt3.ly } } \midi { } \paper { linewidth = 10.0\cm } } % and here we have flowing2, the notes. If you copy this into two % files and run ./petals flowing2, running ly2dvi on either the % original flowing.ly (by Han-Wen, in the tutorial) or % flowing2.ly will produce the same score. The score should start with r8, % not this comment. % The field separator is | not | . r8 | \partial 8 g8 | The c2:3- f:3-.7| c4 c8 d [es () d] c4 | ri -- ver is flo- __ wing, d:min es4 c8:min r8 | f4 f8 g [es() d] c g | flo -- wing and gro -- wing, the c2:min f:min7 | c4 c8 d [es () d] c4 | ri -- ver is flo -- wingg:7^3.5 c:min | d4 es8 d c4. \bar |. | down to the sea. ---cut here Of course it's not petals anymore, that name is taken by rosegarden. ly-parts? I just finished a simple song 64 bars long. Each line in the editor is a measure but you can find the measure by the lyrics. Of course I could have put all the lyrics on one line, but that wouldn't be a very good idea, would it? Also lilypond has no problem finding the line number in the score part, which is the same as the line number in your score. It would be easy to put half a measure or two measures on each line instead. Barchecks could be used for a particular part by doing a matrix transposition of the part, putting it all on a single line. I have never found them useful. Finding errors is very easy,
Re: Tempo signature
Are there commands to produce, e.g., Allegro, Adagio, Largo at wanted positions? - Marco If you want to write these indications above the staff with a good-looking separation from it, you can use the following command: -- \score { \notes \relative c'' { % Move textscripts two steps left and three steps up. \property Staff.TextScript \override #'extra-offset = #'(-2 . 3) c4^#'((Large upright) Allegro) % Restore defaults \property Staff.TextScript \revert #'extra-offset d e f ... } } -- The trick is in '(-2 . 3)': the first number gives the horizontal offset, the second the vertical one. Bye Maurizio ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
Re: Tempo signature
I think you have to do it like legato = #'(italic (legato)) a3^\legato for example Carlos - Original Message - From: Marco Caliari [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 06, 2002 2:40 PM Subject: Tempo signature Are there commands to produce, e.g., Allegro, Adagio, Largo at wanted positions? - Marco ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
Pairing/Combining Two Sequences Together--Feature request
Wow. Too many trailing spaces. r8 | \partial 8 g8 | c2:3- f:3-.7| c4 c8 d [es () d] c4 | d:min es4 c8:min r8 | f4 f8 g [es() d] c g | c2:min f:min7 | c4 c8 d [es () d] c4 | g:7^3.5 c:min | d4 es8 d c4. \bar |. | Information is not knowledge. Belief is not truth. Indoctrination is not teaching. Tradition is not evidence. David Raleigh Arnold [EMAIL PROTECTED] ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
Re: Tempo signature
On Thu, 06 Jun 2002 13:19:18 Carlos Garcia Suarez wrote: I think you have to do it like legato = #'(italic (legato)) a3^\legato for example Carlos or in \header, poet = Adagio still not fixed in 1.4.13 Information is not knowledge. Belief is not truth. Indoctrination is not teaching. Tradition is not evidence. David Raleigh Arnold [EMAIL PROTECTED] ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
Tempo signature
Are there commands to produce, e.g., Allegro, Adagio, Largo at wanted positions? - Marco ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
Re: Pairing/Combining Two Sequences Together
Take a look at the example file input/test/music-box.ly in the distribution. I think it does more or less what you're trying to achieve. /Mats Does anyone know how to perform an operation (using the Guile interpreter) that combines two sequences of notes? I'm not entirely sure how to iterate from note to note, and I'm not sure how to get at the notes after they have been evaluated for unfolding repeats. I wanted to pair two sequences of music together so that I could avoid redundant durations. This: --- music = \notes \context Voice \relative c' { c d e f g a b c } myduration = \notes \repeat unfold 4 { s4. s8 } \apply #combine-dur { \music \myduration } --- Should result in about the same thing as this: --- \notes \context Voice \relative c' { c4. d8 e4. f8 g4. a8 b4. c8 } --- Just to test things, I defined the function 'combine-dur' like this: --- #(define (combine-dur x) (display \n===\n) (let ((a (ly-get-mus-property x 'elements))) (display (car a)) (display \n===\n) (display (cadr a)) ) x) --- I noticed by looking at what displayed that (car a) was the \myduration sequence and (cadr a) was \music. However, the two resulting sequences do not act like ordinary lists, and normal mapping functions do not work. In addition, (car a) is the unevaluated form of \myduration, with information about how many times to repeat but the repeats themselves not unfolded. At this point I'm at a total loss. Are (car a) and (cadr a) both valid types of music? If so, why do they return () for every call to ly-get-mus-property? Can I evaluate nested sequences like nested lists? Is there a better way to do all this? I spent a few hours looking through the documentation, and I searched a while on the mailing list archives, and I couldn't find a similar question. The music-reversal example was informative, but it doesn't deal with sequences inside of sequences and post-unfold-evaluation. Starling ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
Justified staffs
Hello all, I needed two things that I didnt find in the manual 1) how can I control breaks (I didnt get it with \bar ... it just does not break when there is space... and I couldnt user \penalty ... I tried #0 value and #9) 2) how do I justify a staff (I want staffs of the same length and the notes distributed over them) 3) I'm writing unmetered music and I want not the time signature to appear, how do I do it? (I have already written \cadenzaOn and set the property Score.timing = ##f but the 'c' still appears at the start of the score) TIA! -- Felipe Massia Pereira http://www.ic.unicamp.br/~ra000493 CS MSc Student @ IC-UNICAMP ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
Re: Justified staffs
Felipe Massia Pereira wrote: 1) how can I control breaks (I didnt get it with \bar ... it just does not break when there is space... and I couldnt user \penalty ... I tried #0 value and #9) What do you mean. is \break what you are looking for 2) how do I justify a staff (I want staffs of the same length and the notes distributed over them) Take a look at input/test/partial-blank.ly 3) I'm writing unmetered music and I want not the time signature to appear, how do I do it? (I have already written \cadenzaOn and set the property Score.timing = ##f but the 'c' still appears at the start of the score) \property Score.TimeSignature \override #'transparent = ##t Btw, check out the manual under invisible grobs ... :-) -Rune ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
Re: Lilypond crashes while compiling this (correct) file...
Jan Nieuwenhuizen wrote: I have a file, which would not compile thou the end, but only until a certain point. It crashes during the LaTeX portion: I have just experienced the same problems with a HUGE file. (48 staves with one voice in each, 385 measures. Should I just give up, or should I keep struggling? I REALLY need the output!) Increase your tex main memory (/etc/texmf.cnf), No file there (redhat 7.1) I found a texmf.cnf in /usr/share/texmf/web2c/texmf.cnf but changing the main_memory in there didn't do anything. A comment in the file says that if changes don't take effect one chould redump the file. What the #¤%#% does that mean? (Btw, running under 1.4 because of vertical spacing problems of 1.5) -Rune ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user
Re: Lilypond crashes while compiling this (correct) file...
On Fri, 07 Jun 2002 00:07:08 Rune Zedeler wrote: Jan Nieuwenhuizen wrote: I have a file, which would not compile thou the end, but only until a certain point. It crashes during the LaTeX portion: I have just experienced the same problems with a HUGE file. (48 staves with one voice in each, 385 measures. Should I just give up, or should I keep struggling? I REALLY need the output!) Increase your tex main memory (/etc/texmf.cnf), No file there (redhat 7.1) I found a texmf.cnf in /usr/share/texmf/web2c/texmf.cnf but changing the main_memory in there didn't do anything. A comment in the file says that if changes don't take effect one chould redump the file. What the #¤%#% does that mean? (Btw, running under 1.4 because of vertical spacing problems of 1.5) -Rune dra@scylla:~$ locate texmf.cnf /etc/texmf/texmf.cnf /etc/texmf/texmf.cnf.dpkg-old /var/lib/texmf/web2c/texmf.cnf dra@scylla:~$ cat /etc/texmf/texmf.cnf %%% This file is automatically generated by update-texmf % % Please do not edit this file directly. If you want to change or add % anything please take a look at the files in /etc/texmf/texmf.d, and % invoke update-texmf. % %%% (snip) Information is not knowledge. Belief is not truth. Indoctrination is not teaching. Tradition is not evidence. David Raleigh Arnold [EMAIL PROTECTED] ___ Lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user