Skip to content

Commit

Permalink
Merge pull request #1519 from rvilarl/fix/1502
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilarl authored Jan 9, 2023
2 parents ea48402 + 1155e19 commit 974fe1a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ const ornaments: Record<string, { code: string }> = {
};

export class Tables {
static SOFTMAX_FACTOR = 100;
static SOFTMAX_FACTOR = 10;
static STEM_WIDTH = 1.5;
static STEM_HEIGHT = 35;
static STAVE_LINE_THICKNESS = 1;
Expand Down
28 changes: 14 additions & 14 deletions tests/formatter_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ function penultimateNote(options: TestOptions): void {
f.getContext().fillText(`softmax: ${softmax.toString()}`, staffWidth + 20, y + 50);
y += 100;
};
draw(100);
draw(15);
draw(10);
draw(5);
draw(2);
draw(1.5);
draw(1);
ok(true);
}

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

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

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

draw(50, 1);
draw(150, 2);
draw(250, 10);
draw(350, 20);
draw(450, 200);
draw(250, 5);
draw(350, 10);
draw(450, 15);
}

function mixTime(options: TestOptions): void {
const f = VexFlowTests.makeFactory(options, 400 + Stave.defaultPadding, 250);
f.getContext().scale(0.8, 0.8);
const score = f.EasyScore();
const system = f.System({
details: { softmaxFactor: 100 },
details: {},
autoWidth: true,
debugFormatter: true,
});
Expand Down Expand Up @@ -801,22 +801,22 @@ function annotations(options: TestOptions): void {
title: '550px,softMax:5',
},
{
sm: 10,
sm: 5,
width: 550,
lyrics: lyrics2,
title: '550px,softmax:10,different word order',
title: '550px,softmax:5,different word order',
},
{
sm: 5,
sm: 10,
width: 550,
lyrics: lyrics2,
title: '550px,softmax:5',
title: '550px,softmax:10',
},
{
sm: 100,
sm: 15,
width: 550,
lyrics: lyrics2,
title: '550px,softmax:100',
title: '550px,softmax:15',
},
];

Expand Down

0 comments on commit 974fe1a

Please sign in to comment.