Re: Pattern-generating Scheme function challenge

2013-08-18 Thread Janek Warchoł
Hi Schemers, 2013/7/24 Nicolas Sceaux nicolas.sceaux.l...@gmail.com: Le 24 juil. 2013 à 01:09, Thomas Morley thomasmorle...@gmail.com a écrit : In a few hours (after sleep) I'll start my vacations, being offline for three weeks. Perhaps someone else might catch the ball. Hi, Here is a

Re: Pattern-generating Scheme function challenge

2013-08-18 Thread Urs Liska
Janek Warchoł janek.lilyp...@gmail.com schrieb: Hi Schemers, 2013/7/24 Nicolas Sceaux nicolas.sceaux.l...@gmail.com: Le 24 juil. 2013 à 01:09, Thomas Morley thomasmorle...@gmail.com a écrit : In a few hours (after sleep) I'll start my vacations, being offline for three weeks. Perhaps

Re: Pattern-generating Scheme function challenge

2013-08-18 Thread Urs Liska
Janek Warchoł janek.lilyp...@gmail.com schrieb: Hi Schemers, 2013/7/24 Nicolas Sceaux nicolas.sceaux.l...@gmail.com: Le 24 juil. 2013 à 01:09, Thomas Morley thomasmorle...@gmail.com a écrit : In a few hours (after sleep) I'll start my vacations, being offline for three weeks. Perhaps

Re: Pattern-generating Scheme function challenge

2013-08-17 Thread Thomas Morley
2013/7/24 Nicolas Sceaux nicolas.sceaux.l...@gmail.com: Le 24 juil. 2013 à 01:09, Thomas Morley thomasmorle...@gmail.com a écrit : Hi David, Urs, I'm sorry I didn't try to improve my recent code with David's proposals. In a few hours (after sleep) I'll start my vacations, being offline for

Re: Pattern-generating Scheme function challenge

2013-08-17 Thread Urs Liska
Hi all, I'm sorry I didn't seem to acknowledge your contributions. But I'll surely look into them when I'm at home again. Urs Thomas Morley thomasmorle...@gmail.com schrieb: 2013/7/24 Nicolas Sceaux nicolas.sceaux.l...@gmail.com: Le 24 juil. 2013 à 01:09, Thomas Morley

Re: Pattern-generating Scheme function challenge

2013-07-24 Thread Nicolas Sceaux
Le 24 juil. 2013 à 01:09, Thomas Morley thomasmorle...@gmail.com a écrit : Hi David, Urs, I'm sorry I didn't try to improve my recent code with David's proposals. In a few hours (after sleep) I'll start my vacations, being offline for three weeks. Perhaps someone else might catch the

Re: Pattern-generating Scheme function challenge

2013-07-21 Thread Werner LEMBERG
%% Why not public? Not public because it is trivial and not discoverable. People looking through GUILE documentation will find and use lset-difference. There is a lot of cruft in lily-library like that which should really be thrown out. Making it public would be a step in the wrong

Re: Pattern-generating Scheme function challenge

2013-07-21 Thread David Kastrup
Urs Liska u...@openlilylib.org writes: Hi Harm, I did a quick compilation (further investigation to follow) - and that's awesome! Thenk you very much. Of course it will be hard to 'sell' it with a 'hey, look how easy it is to realize that with LilyPond ;-) Let's see how we can improve on

Re: Pattern-generating Scheme function challenge

2013-07-21 Thread David Kastrup
Thomas Morley thomasmorle...@gmail.com writes: 2013/7/21 David Kastrup d...@gnu.org: Urs Liska u...@openlilylib.org writes: Hi Harm, I did a quick compilation (further investigation to follow) - and that's awesome! Thenk you very much. Of course it will be hard to 'sell' it with a 'hey,

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread Thomas Morley
Hi Urs, below my approach. Though, the function only needs one argument. :) \version 2.17.22 %% While compiling with 2.16.2, a little modification in \layout is %% recommended. %% Used to get access to integer-list %% Though, returns a warning: %% imported module (srfi srfi-60) overrides

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread Urs Liska
Hi Harm, I did a quick compilation (further investigation to follow) - and that's awesome! Thenk you very much. Of course it will be hard to 'sell' it with a 'hey, look how easy it is to realize that with LilyPond ;-) Best Urs Am 20.07.2013 23:48, schrieb Thomas Morley: \version 2.17.22

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread Thomas Morley
2013/7/20 Urs Liska u...@openlilylib.org: Hi Harm, I did a quick compilation (further investigation to follow) - and that's awesome! Thenk you very much. Of course it will be hard to 'sell' it with a 'hey, look how easy it is to realize that with LilyPond ;-) Best Urs Well, typing

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread Urs Liska
Am 21.07.2013 00:07, schrieb Thomas Morley: 2013/7/20 Urs Liska u...@openlilylib.org: Hi Harm, I did a quick compilation (further investigation to follow) - and that's awesome! Thenk you very much. Of course it will be hard to 'sell' it with a 'hey, look how easy it is to realize that with

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread Thomas Morley
2013/7/21 Urs Liska u...@openlilylib.org: Am 21.07.2013 00:07, schrieb Thomas Morley: 2013/7/20 Urs Liska u...@openlilylib.org: Hi Harm, I did a quick compilation (further investigation to follow) - and that's awesome! Thenk you very much. Of course it will be hard to 'sell' it with a

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread Urs Liska
Am 21.07.2013 00:17, schrieb Thomas Morley: 2013/7/21 Urs Liska u...@openlilylib.org: Am 21.07.2013 00:07, schrieb Thomas Morley: 2013/7/20 Urs Liska u...@openlilylib.org: Hi Harm, I did a quick compilation (further investigation to follow) - and that's awesome! Thenk you very much. Of

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread Urs Liska
Am 21.07.2013 00:25, schrieb Urs Liska: Am 21.07.2013 00:17, schrieb Thomas Morley: 2013/7/21 Urs Liska u...@openlilylib.org: Am 21.07.2013 00:07, schrieb Thomas Morley: 2013/7/20 Urs Liska u...@openlilylib.org: Hi Harm, I did a quick compilation (further investigation to follow) - and

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread Thomas Morley
2013/7/21 Urs Liska u...@openlilylib.org: Am 21.07.2013 00:25, schrieb Urs Liska: Am 21.07.2013 00:17, schrieb Thomas Morley: 2013/7/21 Urs Liska u...@openlilylib.org: Am 21.07.2013 00:07, schrieb Thomas Morley: 2013/7/20 Urs Liska u...@openlilylib.org: Hi Harm, I did a quick

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread David Kastrup
Thomas Morley thomasmorle...@gmail.com writes: % %% definitions, helpers and functions % %% c/p from lily-library.scm %% Why not public? #(define (list-minus a b) Return list of elements in A that are not in B.

Re: Pattern-generating Scheme function challenge

2013-07-16 Thread Jan-Peter Voigt
Hi there, I am not at home ... so here is not a solution, but here is a little snippet, that includes two functions, that may be helpful: \version 2.16.1 musA = \relative c'' { bes4 a c b } musB = #(music-map (lambda (m) (let* ((mus m) (dur (ly:music-property mus 'duration))) (if

Re: Pattern-generating Scheme function challenge

2013-07-16 Thread Jan-Peter Voigt
OK, sorry ... I missed the point, you want pattern generation ;) --snip-- #(use-modules (srfi srfi-60)) #(define-public pattern (define-music-function (parser location n pitch dur) (integer? ly:pitch? ly:duration?) (let ((l (list))) (define (pat i) (if ( i n) (append (pat (* 2 i))

Pattern-generating Scheme function challenge

2013-07-13 Thread Urs Liska
Hi all, the Schemers in particular, you surely know by now that I am writing a series of posts that demonstrate how elegantly and efficiently we can recreate a portion of a book that obviously has been produced with many pains in Finale. I'm confident that it will be an impressive display of

Re: Pattern-generating Scheme function challenge

2013-07-13 Thread Urs Liska
Am 13.07.2013 16:03, schrieb Urs Liska: Hi all, the Schemers in particular, For each number in the range it should: PS it would be advisable to create an 'inner function' that operates on a single number and an outer function that calls it repetitively. This is because it might someday

Re: Pattern-generating Scheme function challenge

2013-07-13 Thread Janek Warchoł
Hi, 2013/7/13 Urs Liska u...@openlilylib.org: you surely know by now that I am writing a series of posts that demonstrate how elegantly and efficiently we can recreate a portion of a book that obviously has been produced with many pains in Finale. I'm confident that it will be an impressive

Re: Pattern-generating Scheme function challenge

2013-07-13 Thread Urs Liska
Ok, this would be very good too. Makes sense only after the third post is published, but doesn't mean you can't throw in your thoughts on the list already. Urs Janek Warchoł janek.lilyp...@gmail.com schrieb: Hi, 2013/7/13 Urs Liska u...@openlilylib.org: you surely know by now that I am

Re: Pattern-generating Scheme function challenge

2013-07-13 Thread Jim Long
On Sat, Jul 13, 2013 at 04:03:25PM +0200, Urs Liska wrote: For each number in the range it should: - produce a LilyPond pattern corresponding to the binary representation of the given number It may be my misunderstanding, but is the number below the systems meant to indicate the number

Re: Pattern-generating Scheme function challenge

2013-07-13 Thread Urs Liska
Please ask Mr. Aldridge about that ;-) I assume it is the 'pattern number', not the binary number. So he probably started with 1, not 0, although I don't see much use in the two first patterns anyway. Urs Jim Long lilyp...@umpquanet.com schrieb: On Sat, Jul 13, 2013 at 04:03:25PM +0200,

Re: Pattern-generating Scheme function challenge

2013-07-13 Thread Thomas Morley
2013/7/13 Urs Liska u...@openlilylib.org: Hi all, the Schemers in particular, [...] Well, this schemer is tired. Perhaps another day. Currently i've not even tried to understand the pattern. Cheers, Harm ___ lilypond-user mailing list