Re: [abjad-user] Digest for - 1 update in 1 topic

Skip to first unread message

Adam McCartney

Jun 24, 2022, 3:43:52 AM6/24/22
Hi Seán,

What way are you thinking about the rest in relation to other notes?

It seems like the program that abjad tries to interface with - i.e. Lilypond, basically creates an internal representation
of everything (notes, rests, durations, dynamics, markup) as one big Scheme list. This makes the nodes in this list
very easy to interchange.

The approach in abjad is similar, but you would first define the rest and note objects and then combine them
into a container in a separate step.

import abjad

erest = "r8"
r = abjad.Rest(erest)

maker = abjad.NoteMaker()
notes = maker(
        [0, 2, 4, 5, 7, 5, 4, 9, 2, 7],
        [(1, 8), (1, 8), (1, 8),
         (3, 16), (1, 32), (1, 32),
         (1, 8), (1, 8), (1, 8)]

voice = abjad.Voice([r, notes])
staff = abjad.Staff([voice])

This will output a chunk of lilypond code that you can drop in to any valid lilypond score
"\\new Staff\n{\n    \\new Voice\n    {\n        r8\n        c'8\n        d'8\n        e'8\n        f'8.\n        g'32\n        f'32\n        e'8\n        a'8\n        d'8\n        g'8\n    }\n}"

all the best,

On Thu, Jun 23, 2022 at 9:56 AM <> wrote:
"Seán ó Dálaigh" <>: Jun 22 08:11PM +0100

Hello all,
Quite new to Abjad so hopefully not too banal a question...
Is it possible to specify a rest explicitly when using Notemaker?
Something like;
maker = abjad.NoteMaker()
maker(['---rest?---'], [1/4])
Thanks in advance,
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to

Seán ó Dálaigh

Oct 11, 2022, 3:46:40 AM10/11/22
to abjad-user
Hey Adam,

I somehow missed this reply, thanks so much, it makes sense! Hope all is well


Reply all
Reply to author
0 new messages