make_repeated_notes

scoretools.make_repeated_notes(count, duration=Duration(1, 8))

Make count repeated notes with note-head-assignable duration:

>>> scoretools.make_repeated_notes(4)
Selection([Note("c'8"), Note("c'8"), Note("c'8"), Note("c'8")])

Make count repeated logical ties with tied duration:

>>> notes = scoretools.make_repeated_notes(2, (5, 16))
>>> voice = Voice(notes)

Make ad hoc tuplet holding count repeated notes with non-power-of-two duration:

>>> scoretools.make_repeated_notes(3, (1, 12))
Selection([Tuplet(Multiplier(2, 3), "c'8 c'8 c'8")])

Set pitch of all notes created to middle C.

Returns list of zero or more newly constructed notes or list of one newly constructed tuplet.