lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LilyPond blog has new home!


From: David Kastrup
Subject: Re: LilyPond blog has new home!
Date: Tue, 09 Jul 2013 12:43:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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 like

\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)))
}
would seem like a reasonable starting point.

-- 
David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]