|
From: | Urs Liska |
Subject: | Re: LilyPond blog has new home! |
Date: | Wed, 10 Jul 2013 11:26:15 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 |
Hey, this work looks fantastic.
I would really love to include that in my reply post which now looks like http://lilypondblog.org/?p=830&preview=1&_ppp=e3bfee8403 I have elaborated on how easy it is to recreate one example with LilyPond and speculated a bit how one could generate a complete set of patterns with one function call. _Please_ have a look at the passage after the score example and think about tweaking your work so it can be used for that purpose. I think it would be an absolute killer if we could prove we can re-generate dozens or hundreds of pages of these books with a few dozens of lines of LilyPond code!!! (See also http://davidaldridge.wordpress.com/2013/04/18/finale-music-and-the-elements-of-rhythm-vols-i-ii-cyber-ink-on-steroids/ and http://www.amazon.com/s/ref=nb_sb_noss/178-1995663-2572616?url=""> Urs PS: One point which could prove difficult is the beaming issue Am 10.07.2013 11:07, schrieb Karl Hammar: David Kastrup:address@hidden (Karl Hammar) writes:If you look at: http://downloads2.makemusic.com/blog/elementsv1-p221.pdf & from his "Binary Theory and Creation of the Fundamental Rhythm Patterns", you'll see that the table is simply a pattern = 0x00E0; // where each bit '1' is 64th note, '0' 64 pause while ( pattern < 0xFF ) { print_top7bits(pattern); print_byte(pattern); pattern++; print_byte(pattern); pattern++; next_line(); } make_box(); How hard would that to do in lilypond ?Well, obviously pretty easy once you have "print_byte" and their ilk. Without any such helper functions, something likeIn the file attached to Davids mail: \new RhythmicStaff \with { \omit TimeSignature } { \time 1/8 #@(map (lambda (s) #{ <>[ address@hidden s64] | address@hidden r64 | address@hidden c'64 \break #}) (map (lambda (pattern) (map (lambda (bit) (if (logbit? bit pattern) #{ c'64 #} #{ r64 #})) (iota 7 7 -1))) (iota 16 224 2))) } That was all too easy!!!! Here is the next version (with barnumber used as exercise no., and maybe one should group beams four notes a time): /////// \paper { indent = 0 \mm } #(set-global-staff-size 16) % for A4 at least \new RhythmicStaff \with { \omit TimeSignature } { \time 3/8 \set Score.barNumberVisibility = #all-bar-numbers-visible \bar "" #@(map (lambda (s) #{ <>[ address@hidden s64] \bar "|" <>[ address@hidden r64] \bar "|" <>[ address@hidden c'64] \break #}) (map (lambda (pattern) (map (lambda (bit) (if (logbit? bit pattern) #{ c'64 #} #{ r64 #})) (iota 7 7 -1))) (iota 16 224 2))) } /////// Maybe I will find time to expand this multiple pages... It seems that #(define (byteToPfx byte) (map (lambda (bit) (if (logbit? bit byte) #{ c'64 #} #{ r64 #})) (iota 8 7 -1))) #@(byteToPfx 34) c'64 (Is lilypond-mode up to standard indenting thoose things?) is just producing side effects and to be able to return a music _expression_, I have to use define-music-function, is it so ? #(define (showByte byte) (display byte)(newline)) #(showByte 224) works as expected, but for byteToPfx I have to use #@, so is returning something, but what is it returning? Regards, /Karl Hammar ----------------------------------------------------------------------- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 _______________________________________________ lilypond-user mailing list address@hidden https://lists.gnu.org/mailman/listinfo/lilypond-user |
[Prev in Thread] | Current Thread | [Next in Thread] |