help with making scores with time signatures

15 views
Skip to first unread message

Pedro Faria

unread,
Jul 25, 2022, 12:36:18 AM7/25/22
to abjad-user
Hello! I'm sure this is something simple that I'm missing, but is there a way to build a score, and then specify a sequence of time signatures to place in it?

I want to algorithmically create a list of notes, put them on simultaneous staves, and then specify the time signatures these notes should fit in, almost like a wrap.

Trevor Bača

unread,
Jul 25, 2022, 2:09:18 PM7/25/22
to abjad...@googlegroups.com
Like in LilyPond, Abjad time signatures are attached to notes, rests or chords.

So make notes and rests first, and then attach time signatures where it makes sense.


On Mon, Jul 25, 2022 at 12:36 AM Pedro Faria <pedrofa...@gmail.com> wrote:
Hello! I'm sure this is something simple that I'm missing, but is there a way to build a score, and then specify a sequence of time signatures to place in it?

I want to algorithmically create a list of notes, put them on simultaneous staves, and then specify the time signatures these notes should fit in, almost like a wrap.

--
You received this message because you are subscribed to the Google Groups "abjad-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to abjad-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/abjad-user/6211ad60-26d0-4927-9995-6fadff5452d3n%40googlegroups.com.


--

Seán ó Dálaigh

unread,
Oct 11, 2022, 3:55:53 AM10/11/22
to abjad-user
Hi all,

I had a follow up question to this. I have a large array of durations of varying sizes, including tied values. I am attempting to have a bar for each duration. For example the first two notes are 19/16 and 2/16 long. So I want to have two measures of 19/16 and 2/16 to hold the, (as in the OP I believe). The problem is that the first note, 19/16, is a whole note tied to a half note. And if I look at what is in the staff this is two note objects, '1/1' and '1/8.' So if I try to also algorithmically add Time sigs after the fact, simply looping through the notes on the staff won't work - the tied notes are counted as separate and  the next time sigs sneak in early. Of course I could go through each and make a bespoke list of timesigs, but I am working with v large arrays of durations... The question... is it possible to somehow identify if the note on a staff is the first note in a tied sequence? 

Something like 

if note is tied: 
     dont add time sig to this note..

Thanks in advance!
S

Martín Rincón Botero

unread,
Oct 11, 2022, 5:27:04 AM10/11/22
to abjad-user
Hi Seán,

what you're looking for are abjad's logical ties. You can select them using abjad.select.logical_ties(selection). Then, to attach a time signature to it you attach it to the "head" of the logical tie:

for tie, time in zip(abjad.select.logical_ties(selection), times):
  abjad.attach(abjad.TimeSignature(time), tie.head)

—Martín.


Seán ó Dálaigh

unread,
Oct 11, 2022, 12:47:09 PM10/11/22
to abjad-user
Hey Martín,

Perfect, thanks so much!

Seán

Reply all
Reply to author
Forward
0 new messages