Skip to content

Commit 974fe1a

Browse files
authored
Merge pull request #1519 from rvilarl/fix/1502
2 parents ea48402 + 1155e19 commit 974fe1a

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/tables.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ const ornaments: Record<string, { code: string }> = {
539539
};
540540

541541
export class Tables {
542-
static SOFTMAX_FACTOR = 100;
542+
static SOFTMAX_FACTOR = 10;
543543
static STEM_WIDTH = 1.5;
544544
static STEM_HEIGHT = 35;
545545
static STAVE_LINE_THICKNESS = 1;

tests/formatter_tests.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ function penultimateNote(options: TestOptions): void {
190190
f.getContext().fillText(`softmax: ${softmax.toString()}`, staffWidth + 20, y + 50);
191191
y += 100;
192192
};
193-
draw(100);
193+
draw(15);
194194
draw(10);
195195
draw(5);
196196
draw(2);
197-
draw(1.5);
197+
draw(1);
198198
ok(true);
199199
}
200200

@@ -270,7 +270,7 @@ function accidentalJustification(options: TestOptions): void {
270270
let beams = Beam.generateBeams(notes11.slice(2));
271271
beams = beams.concat(beams, Beam.generateBeams(notes21.slice(1, 3)));
272272
beams = beams.concat(Beam.generateBeams(notes21.slice(3)));
273-
const formatter = f.Formatter({ softmaxFactor: 100 }).joinVoices([voice11]).joinVoices([voice21]);
273+
const formatter = f.Formatter({}).joinVoices([voice11]).joinVoices([voice21]);
274274

275275
const width = formatter.preCalculateMinTotalWidth([voice11, voice21]);
276276
const stave11 = f.Stave({ y: 20, width: width + Stave.defaultPadding });
@@ -359,7 +359,7 @@ function unalignedNoteDurations2(options: TestOptions): void {
359359
const voice2 = new Voice({ num_beats: 4, beat_value: 4 });
360360
voice2.addTickables(notes2);
361361

362-
const formatter = new Formatter({ softmaxFactor: 100, globalSoftmax: options.params.globalSoftmax });
362+
const formatter = new Formatter({ globalSoftmax: options.params.globalSoftmax });
363363
formatter.joinVoices([voice1]);
364364
formatter.joinVoices([voice2]);
365365
const width = formatter.preCalculateMinTotalWidth([voice1, voice2]);
@@ -690,17 +690,17 @@ function softMax(options: TestOptions): void {
690690

691691
draw(50, 1);
692692
draw(150, 2);
693-
draw(250, 10);
694-
draw(350, 20);
695-
draw(450, 200);
693+
draw(250, 5);
694+
draw(350, 10);
695+
draw(450, 15);
696696
}
697697

698698
function mixTime(options: TestOptions): void {
699699
const f = VexFlowTests.makeFactory(options, 400 + Stave.defaultPadding, 250);
700700
f.getContext().scale(0.8, 0.8);
701701
const score = f.EasyScore();
702702
const system = f.System({
703-
details: { softmaxFactor: 100 },
703+
details: {},
704704
autoWidth: true,
705705
debugFormatter: true,
706706
});
@@ -801,22 +801,22 @@ function annotations(options: TestOptions): void {
801801
title: '550px,softMax:5',
802802
},
803803
{
804-
sm: 10,
804+
sm: 5,
805805
width: 550,
806806
lyrics: lyrics2,
807-
title: '550px,softmax:10,different word order',
807+
title: '550px,softmax:5,different word order',
808808
},
809809
{
810-
sm: 5,
810+
sm: 10,
811811
width: 550,
812812
lyrics: lyrics2,
813-
title: '550px,softmax:5',
813+
title: '550px,softmax:10',
814814
},
815815
{
816-
sm: 100,
816+
sm: 15,
817817
width: 550,
818818
lyrics: lyrics2,
819-
title: '550px,softmax:100',
819+
title: '550px,softmax:15',
820820
},
821821
];
822822

0 commit comments

Comments
 (0)