smallpond

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/smallpond
Log | Files | Refs | README | LICENSE

commit 4174cb678df91079e53fd644e298d614ce93ed81
parent 7b18cd21617fa90cbca2ed1399208589e95c344c
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Sat,  5 Nov 2022 18:22:44 -0500

don't override stemdir in beam if already set

Diffstat:
Msmallpond.lua | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/smallpond.lua b/smallpond.lua @@ -350,9 +350,19 @@ function trybeam(staffname, tobeam, beampattern) end -- update the stem direction + local unset = true for _, note in ipairs(tobeam) do - note.stemdir = stemdir - table.insert(staff, note) + if note.stemdir then + unset = false + break + end + end + + if unset then + for _, note in ipairs(tobeam) do + note.stemdir = stemdir + table.insert(staff, note) + end end local beam = {kind='beam', notes=tobeam, pattern=beampattern, stemdir=stemdir, maxbeams=math.max(table.unpack(beampattern))} table.insert(staff, beam)