Re: Pattern-generating Scheme function challenge

2013-08-18 Thread Urs Liska
"Janek Warchoł" schrieb: >Hi Schemers, > >2013/7/24 Nicolas Sceaux : >> Le 24 juil. 2013 à 01:09, Thomas Morley 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 propos

Re: Pattern-generating Scheme function challenge

2013-08-18 Thread Urs Liska
"Janek Warchoł" schrieb: >Hi Schemers, > >2013/7/24 Nicolas Sceaux : >> Le 24 juil. 2013 à 01:09, Thomas Morley 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 propos

Re: Pattern-generating Scheme function challenge

2013-08-18 Thread Janek Warchoł
Hi Schemers, 2013/7/24 Nicolas Sceaux : > Le 24 juil. 2013 à 01:09, Thomas Morley 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 proposition, with probably still room for improv

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 schrieb: >2013/7/24 Nicolas Sceaux : >> Le 24 juil. 2013 à 01:09, Thomas Morley a >écrit : >> >>> Hi David, Urs, >>> >>> I'm sorry I didn't try to imp

Re: Pattern-generating Scheme function challenge

2013-08-17 Thread Thomas Morley
2013/7/24 Nicolas Sceaux : > Le 24 juil. 2013 à 01:09, Thomas Morley 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 mi

Re: Pattern-generating Scheme function challenge

2013-07-24 Thread Nicolas Sceaux
Le 24 juil. 2013 à 01:09, Thomas Morley 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 ball. Hi, Here is

Re: Pattern-generating Scheme function challenge

2013-07-23 Thread Thomas Morley
2013/7/21 David Kastrup : > Thomas Morley writes: > >> 2013/7/21 David Kastrup : >>> Urs Liska 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, l

Re: Pattern-generating Scheme function challenge

2013-07-21 Thread David Kastrup
Thomas Morley writes: > 2013/7/21 David Kastrup : >> Urs Liska 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 tha

Re: Pattern-generating Scheme function challenge

2013-07-21 Thread Thomas Morley
2013/7/21 David Kastrup : > Urs Liska 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

Re: Pattern-generating Scheme function challenge

2013-07-21 Thread David Kastrup
Urs Liska 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 that. > Am 20.0

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 wr

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread David Kastrup
Thomas Morley 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." > (lset-differenc

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread Thomas Morley
2013/7/21 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 : > > Am 21.07.2013 00:07, schrieb Thomas Morley: > > 2013/7/20 Urs Liska : > > Hi Harm, > > I did a quick compilation (further investigation to follow) - and that

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 : Am 21.07.2013 00:07, schrieb Thomas Morley: 2013/7/20 Urs Liska : Hi Harm, I did a quick compilation (further investigation to follow) - and that's awesome! Thenk you very much. Of co

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 : Am 21.07.2013 00:07, schrieb Thomas Morley: 2013/7/20 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 'h

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread Thomas Morley
2013/7/21 Urs Liska : > Am 21.07.2013 00:07, schrieb Thomas Morley: > >> 2013/7/20 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

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 : 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

Re: Pattern-generating Scheme function challenge

2013-07-20 Thread Thomas Morley
2013/7/20 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 Well, typing \output #8 is _v

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
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 c

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)) (lis

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 (l

Re: Pattern-generating Scheme function challenge

2013-07-13 Thread Thomas Morley
2013/7/13 Urs Liska : > 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 lilypond-user@gnu.org https://li

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 schrieb: >On Sat, Jul 13, 2013 at 04:03:25PM +0200, Urs Liska wrote: >> >>

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 w

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ł" schrieb: >Hi, > >2013/7/13 Urs Liska : >> you surely know by now that I am writing a series of posts that >demonstra

Re: Pattern-generating Scheme function challenge

2013-07-13 Thread Janek Warchoł
Hi, 2013/7/13 Urs Liska : > 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 LilyPon

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 become

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 Li