[email protected] (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) #{ <>[ #@s s64] | #@s r64 | #@s 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
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user