Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix octaveshift error when startX greater stopX #1282

Merged
merged 2 commits into from Dec 1, 2022

Conversation

sschmidTU
Copy link
Contributor

@sschmidTU sschmidTU commented Dec 1, 2022

Fixes #1281

no visual regressions.

@sschmidTU sschmidTU merged commit e8d89a0 into develop Dec 1, 2022
@sschmidTU sschmidTU deleted the fix/octaveshift-startx-greater-stopx branch December 1, 2022 01:28
sschmidTU added a commit that referenced this pull request Jan 5, 2023
….0, adapt Graphical/Vexflow classes (#1247)

code changes outside of merging develop, on differences in handling vexflow4, can be seen here:
9520eea
(VexFlowMeasure, VexFlowMusicSheetCalculator, VexFlowMusicSheetDrawer, VexFlowPedal)

PR by @rvilarl 

New/changed Vexflow issues are documented in:
#1247 (comment)

merged commits:

* osmd.load: add optional tempTitle parameter with default value "Untitled Score" (#1170). generateImages: set tempTitle to filename

generateImages: set tempTitle to filename, to avoid lots of "loaded score Untitled score" messages, if sheet has no xml title

* generateImages: replace console.logs with debug() calls

acts basically the same for now, except prepending [generateImages] to the console.log

* fix(Rehearsal Mark): Position correctly when EngravingRules.RehearsalMarkFontSize is increased (#1176)

not visual regression tested yet
thanks to johanvelthuis for the suggestion.

* fix(generateImages): Fix rehearsal marks not having a box around them due to node canvas restriction.

also, shift rehearsal mark slightly more downwards again to old y position (see Bolivia sample)

seems like the .height attribute only exists with SVG (and browser canvas probably)

* generateImages: fix rehearsal mark positioning for node canvas

very close to develop now, almost no visual regression

* fix(Layout): Fix 12/8 rhythm with rest measures overflowing notes, other rest measure issues (#1187, merge #1188)

merge fix/12-8-layout

* fix layout for 12/8 rhythm overflowing into next measure (#1187)

this happens when there are whole rest measures along other measures
(see test_12-8-rhythm-overflow.musicxml, Dichterliebe)

* try vexflowpatch for formatter for tabs error

* comment VexFlowPatch formatter change (#1187)

* comment

* bump version to 1.5.1-release

* chore: update changelog for 1.5.1

* chore: update osmd.Version to 1.5.1-dev

* fix(binarySearch): Fix rare infinite loop in CollectionUtil.binarySearch (#1201, merge #1202)

* fix rare infinite loop in CollectionUtil.binarySearch

* comment

* comment

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>

* feat(Tuplets): Add EngravingRules.TupletNumberLimitConsecutiveRepetitions (default true) etc. (breaking change) #1207, merge #1208

merge PR #1208

* feat(Tuplets): Add EngravingRules.TupletNumberLimitConsecutiveRepetitions (default true) etc. (breaking change) #1207

add EngravingRules.TupletNumberLimitConsecutiveRepetitions
add EngravingRules.TupletNumberMaxConsecutiveRepetitions
add EngravingRules.TupletNumberAlwaysDisableAfterFirstMax

add 3 test samples
add vexflow patch to add option for tuplets not to render their tuplet number

* fix tuplet numbers disabled for tuplet with same tuplet number but different note value (typlength)

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>

* feat(Accents): Support soft-accent as crescendo+decrescendo wedge on one note/entry (#1214, merge #1215)

closes #1214
squashed commits:

* feat(Accents): Support soft-accent as crescendo+decrescendo wedge on one note/entry (#1214)

* refactor: add EngravingRules.SoftAccentSizeFactor, rename test sample

* soft-accent: place below score for non-top staff (+TODO)

not an ideal solution, which could get quite complex

* refactor: minor import improvement

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>

* chore: bump version to 1.5.2

* chore: update changelog for 1.5.2

* chore: update osmd.Version to 1.5.2-dev

* fix(Tuplets): Fix rest notes not having TypeLength set. Fix tuplet count not reset for next voice (rare issue) (#1207)

the tuplet count reset only matters when the next voice starts with the same tuplets.
Rest notes having TypeLength was required by the audio player,
where Instrument.Voices also has rest notes in the voice entries,
which in this base osmd version without audio player is not the case for some reason.

This detail also means that the tuplet number count doesn't increase in tuplets consisting of rests only here,
because the voices don't have these notes as voice entries.
This issue disappears in the audio player.

This change also fixes the whole rest at the start of Debussy - Mandoline.

* feat(GraceNotes): Reduce unnecessary margin/spacing (#1221). Add EngravingRules.GraceNoteGroupXMargin (default 0)

closes #1221

this reveals a previously hidden lyrics overlap issue in Beethoven Geliebte,
which will be fixed in the next commit via EngravingRules.LyricsYMarginToBottomLine

* feat(Lyrics): Add EngravingRules.LyricsYMarginToBottomLine (#389). New default 0.2 prevents overlap of stems with lyrics.

* chore: bump osmd.Version to 1.5.3

* chore: update changelog for 1.5.3

* chore: update osmd.Version to 1.5.3-dev. update changelog

* refactor: simplify EngravingRules.applyDefaultColorMusic()

* fix(Layout): Fix hiding first instrument causing shift of lyrics, dynamics, etc (#1222)

fix #1222 

squashed commits in PR #1223:

* fix(Layout): Fix positions of lyrics and other elements shifted when first measure/instrument hidden (#1222)

see the PR of @Elitebigboss90 in osmd-extended

* data: add test_layout_first_measure_hidden.musicxml

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>
Elitebigboss90

* fix(Slurs): Fix slurs overlapping with articulations like staccato on slur end note (part of #1224)

merge PR #1225

* fix(Slurs): Fix slurs overlapping with articulations like staccato on slur end note (#1224)

* data: add test_slur_overlap_articulation_staccato

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>

* fix(Slurs): Fix overlap of slurs with accents on start note (part of #1224)

merge PR #1226

squashed commits:
(first 2 commits below: merging develop, previous PR)
* fix(Slurs): Fix slurs overlapping with articulations like staccato on slur end note (#1224)

* data: add test_slur_overlap_articulation_staccato

* fix(Slurs): Fix overlap of slurs with accents on start note (part of #1224). Add EngravingRules.SlurStartArticulationYOffsetOfArticulation

add 2 test samples, VexFlowPatch for articulation.js (respect y_shift)

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>

* chore: bump version to 1.5.4

* chore: update changelog for 1.5.4

* chore: update osmd.Version to 1.5.4-dev

* chore: split changelog into two files, as Github can't render it anymore (#1227)

when viewing the file on Github, the page said
"This blob took too long to generate.
But you can view the raw file."

I guess we improved too many things! ;)

* chore: changelog: link to old changelog after split (#1227)

* fix(Drums): Fix Slash notehead overwriting other noteheads in chord/VoiceEntry (#1228)

merge PR #1229

* fix slash notehead overwriting noteheads for whole voiceentry (#1228)

WIP: do visual regression tests

* fix undefined variable

error during cleanup for last commit

* fix slash note heads going over stems, fix glyph undefined in OSMD Function Test - Notehead shapes

* data: change test title

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>

* fix(Measure Numbers): Fix EngravingRules.RenderMeasureNumbersOnlyAtSystemStart not showing measure number 1 after pickup measure

* chore: bump version to 1.5.5

* chore: update changelog for 1.5.5

* chore: update osmd.Version to 1.5.5-dev

* fix(DefaultColorMusic): Fix EngravingRules.DefaultColorMusic not applying to octave brackets, crescendo/decrescendo wedges (#1218)

* feat(DefaultColorLyrics): Add EngravingRules.DefaultColorLyrics, independent from DefaultColorMusic (#1218)

(if you set defaultColorMusic in the OSMD options after setting DefaultColorLyrics, it will be overwritten,
so if you want to set both, set defaultColorMusic first)

the saved if check should save some performance because of branch prediction

* fix first half diminuendo/crescendo lines red by default (Haydn Concertante m. 329) (#1218)

this wouldn't have happened if the default color for drawLine wasn't red ;)

* fix(DefaultColorMusic): Fix rehearsal marks ignoring defaultColorMusic (#1218) (svgcontext.rect ignoring stroke)

* fix(Canvas): Fix rehearsal marks not rendered in browser with Canvas backend

* fix(DefaultColorMusic): Fix CanvasBackend overwriting and not using DefaultColorMusic (#1218)

* fix(DefaultColorLyrics): Fix not applied on re-render

* demo: don't reset osmd (and EngravingRules) on changing backend

* fix(EngravingRules): Fix GraphicalVoiceEntries creating their own EngravingRules. Reduce EngravingRules creations also via DrawingParameters.

Previously, EngravingRules were created and default values loaded 6 times or so for on the first load.

* fix DrawingParameters created twice if given in OSMD constructor

* fix missing drawingParameters null check in previous commit

* fix tests

* refactor: shorten default string values

* fix(Spacing): Fix implicit measure spacing after repeat (#1236). Add EngravingRules.PickupMeasureRepetitionSpacing

merge PR #1234

* implicit measures: also give measures with 1 staff entry more space (WIP -> visual regression)

* implicit measure: only add space if repetition in previous measure. (e.g. don't extend measure 1 that is pickup)

* reduce pickup repetition spacing to 0.8, add EngravingRules.PickupMeasureRepetitionSpacing

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>

* chore: bump version to 1.5.6

* chore: update changelog for 1.5.6

* chore: set osmd.Version to 1.5.6-dev

* chore: add .nvmrc to indicate node v14 use for MacOS build issues (#1239)

* demo: always create TransposeCalculator (fix undefined in public demo). add docs for Transpose values (#1240)

* feat(Performance): Marginal speedup potential for getImageData by using willReadFrequently attribute for CanvasContext (#1242)

merge PR #1241

Performance tended to be slightly better, but no significant results due to high variance. See #1242

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>

* chore: VexFlowPatch readme: add renderer.js patch info

* feat(Options): Add EngravingRules.TempoYSpacing (#1243) to be able to set spacing/padding for tempo (e.g. beginning "Allegro")

* chore: bump version to 1.5.7

* chore: update changelog for 1.5.7

* chore: set osmd.Version to 1.5.7-dev

* fix(Margins): Fix page bounding box too long. Respect EngravingRules.PageLeftMargin PageRightMargin for renderSingleHorizontalStaffline (#643)

merge PR #1244

Disable unused StafflineActivitySymbols being added to the MusicSystem's bounding box,
preventing PageRightMargin 0 from being effective. (bounding box was unnecessarily long to the right)

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>

* fix(BoundingBox): Fix bounding box of voice entries of whole notes with many ledger lines too large (#1245)

* fix(BoundingBox): Fix bounding box of MusicSystem and of SystemLeftLine too large (#1245)

SystemLeftLine bbox was too large, because it took BorderTop 0 (when the System BorderTop may be -1.3, thus "higher"),
and took the System's size (height) as BorderBottom, which is inaccurate either way.

Actually the bounding box is probably still too large, as the system left line shouldn't always be as large as the system,
but at least it's not larger now.

* fix bottom pixel cut off with Canvas backend and PageBottomMargin = 0

seems like a bug with canvas or the canvas backend in Vexflow or something. Doesn't happen with SVG

* canvas: always add 0.1 to height. Prevents PageBottomMargin 0.1 having no effect compared to 0

* fix(BoundingBox): Fix PageTopMargin also partly added to a bottom margin / container size in certain cases (#1245)

* vexflow@4.1.0-alpha.0

* fix(Brackets): Ignore brackets = '(  )' words/text by default (#1251) supposed to be around a note, but can't be matched to the note.

This is often manually positioned in the sheet music editor, but the placement information exported to MusicXML is insufficient.

* data: add sample test_ignore_brackets (#1251)

* chore: bump version to 1.5.8

* chore: update changelog for 1.5.8

* chore: set osmd.Version to 1.5.8-dev

* fix(Wedges): Ignore duplicate wedges given in MusicXML (e.g. crescendo) (#1259, PR #1260)

* fix wedge duplicates (e.g. crescendo) (1259)

* fix non-duplicate wedges ignored (in last commit)

* fix undefined error in Haydn

* fix wedge timestamp compared incorrectly, not preventing duplicates

* check wedge type for duplicate checks (don't de-duplicate cresc+dim in test_wedges_layered)

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>

* data: add test_wedge_diminuendo_duplicated (#1259)

* fix(Brackets text): Ignore [ ] square brackets too with EngravingRules.IgnoreBracketsWords (#1251)

* fix(Marcato): Always place above staff (#1261), in line with Gould - Behind Bars

* fix(Ties): Use downward arc for ties in secondary voices (#1262)

* fix(Ties): Set downward tie direction for downward ties split over two systems in vexflow (#1262)

* chore: bump version to 1.6.0

* chore: update changelog for 1.6.0

* set osmd.Version to 1.6.0-dev

* fix(Cursor): cursor.next(): Skip positions that only contain invisible notes (#1264)

thanks to TommyAngelo for finding the issue!

* cursor: remember SkipInvisibleNotes setting on reset() (#1264)

* fix(Repetitions): Fix D.C. Al Coda read as DalSegnoAlCoda (#920)

* fix(Repetitions): Fix repetition symbols like D.C. or Coda too far left (#920, PR #1265). Add EngravingRules.RepetitionEndInstructionXShiftAsPercentOfStaveWidth

* fix repetition symbol / text x position (untested)

* prevent collisions with to coda, ds al coda etc in test_staverepetitions_coda

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>

* fix(Error): Fix error when dynamics node has no elements, leading to an empty measure (#1269)

* feat(Cursor): Add cursor.previous(), moving back to previous note, counterpart to next() (#1266)

* added move to previous note

can now use cursor.previous() to move cursor to the previous note

* code review fixes

- changed private methods to use uppercase getter
- fixed linting
- added left arrow key listener to demo

PR #1266 reviewed by @sschmidTU, implementation by @joshstovall (thanks a lot!)

* fix(Slur): Fix double slur with different placement ignored as "duplicate" (#1275)

* chore: bump version to 1.6.1

* chore: update changelog for 1.6.1

* demo: previous cursor button: add null check (just in case)

* chore: set osmd.Version to 1.6.1-dev

* feat(Cursor): Add getter and setter for CursorOptions (#1276)

* fix(Fermata): Fix inverted fermata placement/overlap with multiple voices (#1278, PR #1279)

* fix(Tempo): Increase TempoYSpacing from 0 to 0.5 (prevents (near-)overlaps, no apparent downside) (#1243)

* fix(OctaveShift): Fix rare error when startX greater stopX (#1281, PR #1282)

* fix octaveshift error when startx > stopx

* comment

* feat(Articulation): Add breath mark support (#527, PR #1285). Add EngravingRules.BreathMarkDistance (default 0.8 = 80%)

* breath mark support

* add sample test_breath_mark

new EngravingRule BreathMarkDistance: Percent distance of breath marks to next note or end of staff, e.g. 0.8 = 80%.

* fix(Overlap): Fix overlap with implicit / pickup measure after repeat with single note pickup (#1286, #1236)

* fix(Overlap): Fix overlap with implicit / pickup measure without repeat with single note pickup (#1286, #1236)

* refactor: rename PickupMeasureSpacingRepetitionSingleNoteAddend to PickupMeasureSpacingSingleNoteAddend (#1286, #1236)

* feat(Pedal): Support pedal. Show (piano) pedal signs and brackets (#347). Add EngravingRule RenderPedals

code mostly by @fredmeister77

merged from the sponsor early access repository (audio player)

pedals can be turned off with osmd.EngravingRules.RenderPedals = false

* data: add pedal test samples

* chore: bump version to 1.7.0-release

* chore: update changelog for 1.7.0

* chore: update osmd.Version to 1.7.0-dev

* fix(Lyrics): Fix non-numeric lyric number handling, unnecessary space for unused lyric lines (PR #1284, #1271, #1272)

fix #1271, #1272

PR by @ErdoesiT - thanks a lot!

* chore: fix import ambiguity (referring parent folder instead of class) (#1284)

fix/amendment/addition to PR #1284

* data: add test sample for lyrics number as string (PR #1284, #1271)

* data: add test sample for lyrics unused space (PR #1284, #1272)

* fix(Build): Make Array prototype changes writeable to prevent conflicts with other libraries (#980, #1288, PR #1289)

fix by @momolarson - thanks!

* writable to prototypes

* Update CollectionUtil.ts

* space fix

* formatting fix

* Update CollectionUtil.ts

* vexflow@4.2.0-beta.0

* merge fixed

Co-authored-by: sschmidTU <s.schmid@phonicscore.com>
Co-authored-by: Simon <33069673+sschmidTU@users.noreply.github.com>
Co-authored-by: Josh Stovall <40344766+joshstovall@users.noreply.github.com>
Co-authored-by: Thomas Erdösi <github@erdoesi.de>
Co-authored-by: Gregg Larson <43911543+momolarson@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Browser crashes while rendering
1 participant