Better way to render Repeats #94
-
|
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 |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
-
|
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. |
Beta Was this translation helpful? Give feedback.
-
|
@ajyoon thanks for the example code and the function. I will use it!!! |
Beta Was this translation helpful? Give feedback.

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.