Better way to render Repeats #94
Answered
by
Xavman42
charlesneimog
asked this question in
Q&A
|
Hi, there is a better way to render repeated barlines? I am using this, and the result is perfect, but it seems wrong... from neoscore.core.units import ZERO, Mm
from neoscore.core import neoscore
from neoscore.common import *
from neoscore.western.chordrest import NoteheadTable
neoscore.setup()
POSITION = (Mm(0), Mm(0))
staff = Staff(POSITION, None, Mm(80))
Barline(Mm(80), staff.group, barline_style.END)
Clef(ZERO, staff, 'treble')
noteheads = NoteheadTable("repeatDot", "repeatDot", "repeatDot", "repeatDot")
note = [('a', '', 4)]
Chordrest(Mm(76.5), staff, note, (int(1), int(1)), table=noteheads)
note = [('c', '', 5)]
Chordrest(Mm(76.5), staff, note, (int(1), int(1)), table=noteheads)
neoscore.show(display_page_geometry=False)Thanks |
Answered by
Xavman42
Jan 18, 2023
Replies: 3 comments 4 replies
|
You could alternatively use the SMuFL "repeatRight" glyph for this, though the result doesn't look as good as yours - at least not without some tweaking. |
3 replies
Answer selected by
charlesneimog
|
As you've seen, there isn't out-of-the-box support for this right now in neoscore. But I took a crack at an implementation here which hopefully should be good for your purposes. I think the rhythm dot positioning is still not quite perfect, so feel free to tweak the example and let me know if you have a better solution. |
1 reply
|
@ajyoon thanks for the example code and the function. I will use it!!! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

You could alternatively use the SMuFL "repeatRight" glyph for this, though the result doesn't look as good as yours - at least not without some tweaking.