smallpond

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

commit 52b38de84dda91107a2649a8217728f8df63e153
parent d848076590ecdc79c58c14dbe2de132e2339b2c6
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Wed, 12 Oct 2022 15:26:46 -0500

fix stem length on downbeams

Diffstat:
Msmallpond.lua | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/smallpond.lua b/smallpond.lua @@ -553,18 +553,22 @@ while true do local m = (el.notes[#el.notes].stemy - el.notes[1].stemy) / (el.notes[#el.notes].stemx - el.notes[1].stemx) local x0 = el.notes[1].stemx local y0 = el.notes[1].stemy + if el.stemdir == 1 then + el.notes[1].stem.y2 = y0 + 7*(el.maxbeams - 2) + 5 + end for i, n in ipairs(el.pattern) do if i == 1 then goto continue end local x1 = el.notes[i-1].stemx local x2 = el.notes[i].stemx - el.notes[i].stem.y2 = y0 + m*(x2 - x0) local first, last, inc if el.stemdir == 1 then first = 7*(el.maxbeams - 2) last = 7*(el.maxbeams - n - 1) + el.notes[i].stem.y2 = y0 + m*(x2 - x0) + 7*(el.maxbeams - 2) + 5 inc = -7 else + el.notes[i].stem.y2 = y0 + m*(x2 - x0) first = 0 last = 7*(n-1) inc = 7