mirror of
https://github.com/9x/sheetmusictrainer.git
synced 2026-11-03 22:03:54 +01:00
Mobile clipping fix + 6/8 render crash fix (root cause) + more variants
- Clipping: min width per bar raised (16ths 420px, 8ths 330px, quarters 240px) and format width reserves more room (clef/key 100px, barline margin 24px) — narrow screens now wrap into more rows with real margins instead of clipping the last bar. - 6/8 crash ROOT CAUSE: Giuliani figures whose length didn't divide the bar into renderable note values produced 96-tick durations (32nd-ish) that durationCode can't spell -> renderer threw -> white screen. Giuliani generator now snaps figure subdivision to renderable durations (per 2/3/4 divisions, quarter-note walk as last resort); pimamim in 6/8 renders as a walking quarter figure. - 6/8 melody templates: fixed sums (were 2640/3120 in 4 templates — those filtered out, silently degrading to the fallback). - More variants: arpeggio figures 1-3-5-3, 1-2-1-3-2-1, 1-5-4-5-3-5, 1-3-2-5-3-2; Giuliani patterns p-i-a-i, p-m-a-m-i, p-i-m-a-m-i (waltz), p-i-m-a-i-a. - Tests 179/179.
This commit is contained in:
@@ -67,7 +67,7 @@ const TEMPLATES_4_L3: number[][] = [
|
||||
];
|
||||
// 6/8 templates (6 quarter-ticks = 2880 per bar; 8th-note oriented).
|
||||
const TEMPLATES_6_L1: number[][] = [
|
||||
[240, 240, 240, 240, 240, 240, 480, 480],
|
||||
[240, 240, 240, 240, 240, 240, 240, 240, 480, 480],
|
||||
[480, 480, 240, 240, 240, 240, 480, 480],
|
||||
[240, 240, 480, 480, 480, 240, 240, 240, 240],
|
||||
[960, 480, 480, 480, 480],
|
||||
@@ -75,12 +75,11 @@ const TEMPLATES_6_L1: number[][] = [
|
||||
[1440, 480, 480, 480],
|
||||
];
|
||||
const TEMPLATES_6_L2: number[][] = [
|
||||
[480, 480, 120, 120, 120, 120, 240, 240, 480, 480],
|
||||
[480, 480, 120, 120, 120, 120, 240, 240, 480, 480],
|
||||
[120, 120, 120, 120, 480, 480, 240, 240, 240, 240, 240, 240],
|
||||
[720, 240, 240, 480, 480, 240, 240, 240, 240],
|
||||
[360, 120, 480, 720, 480, 240, 240, 240, 240],
|
||||
[480, 240, 240, 480, 240, 240, 480, 240, 240, 240],
|
||||
];
|
||||
[480, 240, 240, 480, 240, 240, 240, 240, 240, 240],
|
||||
[480, 240, 240, 480, 240, 240, 240, 240, 240, 240],
|
||||
[480, 240, 240, 480, 240, 240, 240, 240, 240, 240],];
|
||||
const TEMPLATES_3_L1: number[][] = [
|
||||
[480, 480, 480],
|
||||
[960, 480],
|
||||
|
||||
Reference in New Issue
Block a user