Re: Strange Scheme problem

2015-11-19 Thread David Kastrup
Andrew Bernard writes: > r.mat...@mh-freiburg.de> wrote: >> >>Wouldn't that be equivalent to: >> >> (last (program-arguments)) > > Of course! How silly of me. The last function is in SRFI-1. Even

Re: Strange Scheme problem

2015-11-18 Thread Andrew Bernard
Hello Jacques, A slightly more idiomatic Scheme-like way to get the current file name being processed might be something like this: #(define (file-name) (let* ((args (program-arguments)) (args-len (length args))) (list-ref args (- args-len 1 This follows on from

Re: Strange Scheme problem

2015-11-18 Thread Menu Jacques
Hello Andrew, Many thanks, here is the final version I’ll use after your proposal, with more readable identifers: A nice day! JM %% \version "2.19.30" #(define (fileName) (let* ((args (program-arguments)) (args-len (length args))) (list-ref args (- args-len

Re: Strange Scheme problem

2015-11-18 Thread Menu Jacques
Hello Andrew,You make me discover that I have to copy with a right click in the log window, instead of merely using the usual keyboard shortcut, thanks!BTW, that could be an enhancement to Frescobaldi.JMLe 18 nov. 2015 à 01:29, Andrew Bernard a écrit :Hi Jacques,On my

Re: Strange Scheme problem

2015-11-18 Thread Menu Jacques
Hi Andrew, The definitions I use actually is: #(define comml (object->string (command-line))) #(define loc (+ (string-rindex comml #\space ) 2)) #(define commllen(- (string-length comml) 2)) #(define filen (substring comml loc commllen)) #(define siz

Re: Strange Scheme problem

2015-11-18 Thread Menu Jacques
Hello David, I just copied/pasted that without analysis, as it happens. My 1€! JM > Le 18 nov. 2015 à 10:11, David Kastrup a écrit : > > Menu Jacques writes: > >> Hi Andrew, >> >> The definitions I use actually is: >> >> #(define comml

Re: Strange Scheme problem

2015-11-18 Thread David Kastrup
Menu Jacques writes: > Hi Andrew, > > The definitions I use actually is: > > #(define comml (object->string (command-line))) > #(define loc (+ (string-rindex comml #\space ) 2)) > #(define commllen(- (string-length comml) 2)) > #(define filen

Re: Strange Scheme problem

2015-11-18 Thread Simon Albrecht
On 18.11.2015 09:43, Menu Jacques wrote: Hello Andrew, You make me discover that I have to copy with a right click in the log window, instead of merely using the usual keyboard shortcut, thanks! BTW, that could be an enhancement to Frescobaldi. If you like, you can open up an issue in the

Re: Strange Scheme problem

2015-11-18 Thread Ralf Mattes
Am Mittwoch, 18. November 2015 12:10 CET, Andrew Bernard schrieb: > > Hello Jacques, > > A slightly more idiomatic Scheme-like way to get the current file name being > processed might be something like this: > > #(define (file-name) > (let* ((args

Re: Strange Scheme problem

2015-11-18 Thread Urs Liska
Am 18.11.2015 um 15:15 schrieb Simon Albrecht: > On 18.11.2015 09:43, Menu Jacques wrote: >> Hello Andrew, >> >> You make me discover that I have to copy with a right click in the >> log window, instead of merely using the usual keyboard shortcut, thanks! >> >> BTW, that could be an enhancement

Re: Strange Scheme problem

2015-11-18 Thread Andrew Bernard
Hi Ralf, Of course! How silly of me. The last function is in SRFI-1. Andrew On 19/11/2015, 01:03, "Ralf Mattes" wrote: > >Wouldn't that be equivalent to: > > (last (program-arguments)) > >:-)

Re: Strange Scheme problem

2015-11-18 Thread Jacques Menu
Hello Urs, Another point would be to allow Cmd-A as a keyboard shortcut for Select All along the way. Currently, it has to be done with the mouse or with a right click. JM > Le 18 nov. 2015 à 15:17, Urs Liska a écrit : > > > > Am 18.11.2015 um 15:15 schrieb Simon

Re: Strange Scheme problem

2015-11-17 Thread Andrew Bernard
Hi Jacques, On my mac, I just select the text in the log, right click to copy, and paste wherever, as per any application. Does that not work for you? Andrew On 18/11/2015, 01:36, "Menu Jacques" wrote:

Re: Strange Scheme problem

2015-11-17 Thread Gilles THIBAULT
> Recently however, some of them got refused by Guile, can’t explain why. > In particular, « siz » computes the size of the filename « filen ». But > here, the filename is Foo.ly, without anything special… Directory name with spaces problem, probably (See message "don't find such directory")

Re: Strange Scheme problem

2015-11-17 Thread Andrew Bernard
Hi Jacques, Using this function: (define (file-size f) (stat:size (stat f))) with guile 1.8 you can stat files with spaces in the directory path and the file name part just fine. Andrew ___ lilypond-user mailing list lilypond-user@gnu.org

Re: Strange Scheme problem

2015-11-17 Thread Menu Jacques
Hello Gilles, Oops, I’d thought I would never fall into using blanks in a directory name… thanks for the hint, it’s OK now! JM PS> Je me suis eu moi-même. > Le 17 nov. 2015 à 20:52, Gilles THIBAULT a écrit : > > >> Recently however, some of them got refused by

Re: Scheme problem?

2015-02-16 Thread takumi ikeda
I wrote this finally. Thank you for suggestion. T \version 2.18.2 tremps = # 1.5 setlinewidth 0.08 0.08 scale -10 7 moveto -5 3 5 3 10 7 curveto -10 -7 lineto -5 -3 5 -3 10 -7 curveto stroke #(define (z-trem grob) (let* ( (gstem (ly:grob-parent grob X)) (gnotehead

Re: Scheme problem?

2015-02-12 Thread Simon Albrecht
Am 12.02.2015 um 17:00 schrieb takumi ikeda: Hi Kevin, Thank you for your reply. But the part of (if (= UP dir) -0.5 0.5) seems to not working... BTW, How can I learn the syntax like (ly:duration-log (ly:music-property music 'duration))? I found the documentation

Re: Scheme problem?

2015-02-12 Thread Kevin Barry
Hi Takumi, Is this what you want? \version 2.18.2 tremps = # 2 setlinewidth 0.07 0.07 scale -10 7 moveto -5 3 5 3 10 7 curveto -10 -7 lineto -5 -3 5 -3 10 -7 curveto stroke z-trem = #(define-music-function (parser location music) (ly:music?) #{ \override StemTremolo.stencil =

Scheme problem?

2015-02-12 Thread takumi ikeda
Hello all, I am trying the following code but I got Wrong type: () error. I would like to avoid translating tremolos when the note is whole note. Writing Scheme is quite difficult for me. Any help would be appreciated. Takumi \version 2.18.2 tremps = # 2 setlinewidth 0.07 0.07 scale -10 7

Re: Scheme problem?

2015-02-12 Thread takumi ikeda
Hi Kevin, Thank you for your reply. But the part of (if (= UP dir) -0.5 0.5) seems to not working... BTW, How can I learn the syntax like (ly:duration-log (ly:music-property music 'duration))? I found the documentation lilypond.org/doc/v2.19/Documentation/internals/scheme-functions but it says

Re: scheme problem: colored background, layers

2014-12-06 Thread Big Noise
Meyn To: lilypond-user@gnu.org Subject: Re: scheme problem: colored background, layers Am 04.12.2014 um 00:13 schrieb Urs Liska: Am I seeing correctly that the arrows are coded with absolute coordinates from their starting points (i.e. they wouldn't adapt to layout changes)? This is not at all

Re: scheme problem: colored background, layers

2014-12-04 Thread Malte Meyn
Am 04.12.2014 um 00:13 schrieb Urs Liska: Am I seeing correctly that the arrows are coded with absolute coordinates from their starting points (i.e. they wouldn't adapt to layout changes)? This is not at all diminishing your snippet, but it would be absolutely awesome if someone could extend

Re: scheme problem: colored background, layers

2014-12-03 Thread Big Noise
Hi everybody, now I could finish two scores that have been waiting for that colored background trick. Maybe they are somewhat extreme examples... If anyone is interested: http://jkg-musik.jimdo.com/lilypond For the colored arrows from the second example, I've created a snippet as well:

Re: scheme problem: colored background, layers

2014-12-03 Thread Urs Liska
Am 03.12.2014 22:31, schrieb Big Noise: Hi everybody, now I could finish two scores that have been waiting for that colored background trick. Maybe they are somewhat extreme examples... If anyone is interested: http://jkg-musik.jimdo.com/lilypond This is absolutely great! I think this

Re: scheme problem: colored background, layers

2014-12-02 Thread Pierre Perol-Schneider
Add to the LSR : http://lsr.di.unimi.it/LSR/Item?id=960 Waiting for your comments. Cheers, Pierre 2014-12-02 7:25 GMT+01:00 Pierre Perol-Schneider pierre.schneider.pa...@gmail.com: Hum, interesting Klaus! I'll take a closer look today. Cheers, Pierre

Re: scheme problem: colored background, layers

2014-12-02 Thread Ben Big Noise
Wow - that's amazing. Having contributed to the LSR feels good :) Thanks for adding and code optimizing. Cheers, Klaus Am 02.12.2014 um 09:41 schrieb Pierre Perol-Schneider Add to the LSR : http://lsr.di.unimi.it/LSR/Item?id=960 Waiting for your comments. Cheers, Pierre

Re: scheme problem: colored background, layers

2014-12-02 Thread Johan Vromans
On Tue, 2 Dec 2014 11:05:20 +0100 Ben Big Noise benbigno...@gmx.de wrote: Wow - that's amazing. Having contributed to the LSR feels good :) This is *very* nice. Kudos to Klaus and Pierre! -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org

Re: scheme problem: colored background, layers

2014-12-02 Thread Urs Liska
Am 02.12.2014 11:29, schrieb Johan Vromans: On Tue, 2 Dec 2014 11:05:20 +0100 Ben Big Noise benbigno...@gmx.de wrote: Wow - that's amazing. Having contributed to the LSR feels good :) This is *very* nice. Kudos to Klaus and Pierre! -- Johan Yes, from me too. I have immediately tagged

Re: scheme problem: colored background, layers

2014-12-02 Thread Johan Vromans
On Tue, 02 Dec 2014 11:43:41 +0100 Urs Liska u...@openlilylib.org wrote: Yes, from me too. I have immediately tagged this as to be investigated for our editorial tools collection. One of the first purposes that came to my mind was marking (colour coding) changes in a score, automatically,

Re: scheme problem: colored background, layers

2014-12-02 Thread Urs Liska
Am 02.12.2014 13:01, schrieb Johan Vromans: On Tue, 02 Dec 2014 11:43:41 +0100 Urs Liska u...@openlilylib.org wrote: Yes, from me too. I have immediately tagged this as to be investigated for our editorial tools collection. One of the first purposes that came to my mind was marking (colour

Re: scheme problem: colored background, layers

2014-12-01 Thread Big Noise
Hi Pierre, thanks for taking the time to think about it. Meanwhile, after some sleepless nights ;-) I've found another way to get some results: % --- \version 2.18.0 colorSpan = #(define-music-function (parser location y-lower y-upper

Re: scheme problem: colored background, layers

2014-12-01 Thread Pierre Perol-Schneider
Hum, interesting Klaus! I'll take a closer look today. Cheers, Pierre ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user

Re: scheme problem: colored background, layers

2014-11-29 Thread Pierre Perol-Schneider
Hi, 2014-11-29 1:15 GMT+01:00 Big Noise benbigno...@gmx.de: Here is my problem: Now the staff lines and the yellow rectangle are located in the same layer, so it's not possible to place the blue cluster between them. Is there a way to make the scheme function put the staff lines

Re: scheme problem: colored background, layers

2014-11-29 Thread Big Noise
Salut Pierre, thanks for your reply. Unfortunately, changing the layer value from -10 to -2 doesn't help. The problem is that the function places the staff lines and the colored rectangle into the *same* layer, whereas I need to leave the staff lines in layer 0 and put the rectangle into

Re: scheme problem: colored background, layers

2014-11-29 Thread Pierre Perol-Schneider
Hi Klaus, 2014-11-29 10:30 GMT+01:00 Big Noise benbigno...@gmx.de: thanks for your reply. Unfortunately, changing the layer value from -10 to -2 doesn't help. The problem is that the function places the staff lines and the colored rectangle into the *same* layer, whereas I need to leave the

scheme problem: colored background, layers

2014-11-28 Thread Big Noise
Hello everybody, for analysis purposes, I'd like to put a colored background behind some notes. Here's my first approach: \version 2.18.0 { { R1 c'2 g' c' r R1 } \\ { \override Voice.ClusterSpanner.color = #(rgb-color 0.5 0.6 1) \override

Re: Scheme Problem

2007-01-01 Thread Mats Bengtsson
The reason that #{ ... \repeat unfold $beats { r4 } ... #} doesn't work is the same that the following doesn't work in an ordinary .ly file: numberOfRepeats = 3 ... \repeat unfold \numberOfRepeats {...} ... In other words, the argument of \repeat cannot be specified using a variable in the

Re: Scheme Problem

2006-12-31 Thread Orm Finnendahl
Am 31. Dezember 2006, 15:23 Uhr (+1100) schrieb Brett Duncan: But when I put \compFor #16 into my .ly file, the following error occurs: syntax error, unexpected NUMBER_IDENTIFIER, expecting DIGIT or UNSIGNED \repeat unfold

Re: Scheme Problem

2006-12-31 Thread Han-Wen Nienhuys
http://code.google.com/p/lilypond/issues/detail?id=208can=1q=fixed_2_10_7 Brett Duncan escreveu: The following function is an attempt on my part to learn how to create such functions, based on what appears in the User Manual. The function itself is not really important, just a problem I set

Re: Scheme Problem

2006-12-31 Thread ian_hulin
://lists.gnu.org/mailman/listinfo/lilypond-user -- View this message in context: http://www.nabble.com/Scheme-Problem-tf2900758.html#a8107195 Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com. ___ lilypond-user mailing list

Scheme Problem

2006-12-30 Thread Brett Duncan
The following function is an attempt on my part to learn how to create such functions, based on what appears in the User Manual. The function itself is not really important, just a problem I set for myself. It's supposed to take a number as its argument and produce the equivalent number of

Apparent Scheme problem under Linux; version 2.3.10

2004-08-02 Thread Nicholas Haggin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greetings, all. Having installed v2.3.10 today, I decided to try it out on a fairly large lilypond-book document (a draft of the hymnal I mentioned in an earlier posting). When I ran lilypond-book, it failed midway through, giving the