Re: Creating markup macros
Paul Scott <[EMAIL PROTECTED]> writes: >>#(def-markup-command (restOne layout props) () >> (interpret-markup layout props (markup #:number "1"))) >> >>rOne = { R1^\markup \restOne } >> >>\score{ \rOne } >> >> > Thank you very much. Now can you give me a hint as to a good way to > combine those two definitions so a the second definition of rOne isn't > necessary? This is because I want to make rOne eventually generate > the correct one measure rest for any time signature. AFAICT, it will not be possible to have \rOne automagically generate a one measure rest for any time signature, as the current time signature is not known at the time the one measure rest music expression will be generated (a time signature indication is just another music expression). You will have to give \rOne a duration parameter, but then using directly R1^\one or R1*3/4^\one will be cleaner (more readable) and not longer than, say, \rOne r1 or \rOne r2. nicolas ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros
Nicolas Sceaux wrote: Paul Scott <[EMAIL PROTECTED]> writes: #(def-markup-command (restOne layout props) () (interpret-markup layout props (markup #:number "1"))) rOne = { R1^\markup \restOne } \score{ \rOne } Thank you very much. Now can you give me a hint as to a good way to combine those two definitions so a the second definition of rOne isn't necessary? This is because I want to make rOne eventually generate the correct one measure rest for any time signature. AFAICT, it will not be possible to have \rOne automagically generate a one measure rest for any time signature, as the current time signature is not known at the time the one measure rest music expression will be generated (a time signature indication is just another music expression). You will have to give \rOne a duration parameter, but then using directly R1^\one or R1*3/4^\one will be cleaner (more readable) Ok, that looks pretty simple but I'm not quite sure yet how to combine my two definitions so I won't have to type '\markup' each time. (see below). Even so I would like to understand the scheme code. I have been searching through the scm directory trying to make sense of all of this. In scm/translation-functions.scm I found references to numerator and denominator which are listed as properties in the manual. 1. Is that code actually referring to the same properties listed in the manual? 2. In that same file there is a reference to 'make-bold-markup' but I can't find it's definition anywhere. I thought that might help me discover how to define 'one' so I can do R1*3/4^\one as you have suggested. Can you comment on either of these two points so I can do more of this on my own? I only yesterday discovered that you had used the new version of the code you wrote (for me?) some time ago as an example of setting properties. That helped me generate a newer version of many property shortcuts I have that are based on the original help you gave me. Thank you very much for that! Paul ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros (functions actually)
Paul Scott <[EMAIL PROTECTED]> writes: > Ok, that looks pretty simple but I'm not quite sure yet how to combine > my two definitions so I won't have to type '\markup' each time. (see > below). > > Even so I would like to understand the scheme code. I have been > searching through the scm directory trying to make sense of all of > this. In scm/translation-functions.scm I found references to > numerator and denominator which are listed as properties in the > manual. > > 1. Is that code actually referring to the same properties listed in > the manual? If you mean the manual page http://lilypond.org/doc/v2.5/Documentation/user/out-www/lilypond-internals/Music-properties.html then absolutely. Music expressions (that you manipulate when using a music function) have properties, which can be accessed with `ly:music-property'. > 2. In that same file there is a reference to 'make-bold-markup' but I > can't find it's definition anywhere. I thought that might help me > discover how to define 'one' so I can do R1*3/4^\one as you have > suggested. The `def-markup-command' macro does a couple of thing: - it "registers" the command, so that the parser can know what to do when \markup \MYCOMMAND ... is encountered - it defines a make-MYCOMMAND-markup function - some internal things, such as the actual markup function definition. When the \bold markup command is defined with def-markup-command, a `make-bold-markup' function is also defined, that you can use to programmatically build a bold markup: (make-bold-markup "foo"). Note that this is equivalent to writing: (markup #:bold "foo"). See scm/new-markups.scm. > Can you comment on either of these two points so I can do more of this > on my own? Note that in the case of \one, something like one=\markup \number 1 will be enough! nicolas ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros (functions actually)
Nicolas Sceaux wrote: Paul Scott <[EMAIL PROTECTED]> writes: Ok, that looks pretty simple but I'm not quite sure yet how to combine my two definitions so I won't have to type '\markup' each time. (see below). Even so I would like to understand the scheme code. I have been searching through the scm directory trying to make sense of all of this. In scm/translation-functions.scm I found references to numerator and denominator which are listed as properties in the manual. 1. Is that code actually referring to the same properties listed in the manual? If you mean the manual page http://lilypond.org/doc/v2.5/Documentation/user/out-www/lilypond-internals/Music-properties.html then absolutely. Music expressions (that you manipulate when using a music function) have properties, which can be accessed with `ly:music-property'. Does this make any sense? #(def-markup-command (testOne layout props) () (interpret-markup layout props (markup #:number (lambda (x) (ly:music-property x 'numerator) 2. In that same file there is a reference to 'make-bold-markup' but I can't find it's definition anywhere. I thought that might help me discover how to define 'one' so I can do R1*3/4^\one as you have suggested. The `def-markup-command' macro does a couple of thing: - it "registers" the command, so that the parser can know what to do when \markup \MYCOMMAND ... is encountered - it defines a make-MYCOMMAND-markup function - some internal things, such as the actual markup function definition. When the \bold markup command is defined with def-markup-command, a `make-bold-markup' function is also defined, that you can use to programmatically build a bold markup: (make-bold-markup "foo"). Note that this is equivalent to writing: (markup #:bold "foo"). Thanks. See scm/new-markups.scm. I'll keep reading this but I don't understand it yet. Can you recommend any online reading to understand scheme better? Note that in the case of \one, something like one=\markup \number 1 will be enough! Ok. Thanks, Paul ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Kneed beams
Hi, I'm trying to set a piano part with kneed beams for a voice that frequently crosses staves. The docs say that this should happen automatically, but I can't seem to get it to work. I've tried to decrease the auto-knee-gap property, but to no avail: my beams and stems all end up in the upper staff. Is there anything more I should do to get this to work? Thanks in advance. I'm using 2.4.2 on Cygwin. -- Patrick Hubers rechts = \relative c'' { \clef treble \key a \major \time 2/4 \partial 16 cis16\( ~ cis4 ~ cis16 b gis' fis eis4\) r16 b16( d16. cis32) ~ cis4 ~ cis16\( b gis' fis eis4\) r16 b16( d cis) ~ cis4 b16\( d fis, gis a4\) ~ a16 a( d cis) } links = \relative c { \clef bass \key a \major \time 2/4 % Where should I put this, here or in the voice context below? %\override Beam #'auto-knee-gap = #2 \partial 16 r16 << { % Voice 1 \override Beam #'auto-knee-gap = #2 d16 ais' b d ~ 4 cis,16 b' cis \change Staff = upper eis s4 \change Staff = lower d,16 ais' d d ~ 4 cis,16 b' cis eis s4 d,16 b' d \change Staff = upper fis \change Staff = lower s8 eis,8 ~ eis16 eis a \change Staff = upper cis \change Staff = lower s4 } \\ { % Voice 2 d,4 ~ d cis4 ~ cis d4 ~ d cis4 ~ cis s2 s2 } >> } \score { \context PianoStaff << \context Staff = upper \rechts \context Staff = lower \links >> } ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros (functions actually)
Paul Scott <[EMAIL PROTECTED]> writes: > Does this make any sense? > > #(def-markup-command (testOne layout props) () > (interpret-markup layout props >(markup #:number > (lambda (x) (ly:music-property x 'numerator) No. (lambda ...) evaluates to a function, where you want a markup. Remember that the \number markup command takes a markup as an argument, not a procedure. When you want to parametrize (uh) a LilyPond expression, the first thing to do is to write it, in plain LilyPond syntax, and then display it in Scheme. Then you will have a pattern to use in your function body. (What you want is a music function, not a markup command). for instance, supposing that `mus:display' (see http://lists.gnu.org/archive/html/lilypond-devel/2004-11/msg00029.html) is defined in music-display.scm: -test.ly- #(load "music-display.scm") #(mus:display #{ R1^\markup \number 1 #}) -test.ly- lilypond test.ly ==> (make-music 'SequentialMusic 'elements (list (make-music 'MultiMeasureRestMusicGroup 'elements (list (make-music 'BarCheck) (make-music 'EventChord 'elements (list (make-music 'MultiMeasureRestEvent 'duration (ly:make-duration 0 0 1 1 (make-music 'BarCheck) (make-music 'TextScriptEvent 'direction 1 'text (list number-markup (markup #:simple "1"))) >>See scm/new-markups.scm. >> >> > I'll keep reading this but I don't understand it yet. Can you > recommend any online reading to understand scheme better? I don't know much about scheme community sites. www.schemers.org should have links to tutorials and books. nicolas ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Aquanella J Lane/AMERICA/BAX is out of the office. In my absence, please contact Maria Munoz and Dahlia Herrera
I will be out of the office starting 11/22/2004 and will not return until 12/01/2004. ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Metronome Markings
Try as I might, I cannot get a tempo marking to appear at the beginning of my piece. I use versions 2.2.2 and 2.2.5. I am referring to section 3.7.4 of the documentation. No matter where I put the "\tempo 4 = 144" line, I cannot get it to appear on the score. Below is an excerpt of my score. The * are places I have tried to put the \tempo command to no avail. Any assistance would be greatly appreciated. Cheers! Aaron upper = \notes \relative f'' { * f1 } lower = \notes \relative f' { * f1 } \score { \notes { * \new PianoStaff << \new Staff { \clef treble \time 4/4 \key f \major * \upper } \new Staff { \clef bass \time 4/4 \key f \major * \lower } >> } \paper { * } \midi { \tempo 4 = 144 } } ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Starting Xemacs in Lilypond-mode
I just installed Xemacs on my Cygwin system to try that out. Up till now I've been using Wordpad. Xemacs seems to run ok, but how do I start it in lilypond-mode? Rob -- ___ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros (functions actually)
Nicolas Sceaux wrote: Paul Scott <[EMAIL PROTECTED]> writes: Does this make any sense? #(def-markup-command (testOne layout props) () (interpret-markup layout props (markup #:number (lambda (x) (ly:music-property x 'numerator) No. (lambda ...) evaluates to a function, That I understand. where you want a markup. That I don't yet. Another look at new-markup-scm tells me a markup is a list? Remember that the \number markup command takes a markup as an argument, not a procedure. When you want to parametrize (uh) a LilyPond expression, the first thing to do is to write it, in plain LilyPond syntax, and then display it in Scheme. How do I display it in Scheme? I see you answer that below but it breaks right now. Then you will have a pattern to use in your function body. (What you want is a music function, not a markup command). for instance, supposing that `mus:display' (see http://lists.gnu.org/archive/html/lilypond-devel/2004-11/msg00029.html) That's a little complicated at the moment but I'm getting there. is defined in music-display.scm: -test.ly- #(load "music-display.scm") #(mus:display #{ R1^\markup \number 1 #}) -test.ly- I get: [EMAIL PROTECTED]:~/music/test$ lilypond-snapshot displayscheme.ly GNU LilyPond 2.4.2 Processing `displayscheme.ly' Parsing... Backtrace: In unknown file: ?: 0* [primitive-load "music-display.scm"] : In procedure open-file in expression (primitive-load name): : No such file or directory: "music-display.scm" ==> (make-music 'SequentialMusic 'elements (list (make-music 'MultiMeasureRestMusicGroup 'elements (list (make-music 'BarCheck) (make-music 'EventChord 'elements (list (make-music 'MultiMeasureRestEvent 'duration (ly:make-duration 0 0 1 1 (make-music 'BarCheck) (make-music 'TextScriptEvent 'direction 1 'text (list number-markup (markup #:simple "1"))) That will help a lot. See scm/new-markups.scm. This is beginning to make sense but I still have a way to go. I'll keep reading this but I don't understand it yet. Can you recommend any online reading to understand scheme better? I don't know much about scheme community sites. www.schemers.org should have links to tutorials and books. Duh! I was there several times and missed the one link I needed which took me to: http://www.htdp.org/2003-09-26/ Thanks so much for all your help and patience. I have been programming for many years in many languages but have only looked at scheme and lisp recently. Paul ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Metronome Markings
Aaron Dalton wrote: Try as I might, I cannot get a tempo marking to appear at the beginning of my piece. I use versions 2.2.2 and 2.2.5. I am referring to section 3.7.4 of the documentation. No matter where I put the "\tempo 4 = 144" line, I cannot get it to appear on the score. Below is an excerpt of my score. The * are places I have tried to put the \tempo command to no avail. Any assistance would be greatly appreciated. Cheers! Aaron upper = \notes \relative f'' { * f1 } lower = \notes \relative f' { * f1 } It's a bug. It will work in most of the places you tried if you also add: ^\markup{ " " } at the same place. HTH, Paul Scott ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Starting Xemacs in Lilypond-mode
Rob V wrote: I just installed Xemacs on my Cygwin system to try that out. Up till now I've been using Wordpad. Xemacs seems to run ok, but how do I start it in lilypond-mode? I have not tried Cygwin but simply opening a .ly file with (X)emacs should do it. Paul Scott ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros (functions actually)
Paul Scott wrote: I get: [EMAIL PROTECTED]:~/music/test$ lilypond-snapshot displayscheme.ly GNU LilyPond 2.4.2 Processing `displayscheme.ly' Parsing... Backtrace: In unknown file: ?: 0* [primitive-load "music-display.scm"] : In procedure open-file in expression (primitive-load name): : No such file or directory: "music-display.scm" Indeed I don't have music-display.scm on my machine. Where do I find it? Thanks, Paul ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Starting Xemacs in Lilypond-mode
Have you tried jEdit with the LilyPondTool plugin? If not, and you're using Windows, it is a must :-) http://www.jedit.org/index.php?page=download Syntax highlighting is included in jEdit and the plugin is installed from the Plugins menu of jEdit. For plugin features see http://lily4jedit.sourceforge.net/users-guide.html Just the main features are: integrated cygwin console, code folding, structure browser, brace matching, clickable error list, integrated point-and-click dvi viewer, full-text-searchable lilypond help, automatic command and tweaking completion, document wizard. More bug-free version of the plugin is on http://www.sf.net/projects/lily4jedit Plugin updated for LilyPond 2.4 is coming soon. Bert ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Starting Xemacs in Lilypond-mode
The various Emacsen may or may not work out of the box with the Lilypond mode; the extension .ly is usually not registered for it by default (or it wasn't with every copy of (X)Emacs I have installed, Windows or Linux). To get the desired behavior you have to 1) append the directory with the Lilypond modes in it to the search path and 2) append file extension associations to the list of them. This is usually done in your custom Elisp file; I don't happen to have mine handy and don't have the syntax memorized. If no one else posts an example I'll post mine when I get home from work tonight. -- Nicholas Haggin A.M.D.G. Find my public keys at my website: http://nhaggin.freeshell.org/ ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Metronome Markings
Paul Scott wrote: Aaron Dalton wrote: upper = \notes \relative f'' { * f1 } lower = \notes \relative f' { * f1 } It's a bug. It will work in most of the places you tried if you also add: ^\markup{ " " } at the same place. HTH, Paul Scott Thank you for the help, Paul, but I'm still not having any success. Where exactly should I put the ^\markup command in relation to the \tempo command? I have tried the following: upper = \notes \relative f'' { \tempo^\markup f1 } upper = \notes \relative f'' { \tempo f1^\markup } upper = \notes \relative f'' { f1^\markup{\tempo} } Cheers! Aaron ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros (functions actually)
Paul Scott <[EMAIL PROTECTED]> writes: >>(lambda ...) evaluates to a function, >> > That I understand. > >> where you want a markup. >> > That I don't yet. Another look at new-markup-scm tells me a markup is > a list? Yes, and a list is not the same thing as a function. The fact that a markup expression is a list is actually an implementation detail that you should not bother about. > [EMAIL PROTECTED]:~/music/test$ lilypond-snapshot displayscheme.ly > GNU LilyPond 2.4.2 > Processing `displayscheme.ly' > Parsing... > Backtrace: > In unknown file: >?: 0* [primitive-load "music-display.scm"] > > : In procedure open-file in expression (primitive-load name): > : No such file or directory: "music-display.scm" Create that music-display.scm file, in the same directory as displayscheme.ly, with the code from http://lists.gnu.org/archive/html/lilypond-devel/2004-11/msg00029.html >>==> >>(make-music 'SequentialMusic >> 'elements (list >> (make-music 'MultiMeasureRestMusicGroup >> 'elements (list >> (make-music 'BarCheck) >> (make-music 'EventChord >>'elements (list >> (make-music 'MultiMeasureRestEvent >> 'duration (ly:make-duration 0 0 1 >> 1 >> (make-music 'BarCheck) >> (make-music 'TextScriptEvent >>'direction 1 >>'text (list >> number-markup >> (markup #:simple "1"))) >> >> > That will help a lot. Yes, always start with that. See scm/new-markups.scm. > This is beginning to make sense but I still have a way to go. Ok, new-markups.scm is not the right place to look at actually, better read scm/define-markup-commands.scm, for inspiration. Also look at ly/music-functions-init.ly > Thanks so much for all your help and patience. You're welcome! > I have been programming for many years in many languages but have > only looked at scheme and lisp recently. a cultural shock indeed :) nicolas ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Metronome Markings
Aaron Dalton wrote: Paul Scott wrote: Aaron Dalton wrote: upper = \notes \relative f'' { * f1 } lower = \notes \relative f' { * f1 } It's a bug. It will work in most of the places you tried if you also add: ^\markup{ " " } at the same place. HTH, Paul Scott Thank you for the help, Paul, but I'm still not having any success. Where exactly should I put the ^\markup command in relation to the \tempo command? I have tried the following: You left out { " " } (a space). Try: upper = \notes \relative f'' { \tempo 4 = 144 f1^\markup { " " } } I only tested this on 2.4.2 (without the \notes). HTH, Paul ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros (functions actually)
Nicolas Sceaux wrote: <>Paul Scott <[EMAIL PROTECTED]> writes: That I don't yet. Another look at new-markup-scm tells me a markup is a list? Yes, and a list is not the same thing as a function. Understood. The fact that a markup expression is a list is actually an implementation detail that you should not bother about. ? [EMAIL PROTECTED]:~/music/test$ lilypond-snapshot displayscheme.ly GNU LilyPond 2.4.2 Processing `displayscheme.ly' Parsing... Backtrace: In unknown file: ?: 0* [primitive-load "music-display.scm"] : In procedure open-file in expression (primitive-load name): : No such file or directory: "music-display.scm" Create that music-display.scm file, in the same directory as displayscheme.ly, with the code from http://lists.gnu.org/archive/html/lilypond-devel/2004-11/msg00029.html Ahhh! ==> (make-music 'SequentialMusic 'elements (list (make-music 'MultiMeasureRestMusicGroup ... See scm/new-markups.scm. This is beginning to make sense but I still have a way to go. Ok, new-markups.scm is not the right place to look at actually, better read scm/define-markup-commands.scm, for inspiration. Also look at ly/music-functions-init.ly Thanks. I have been programming for many years in many languages but have only looked at scheme and lisp recently. a cultural shock indeed :) Yes, even though I spent many years writing Forth which helps a little. Thanks again, Paul ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Metronome Markings
Paul Scott wrote: You left out { " " } (a space). Try: upper = \notes \relative f'' { \tempo 4 = 144 f1^\markup { " " } } I only tested this on 2.4.2 (without the \notes). This is what I now have in my score. It is still not displaying =/ I am running version 2.2.5 on my Cygwin box, and 2.2.2 on my BSD box. upper = \notes \relative f'' { \tempo 4 = 132 f4^\markup { " " } c a g8 bes | a4 g8 bes a f c' bes | a4. c8 f4 e8 d | c a bes g a c bes d\break | } Cheers! Aaron ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Metronome Markings
Aaron Dalton wrote: Paul Scott wrote: You left out { " " } (a space). Try: upper = \notes \relative f'' { \tempo 4 = 144 f1^\markup { " " } } I only tested this on 2.4.2 (without the \notes). This is what I now have in my score. It is still not displaying =/ I am running version 2.2.5 on my Cygwin box, and 2.2.2 on my BSD box. upper = \notes \relative f'' { \tempo 4 = 132 f4^\markup { " " } c a g8 bes | a4 g8 bes a f c' bes | a4. c8 f4 e8 d | c a bes g a c bes d\break | } Any chance of upgrading a little? There's lots of good stuff in later versions. I don't have a version that old to test with. Maybe someone else can comment on this for 2.2.5 or 2.2.2. Paul ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros (functions actually)
Nicolas Sceaux wrote: Create that music-display.scm file, in the same directory as displayscheme.ly, with the code from http://lists.gnu.org/archive/html/lilypond-devel/2004-11/msg00029.html In my best attempt to extract the code from that email I get: GNU LilyPond 2.4.2 Processing `displayscheme.ly' Parsing... Backtrace: In /usr/share/guile/1.6/srfi/srfi-1.scm: 637: 50 (if (null? rest) (map1 f list1) ...) ... 628: 51 (begin (set-cdr! p (list (f #))) (lp (cdr ls) (cdr p))) 629: 52* [set-cdr! (" 'direction 1") ... 629: 53* [list ... 629: 54* [# (text # #)] In music-display.scm: 32: 55[format:format #f "~%~v_'~a ~a" 28 text ... 35: 56*(cond (# #) (# #) (#t #)) 36: 57 [format:format #f "(list~{~a~})" ... 37: 58* [map # (# #)] In /usr/share/guile/1.6/srfi/srfi-1.scm: 637: 59 (if (null? rest) (map1 f list1) ...) ... 628: 60 (begin (set-cdr! p (list (f #))) (lp (cdr ls) (cdr p))) 629: 61* [set-cdr! (" number-markup") ... 629: 62* [list ... 629: 63* [# (# "1")] In music-display.scm: 38: 64[format:format #f "~%~v_~a" 39 ... 40: 65*[mus:pretty-string (# "1")] In unknown file: ?: 66 (let ((depth #)) (if (not #) (error "Too many arguments.")) ...) In music-display.scm: ... 28: 67 (cond (# #) (# #) (# #) ...) 61: 68*(and (list? obj) (markup-function? (car obj))) 61: 69 (markup-function? (car obj)) music-display.scm:61:27: In expression (markup-function? (car obj)): music-display.scm:61:27: Unbound variable: markup-function? Paul ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros (functions actually)
Paul Scott <[EMAIL PROTECTED]> writes: > Nicolas Sceaux wrote: > >>Create that music-display.scm file, in the same directory as >>displayscheme.ly, with the code from >> http://lists.gnu.org/archive/html/lilypond-devel/2004-11/msg00029.html >> > In my best attempt to extract the code from that email I get: > music-display.scm:61:27: In expression (markup-function? (car obj)): > music-display.scm:61:27: Unbound variable: markup-function? hm, sorry. (define-module (lily)) (use-modules (ice-9 format) (ice-9 optargs) (srfi srfi-1)) (define (mus:markup->make-markup markup-expression) "Generate a expression that, when evaluated, return an equivalent markup expression" (define (inner-markup->make-markup mrkup) (let ((cmd (car mrkup)) (args (cdr mrkup))) `(,(proc->command cmd) ,@(map transform-arg args (define (proc->command proc) (let ((cmd-markup (symbol->string (procedure-name proc (symbol->keyword (string->symbol (substring cmd-markup 0 (- (string-length cmd-markup) (string-length "-markup"))) (define (transform-arg arg) (cond ((and (pair? arg) (pair? (car arg))) ;; markup list (apply append (map inner-markup->make-markup arg))) ((pair? arg) ;; markup (inner-markup->make-markup arg)) (else;; scheme arg arg))) `(markup ,@(inner-markup->make-markup markup-expression))) (define*-public (mus:pretty-string obj #:optional (depth 0)) "Return a string describing `obj', in particular music expression will be printed as: (make-music 'MusicType 'property ...)" (cond ((ly:music? obj) (format #f "(make-music '~a~{~a~})" (ly:music-property obj 'name) (map (lambda (prop) (format #f "~%~v_'~a ~a" (+ 2 (* 13 depth)) (car prop) (cond ((list? (cdr prop)) (format #f "(list~{~a~})" (map (lambda (mus) (format #f "~%~v_~a" (* 13 (1+ depth)) (mus:pretty-string mus (1+ depth (cdr prop ((string? (cdr prop)) (string-append "\"" (cdr prop) "\"")) (else (mus:pretty-string (cdr prop) (1+ depth)) (remove (lambda (prop) (eqv? (car prop) 'origin)) (ly:music-mutable-properties obj) ((string? obj) (format #f "\"~a\"" obj)) ((symbol? obj) (format #f "'~a" obj)) ((ly:duration? obj) (format #f "(ly:make-duration ~a ~a ~a ~a)" (ly:duration-log obj) (ly:duration-dot-count obj) (car (ly:duration-factor obj)) (cdr (ly:duration-factor obj ((ly:pitch? obj) (format #f "(ly:make-pitch ~a ~a ~a)" (ly:pitch-octave obj) (ly:pitch-notename obj) (ly:pitch-alteration obj))) ((procedure? obj) (or (procedure-name obj) (format #f "(lambda ...)"))) ((and (list? obj) (markup-function? (car obj))) (format #f "~a" (mus:markup->make-markup obj))) (format #f "~a" obj))) (define-public (mus:display obj) (display (mus:pretty-string obj)) (newline)) (define-module (*anonymous-ly-0*)) nicolas ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros (functions actually)
Nicolas Sceaux wrote: hm, sorry. (define-module (lily)) (use-modules (ice-9 format) (ice-9 optargs) (srfi srfi-1)) ... Works great! Thanks, Paul ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Titling and grouping
On 22-Nov-04, at 12:35 AM, Jose-Luc Hopital wrote: 2) I have now a set of directory on the same level : one for each sonata with ~ 30 files in each ( op1_1/*.ly ,op1_2/*.ly ...). What is the easiest way to obtain score and parts of the entire opus: i.e. the score or parts of the 6 sonatas in one document. I think the best way to do this is to look at some large examples in mutopia. Something like \include "op1_1/first.ly" \include "op1_1/second.ly" should work, but if that doesn't produce parts to your liking, have a look at mutopia. Cheers, - Graham ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Metronome Markings
Citerar Paul Scott <[EMAIL PROTECTED]>: > Aaron Dalton wrote: > > > > This is what I now have in my score. It is still not displaying =/ I > > am running version 2.2.5 on my Cygwin box, and 2.2.2 on my BSD box. I can remember that there is a bug which only exists in 2.2.5 (but neither in <=2.2.4 nor >=2.2.6) which is related to metronome markings. See http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lily-bugs/fixed/Attic/metronome.ly?rev=1.1.2.1&only_with_tag=lilypond_2_2&content-type=text/vnd.viewcvs-markup I'd recommend you not to do any testing on 2.2.5. Erik ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros
[EMAIL PROTECTED] writes: > Paul Scott <[EMAIL PROTECTED]> writes: > > > #(def-markup-command (restOne layout props) > > (interpret-markup layout props > >(markup #:number #1))) > > As soon as you are inside a Scheme expression, you don't have to use > `#' before expressions; the \number markup command takes a markup as > an argument, so use the string "1" instead of the number 1. Besides, > you forgot the signature argument of `def-markup-command, whih is > mandatory. Shouldn't def-markup-command check that it gets a list of procedures as argument? Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.xs4all.nl/~hanwen ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros (functions actually)
[EMAIL PROTECTED] writes: > Yes, and a list is not the same thing as a function. The fact that a > markup expression is a list is actually an implementation detail that > you should not bother about. (would it be a good idea to box markup expressions inside a smob ?) > > Parsing... > > Backtrace: > > In unknown file: > >?: 0* [primitive-load "music-display.scm"] > > > > : In procedure open-file in expression (primitive-load name): > > : No such file or directory: "music-display.scm" > > Create that music-display.scm file, in the same directory as > displayscheme.ly, with the code from > http://lists.gnu.org/archive/html/lilypond-devel/2004-11/msg00029.html I forgot - why don't we have music-display.scm in the core distribution? -- Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.xs4all.nl/~hanwen ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros
[EMAIL PROTECTED] writes: > >\score{ \rOne } > > > > > Thank you very much. Now can you give me a hint as to a good way to > combine those two definitions so a the second definition of rOne isn't > necessary? This is because I want to make rOne eventually generate the > correct one measure rest for any time signature. that information is generally not passed to markup commands. Markup deals with layout, and does not know about musical concepts such as "length of a measure". You have to delve into lily/multi-measure-rest-engraver.cc which will need some adaptation to pass the info you need to a Scheme function. (Unfortunately, the mm rest engraver is one of the more complex engravers.) -- Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.xs4all.nl/~hanwen ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros
Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] writes: >> Paul Scott <[EMAIL PROTECTED]> writes: >> >> > #(def-markup-command (restOne layout props) >> > (interpret-markup layout props >> >(markup #:number #1))) >> >> As soon as you are inside a Scheme expression, you don't have to use >> `#' before expressions; the \number markup command takes a markup as >> an argument, so use the string "1" instead of the number 1. Besides, >> you forgot the signature argument of `def-markup-command, whih is >> mandatory. > > Shouldn't def-markup-command check that it gets a list of > procedures as argument? If the signature is not given, then guile issues an error: /tmp/titi.ly:23:1: Erreur: GUILE a signalé une erreur pour l'expression débutant ici: # (def-markup-command (restOne layout props) missing or extra expression But I'll add a check and a message, while I'm at markups. nicolas ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Creating markup macros (functions actually)
Han-Wen Nienhuys <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] writes: >> Yes, and a list is not the same thing as a function. The fact that a >> markup expression is a list is actually an implementation detail that >> you should not bother about. > > (would it be a good idea to box markup expressions inside a smob ?) Actually when first looking at how markups worked, I wondered why they were not smobs, like music expressions. However, manipulating them as plain scheme objects, be they lists or goops instances or whatever, makes testing and debugging new code easier and quicker. (this is just personnal taste). >> > Parsing... >> > Backtrace: >> > In unknown file: >> >?: 0* [primitive-load "music-display.scm"] >> > >> > : In procedure open-file in expression (primitive-load name): >> > : No such file or directory: "music-display.scm" >> >> Create that music-display.scm file, in the same directory as >> displayscheme.ly, with the code from >> http://lists.gnu.org/archive/html/lilypond-devel/2004-11/msg00029.html > > I forgot - why don't we have music-display.scm in the core > distribution? euh, I don't know, but this can be solved soon. nicolas ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
numbered one measure rests
Is there a mode in which single whole measures of rest have the number 1 over them? If not this is quite common in parts and it would be great if some switch would make it automatic. Paul Scott ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: numbered one measure rests
On 27-Nov-04, at 3:33 PM, Paul Scott wrote: Is there a mode in which single whole measures of rest have the number 1 over them? If not this is quite common in parts and it would be great if some switch would make it automatic. Have you tried setting \override MultiMeasureRest #'expand-limit = 0 ? ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: numbered one measure rests
Graham Percival wrote: On 27-Nov-04, at 3:33 PM, Paul Scott wrote: Is there a mode in which single whole measures of rest have the number 1 over them? If not this is quite common in parts and it would be great if some switch would make it automatic. Have you tried setting \override MultiMeasureRest #'expand-limit = 0 ? Yes. It gives a |--| instead of a whole rest and no number at all. Thanks, Paul ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: numbered one measure rests
[EMAIL PROTECTED] writes: > Graham Percival wrote: > > > > > On 27-Nov-04, at 3:33 PM, Paul Scott wrote: > > > >> Is there a mode in which single whole measures of rest have the > >> number 1 over them? If not this is quite common in parts and it > >> would be great if some switch would make it automatic. > > > > > > Have you tried setting > > > > \override MultiMeasureRest #'expand-limit = 0 > > > > ? > > > > > Yes. It gives a |--| instead of a whole rest and no number at all. I think you're looking for restNumberThreshold. -- Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.xs4all.nl/~hanwen ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: numbered one measure rests
Han-Wen Nienhuys wrote: [EMAIL PROTECTED] writes: Graham Percival wrote: n 27-Nov-04, at 3:33 PM, Paul Scott wrote: s there a mode in which single whole measures of rest have the number 1 over them? If not this is quite common in parts and it would be great if some switch would make it automatic. Have you tried setting \override MultiMeasureRest #'expand-limit = 0 ? Yes. It gives a |--| instead of a whole rest and no number at all. I think you're looking for restNumberThreshold. That's it! Thanks! 1. The documentation for Multi_measure_rest_engraver says: If a multimeasure rest takes less than this number of measures, no number is printed. What is true is: If a multimeasure rest takes less than this number of measures + 2, no number is printed. i.e. 0 gives me what I want instead of 2 as the doc implies. 2. I think 0 the way it works now or 2 if the documentation is meant to be correct should be the default. Thanks, Paul ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user
ptabtools
Can anyone comment on ptabtools? Do they work? I'm having a heck of a time building them and I'd hate to waste too much time getting them built if it's not worth it. http://jelmer.vernstok.nl/oss/ptabtools/ -- Tony Willoughby [EMAIL PROTECTED] "My career is about a promising as a Civil War leg wound." -Warren Zevon ___ lilypond-user mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/lilypond-user