From 7da5242064a8f687ea55ce4e670f9ef6aba5c12d Mon Sep 17 00:00:00 2001 From: Daniel Kuschny Date: Sun, 29 Nov 2020 15:22:11 +0100 Subject: [PATCH] Release 1.1 (#444) --- package-lock.json | 616 ++++---- package.json | 36 +- playground-template/control-template.html | 3 + playground-template/control.js | 11 + rollup.config.js | 10 + scripts/setup-playground.js | 2 +- src.compiler/JsonSerializationBuilder.ts | 4 +- src.compiler/csharp/CSharpAstTransformer.ts | 36 + .../AlphaTab.Windows/NAudioSynthOutput.cs | 40 +- src.csharp/AlphaTab/Core/Globals.cs | 1 + src.csharp/AlphaTab/Core/TypeHelper.cs | 6 + .../CSharp/AlphaSynthWorkerApiBase.cs | 20 +- .../AlphaTab/Platform/CSharp/GdiCanvas.cs | 3 +- .../Platform/CSharp/ManagedUiFacade.cs | 8 +- src.csharp/Directory.Build.props | 4 +- .../AlphaTab.Samples.Player/Program.cs | 2 +- .../Samples/AlphaTab.Samples.Wpf/App.xaml | 12 +- .../AlphaTab.Samples.Wpf/MainWindow.xaml | 177 ++- src/AlphaTabApiBase.ts | 98 +- src/DisplaySettings.ts | 2 +- src/Environment.ts | 16 +- src/alphatab.ts | 4 + src/importer/CapellaImporter.ts | 60 + src/importer/CapellaParser.ts | 1374 +++++++++++++++++ src/importer/Gp3To5Importer.ts | 42 +- src/importer/GpifParser.ts | 291 +++- src/midi/AlphaSynthMidiFileHandler.ts | 21 + src/midi/IMidiFileHandler.ts | 12 + src/midi/Midi20ChannelVoiceEvent.ts | 37 + src/midi/MidiEvent.ts | 6 + src/midi/MidiFileGenerator.ts | 178 ++- src/model/AccidentalType.ts | 10 +- src/model/Beat.ts | 25 +- src/model/InstrumentArticulation.ts | 74 + src/model/JsonConverter.ts | 23 + src/model/MasterBar.ts | 8 +- src/model/MusicFontSymbol.ts | 135 ++ src/model/Note.ts | 152 +- src/model/NoteAccidentalMode.ts | 14 +- src/model/PercussionMapper.ts | 211 +++ src/model/Staff.ts | 7 + src/model/Track.ts | 9 +- src/model/Voice.ts | 11 +- src/platform/ICanvas.ts | 2 +- src/platform/IUiFacade.ts | 3 +- .../javascript/AlphaSynthWebAudioOutput.ts | 41 +- .../javascript/AlphaSynthWebWorker.ts | 42 +- .../javascript/AlphaSynthWebWorkerApi.ts | 56 +- .../javascript/AlphaSynthWorkerSynthOutput.ts | 13 - src/platform/javascript/AlphaTabApi.ts | 4 +- src/platform/javascript/BrowserUiFacade.ts | 12 +- src/platform/javascript/Html5Canvas.ts | 20 +- src/platform/javascript/JQueryAlphaTab.ts | 15 +- src/platform/svg/CssFontSvgCanvas.ts | 4 +- src/platform/svg/SvgCanvas.ts | 2 +- src/rendering/BarRendererBase.ts | 88 +- src/rendering/EffectBand.ts | 2 +- src/rendering/EffectBarRenderer.ts | 7 +- src/rendering/ScoreBarRenderer.ts | 291 ++-- src/rendering/TabBarRenderer.ts | 44 +- .../effects/AlternateEndingsEffectInfo.ts | 2 +- src/rendering/effects/FermataEffectInfo.ts | 2 +- src/rendering/glyphs/AccentuationGlyph.ts | 12 +- src/rendering/glyphs/AccidentalGlyph.ts | 19 +- src/rendering/glyphs/AccidentalGroupGlyph.ts | 45 +- .../glyphs/ArticStaccatoAboveGlyph.ts | 19 + src/rendering/glyphs/BeatContainerGlyph.ts | 80 +- .../glyphs/BendNoteHeadGroupGlyph.ts | 4 +- src/rendering/glyphs/ChineseCymbalGlyph.ts | 17 - src/rendering/glyphs/ChordDiagramGlyph.ts | 2 +- src/rendering/glyphs/ClefGlyph.ts | 20 +- src/rendering/glyphs/DeadNoteHeadGlyph.ts | 4 +- src/rendering/glyphs/DiamondNoteHeadGlyph.ts | 6 +- src/rendering/glyphs/DigitGlyph.ts | 23 +- src/rendering/glyphs/DrumSticksGlyph.ts | 17 - src/rendering/glyphs/DynamicsGlyph.ts | 6 +- src/rendering/glyphs/FermataGlyph.ts | 8 +- .../glyphs/{BeamGlyph.ts => FlagGlyph.ts} | 36 +- .../glyphs/GhostNoteContainerGlyph.ts | 2 +- src/rendering/glyphs/GhostParenthesisGlyph.ts | 1 - src/rendering/glyphs/Glyph.ts | 6 +- src/rendering/glyphs/GuitarGolpeGlyph.ts | 19 + src/rendering/glyphs/HiHatGlyph.ts | 17 - src/rendering/glyphs/MusicFontGlyph.ts | 2 +- src/rendering/glyphs/MusicFontSymbol.ts | 120 -- src/rendering/glyphs/NoteHeadGlyph.ts | 18 +- src/rendering/glyphs/NoteVibratoGlyph.ts | 13 +- src/rendering/glyphs/NumberGlyph.ts | 2 + src/rendering/glyphs/OttavaGlyph.ts | 10 +- .../glyphs/PercussionNoteHeadGlyph.ts | 49 + src/rendering/glyphs/PickStrokeGlyph.ts | 9 +- src/rendering/glyphs/PictEdgeOfCymbalGlyph.ts | 18 + src/rendering/glyphs/RideCymbalGlyph.ts | 17 - src/rendering/glyphs/ScoreBeatGlyph.ts | 187 +-- .../glyphs/ScoreBeatPreNotesGlyph.ts | 11 +- src/rendering/glyphs/ScoreBendGlyph.ts | 12 +- src/rendering/glyphs/ScoreBrushGlyph.ts | 26 +- .../glyphs/ScoreHelperNotesBaseGlyph.ts | 2 +- src/rendering/glyphs/ScoreNoteChordGlyph.ts | 54 +- .../glyphs/ScoreNoteChordGlyphBase.ts | 9 +- src/rendering/glyphs/ScoreRestGlyph.ts | 4 +- src/rendering/glyphs/ScoreSlideLineGlyph.ts | 13 +- .../glyphs/ScoreTimeSignatureGlyph.ts | 18 - src/rendering/glyphs/ScoreWhammyBarGlyph.ts | 9 +- src/rendering/glyphs/TabBendGlyph.ts | 8 +- src/rendering/glyphs/TabBrushGlyph.ts | 20 +- src/rendering/glyphs/TabClefGlyph.ts | 4 +- src/rendering/glyphs/TabSlideLineGlyph.ts | 13 +- src/rendering/glyphs/TabTimeSignatureGlyph.ts | 17 - src/rendering/glyphs/TempoGlyph.ts | 4 +- src/rendering/glyphs/TextGlyph.ts | 2 + src/rendering/glyphs/TieGlyph.ts | 3 +- src/rendering/glyphs/TimeSignatureGlyph.ts | 18 +- src/rendering/glyphs/TremoloPickingGlyph.ts | 8 +- src/rendering/glyphs/TrillGlyph.ts | 4 +- src/rendering/glyphs/TripletFeelGlyph.ts | 10 +- src/rendering/glyphs/VoiceContainerGlyph.ts | 11 +- src/rendering/layout/PageViewLayout.ts | 6 +- src/rendering/staves/BarLayoutingInfo.ts | 86 +- src/rendering/utils/AccidentalHelper.ts | 301 +++- src/rendering/utils/BarHelpers.ts | 88 +- src/rendering/utils/BeamingHelper.ts | 281 ++-- src/rendering/utils/BeatLinePositions.ts | 7 - src/rendering/utils/IBeamYCalculator.ts | 3 - src/rendering/utils/PercussionMapper.ts | 67 - src/synth/AlphaSynth.ts | 151 +- src/synth/IAlphaSynth.ts | 19 +- src/synth/ISynthOutput.ts | 11 - src/synth/MidiFileSequencer.ts | 286 ++-- src/synth/SynthConstants.ts | 10 +- src/synth/synthesis/Channel.ts | 1 + src/synth/synthesis/Channels.ts | 6 +- src/synth/synthesis/Preset.ts | 1 + src/synth/synthesis/TinySoundFont.ts | 249 +-- src/synth/synthesis/Voice.ts | 51 +- test-data/guitarpro7/beat-lyrics.gp | Bin 0 -> 9000 bytes .../effects-and-annotations/bends.gp | Bin .../effects-and-annotations/bends.png | Bin 0 -> 73777 bytes .../effects-and-annotations/brush.gp5 | Bin .../effects-and-annotations/brush.png | Bin 0 -> 29735 bytes .../effects-and-annotations/chords.gp5 | Bin .../effects-and-annotations/chords.png | Bin 0 -> 52789 bytes .../effects-and-annotations/dynamics.gp5 | Bin .../effects-and-annotations/dynamics.png | Bin 0 -> 28077 bytes .../effects-and-annotations/fade-in.gp5 | Bin .../effects-and-annotations/fade-in.png | Bin 0 -> 27436 bytes .../effects-and-annotations/fingering.gpx | Bin .../effects-and-annotations/fingering.png | Bin 0 -> 105905 bytes .../effects-and-annotations/let-ring.gp5 | Bin .../effects-and-annotations/let-ring.png | Bin 0 -> 32714 bytes .../effects-and-annotations/markers.gp5 | Bin .../effects-and-annotations/markers.png | Bin 0 -> 24758 bytes .../effects-and-annotations/palm-mute.gp5 | Bin .../effects-and-annotations/palm-mute.png | Bin 0 -> 33457 bytes .../effects-and-annotations/pick-stroke.gp5 | Bin .../effects-and-annotations/pick-stroke.png | Bin 0 -> 31678 bytes .../rhythm-with-beams.png | Bin 0 -> 37334 bytes .../effects-and-annotations/rhythm.png | Bin 0 -> 35510 bytes .../effects-and-annotations/slides.gp5 | Bin .../effects-and-annotations/slides.png | Bin 0 -> 31107 bytes .../effects-and-annotations/tap.gp5 | Bin .../effects-and-annotations/tap.png | Bin 0 -> 25732 bytes .../effects-and-annotations/tempo.gp5 | Bin .../effects-and-annotations/tempo.png | Bin 0 -> 22789 bytes .../effects-and-annotations/text.gp5 | Bin .../effects-and-annotations/text.png | Bin 0 -> 28414 bytes .../effects-and-annotations/tremolo-bar.gp | Bin .../effects-and-annotations/tremolo-bar.png | Bin 0 -> 67570 bytes .../tremolo-picking.gp5 | Bin .../tremolo-picking.png | Bin 0 -> 35068 bytes .../effects-and-annotations/trill.gp5 | Bin .../effects-and-annotations/trill.png | Bin 0 -> 28207 bytes .../effects-and-annotations/triplet-feel.gpx | Bin .../effects-and-annotations/triplet-feel.png | Bin 0 -> 62982 bytes .../effects-and-annotations/tuning.png | Bin 0 -> 25503 bytes .../tuplets-advanced.gp | Bin .../tuplets-advanced.png | Bin 0 -> 177571 bytes .../effects-and-annotations/tuplets.gp5 | Bin .../effects-and-annotations/tuplets.png | Bin 0 -> 40494 bytes .../effects-and-annotations/vibrato.gp5 | Bin .../effects-and-annotations/vibrato.png | Bin 0 -> 35143 bytes .../effects-and-annotations/bends.png | Bin 67880 -> 0 bytes .../effects-and-annotations/brush.png | Bin 27696 -> 0 bytes .../effects-and-annotations/chords.png | Bin 56304 -> 0 bytes .../effects-and-annotations/dynamics.png | Bin 26579 -> 0 bytes .../effects-and-annotations/fade-in.png | Bin 25537 -> 0 bytes .../effects-and-annotations/fingering.png | Bin 79977 -> 0 bytes .../effects-and-annotations/let-ring.png | Bin 29536 -> 0 bytes .../effects-and-annotations/markers.png | Bin 24499 -> 0 bytes .../effects-and-annotations/palm-mute.png | Bin 26929 -> 0 bytes .../effects-and-annotations/pick-stroke.png | Bin 27340 -> 0 bytes .../effects-and-annotations/slides.png | Bin 29144 -> 0 bytes .../features/effects-and-annotations/tap.png | Bin 24792 -> 0 bytes .../effects-and-annotations/tempo.png | Bin 22286 -> 0 bytes .../features/effects-and-annotations/text.png | Bin 26823 -> 0 bytes .../effects-and-annotations/tremolo-bar.png | Bin 56438 -> 0 bytes .../tremolo-picking.png | Bin 30976 -> 0 bytes .../effects-and-annotations/trill.png | Bin 25170 -> 0 bytes .../effects-and-annotations/triplet-feel.png | Bin 49660 -> 0 bytes .../tuplets-advanced.png | Bin 145611 -> 0 bytes .../effects-and-annotations/tuplets.png | Bin 33759 -> 0 bytes .../effects-and-annotations/vibrato.png | Bin 31278 -> 0 bytes .../features/general/alternate-endings.png | Bin 19076 -> 0 bytes .../general/notation-legend-default.png | Bin 666311 -> 0 bytes .../general/notation-legend-songbook.png | Bin 643149 -> 0 bytes .../visual-tests/features/general/repeats.png | Bin 17829 -> 0 bytes .../features/general/song-details.png | Bin 29365 -> 0 bytes .../visual-tests/features/general/tuning.png | Bin 24812 -> 0 bytes .../guitar-tabs/rhythm-with-beams.png | Bin 36101 -> 0 bytes .../features/guitar-tabs/rhythm.png | Bin 34525 -> 0 bytes .../guitar-tabs/string-variations.png | Bin 46215 -> 0 bytes .../layout/horizontal-layout-5to8.png | Bin 17984 -> 0 bytes .../features/layout/horizontal-layout.png | Bin 40451 -> 0 bytes .../features/layout/multi-track.png | Bin 114806 -> 0 bytes .../features/layout/multi-voice.png | Bin 87745 -> 0 bytes .../layout/page-layout-5barsperrow.png | Bin 75817 -> 0 bytes .../features/layout/page-layout-5to8.png | Bin 37766 -> 0 bytes .../features/layout/page-layout.png | Bin 64598 -> 0 bytes .../features/music-notation/accidentals.png | Bin 26800 -> 0 bytes .../features/music-notation/clefs.png | Bin 19335 -> 0 bytes .../music-notation/key-signatures.gp5 | Bin 1487 -> 0 bytes .../music-notation/key-signatures.png | Bin 19806 -> 0 bytes .../music-notation/notes-rests-beams.png | Bin 56102 -> 0 bytes .../music-notation/time-signatures.png | Bin 18814 -> 0 bytes .../notation-elements/chord-diagrams-off.png | Bin 23476 -> 0 bytes .../notation-elements/chord-diagrams-on.png | Bin 27655 -> 0 bytes .../notation-elements/effects-off.png | Bin 20906 -> 0 bytes .../features/notation-elements/effects-on.png | Bin 24488 -> 0 bytes .../notation-elements/guitar-tuning-off.png | Bin 19569 -> 0 bytes .../notation-elements/guitar-tuning-on.png | Bin 23513 -> 0 bytes .../parenthesis-on-tied-bends-off.png | Bin 23495 -> 0 bytes .../parenthesis-on-tied-bends-on.png | Bin 23683 -> 0 bytes .../notation-elements/score-info-album.png | Bin 23186 -> 0 bytes .../notation-elements/score-info-all.png | Bin 30324 -> 0 bytes .../notation-elements/score-info-artist.png | Bin 23077 -> 0 bytes .../score-info-copyright.png | Bin 21709 -> 0 bytes .../notation-elements/score-info-music.png | Bin 23236 -> 0 bytes .../notation-elements/score-info-subtitle.png | Bin 23410 -> 0 bytes .../notation-elements/score-info-title.png | Bin 23645 -> 0 bytes .../score-info-words-and-music.png | Bin 23823 -> 0 bytes .../notation-elements/score-info-words.png | Bin 22959 -> 0 bytes .../tab-notes-on-tied-bends-off.png | Bin 25134 -> 0 bytes .../tab-notes-on-tied-bends-on.png | Bin 25437 -> 0 bytes .../notation-elements/track-names-off.png | Bin 21649 -> 0 bytes .../notation-elements/track-names-on (1).png | Bin 23355 -> 0 bytes .../notation-elements/track-names-on.png | Bin 23355 -> 0 bytes .../zeros-on-dive-whammys-off.png | Bin 22896 -> 0 bytes .../zeros-on-dive-whammys-on.png | Bin 23836 -> 0 bytes .../features/special-notes/dead-notes.png | Bin 30800 -> 0 bytes .../features/special-notes/ghost-notes.png | Bin 27271 -> 0 bytes .../special-notes/grace-notes-advanced.png | Bin 38081 -> 0 bytes .../features/special-notes/grace-notes.png | Bin 25768 -> 0 bytes .../features/special-notes/tied-notes.png | Bin 27890 -> 0 bytes .../features/special-tracks/drum-tabs.gp5 | Bin 3433 -> 0 bytes .../features/special-tracks/drum-tabs.png | Bin 64470 -> 0 bytes .../features/special-tracks/grand-staff.png | Bin 68491 -> 0 bytes .../general/alternate-endings.gp5 | Bin .../general/alternate-endings.png | Bin 0 -> 19650 bytes .../{features => }/general/repeats.gp5 | Bin test-data/visual-tests/general/repeats.png | Bin 0 -> 18255 bytes .../{features => }/general/song-details.gp5 | Bin .../visual-tests/general/song-details.png | Bin 0 -> 29947 bytes .../{features => }/general/tuning.gp5 | Bin test-data/visual-tests/general/tuning.png | Bin 0 -> 25458 bytes .../guitar-tabs/rhythm-with-beams.gp5 | Bin .../guitar-tabs/rhythm-with-beams.png | Bin 0 -> 41959 bytes .../{features => }/guitar-tabs/rhythm.gp5 | Bin test-data/visual-tests/guitar-tabs/rhythm.png | Bin 0 -> 37689 bytes .../guitar-tabs/string-variations.gp5 | Bin .../guitar-tabs/string-variations.png | Bin 0 -> 56354 bytes .../layout/grace-notes-advanced.png | Bin .../layout/horizontal-layout-5to8.gp5 | Bin .../layout/horizontal-layout-5to8.png | Bin 0 -> 20416 bytes .../layout/horizontal-layout.gp5 | Bin .../visual-tests/layout/horizontal-layout.png | Bin 0 -> 45816 bytes .../{features => }/layout/multi-track.gp5 | Bin test-data/visual-tests/layout/multi-track.png | Bin 0 -> 135572 bytes .../{features => }/layout/multi-voice.gp5 | Bin test-data/visual-tests/layout/multi-voice.png | Bin 0 -> 125904 bytes .../layout/page-layout-5barsperrow.gp5 | Bin .../layout/page-layout-5barsperrow.png | Bin 0 -> 85732 bytes .../layout/page-layout-5to8.gp5 | Bin .../visual-tests/layout/page-layout-5to8.png | Bin 0 -> 41209 bytes .../{features => }/layout/page-layout.gp5 | Bin test-data/visual-tests/layout/page-layout.png | Bin 0 -> 71121 bytes .../{features => }/layout/tied-notes.png | Bin .../music-notation/accidentals.gp5 | Bin .../music-notation/accidentals.png | Bin 0 -> 28818 bytes .../{features => }/music-notation/clefs.gpx | Bin .../visual-tests/music-notation/clefs.png | Bin 0 -> 19812 bytes .../music-notation/forced-accidentals.gp | Bin 0 -> 9872 bytes .../music-notation/forced-accidentals.png | Bin 0 -> 39092 bytes .../music-notation/key-signatures.gp | Bin 0 -> 16335 bytes .../music-notation/key-signatures.png | Bin 0 -> 296691 bytes .../music-notation/notes-rests-beams.gp5 | Bin .../music-notation/notes-rests-beams.png | Bin 0 -> 70962 bytes .../music-notation/time-signatures.gp5 | Bin .../music-notation/time-signatures.png | Bin 0 -> 19374 bytes .../notation-elements/chord-diagrams-off.png | Bin 0 -> 22755 bytes .../notation-elements/chord-diagrams-on.png | Bin 0 -> 26877 bytes .../notation-elements/effects-off.png | Bin 0 -> 22481 bytes .../notation-elements/effects-on.png | Bin 0 -> 26044 bytes .../notation-elements/guitar-tuning-off.png | Bin 0 -> 21146 bytes .../notation-elements/guitar-tuning-on.png | Bin 0 -> 25039 bytes .../parenthesis-on-tied-bends-off.png | Bin 0 -> 24448 bytes .../parenthesis-on-tied-bends-on.png | Bin 0 -> 24630 bytes .../notation-elements/score-info-album.png | Bin 0 -> 24919 bytes .../notation-elements/score-info-all.png | Bin 0 -> 32094 bytes .../notation-elements/score-info-artist.png | Bin 0 -> 24809 bytes .../score-info-copyright.png | Bin 0 -> 23491 bytes .../notation-elements/score-info-music.png | Bin 0 -> 25000 bytes .../notation-elements/score-info-subtitle.png | Bin 0 -> 25141 bytes .../notation-elements/score-info-title.png | Bin 0 -> 25422 bytes .../score-info-words-and-music.png | Bin 0 -> 25563 bytes .../notation-elements/score-info-words.png | Bin 0 -> 24712 bytes .../tab-notes-on-tied-bends-off.png | Bin 0 -> 26073 bytes .../tab-notes-on-tied-bends-on.png | Bin 0 -> 26359 bytes .../notation-elements/track-names-off.png | Bin 0 -> 23437 bytes .../notation-elements/track-names-on.png | Bin 0 -> 25115 bytes .../zeros-on-dive-whammys-off.png | Bin 0 -> 23625 bytes .../zeros-on-dive-whammys-on.png | Bin 0 -> 24449 bytes .../notation-legend/accentuations-default.png | Bin 0 -> 20046 bytes .../accentuations-songbook.png | Bin 0 -> 10619 bytes .../notation-legend/arpeggio-default.png | Bin 0 -> 14027 bytes .../notation-legend/arpeggio-songbook.png | Bin 0 -> 14027 bytes .../notation-legend/bends-default.png | Bin 0 -> 142405 bytes .../notation-legend/bends-songbook.png | Bin 0 -> 146041 bytes .../notation-legend/chords-default.png | Bin 0 -> 21552 bytes .../notation-legend/chords-songbook.png | Bin 0 -> 21552 bytes .../notation-legend/crescendo-default.png | Bin 0 -> 10936 bytes .../notation-legend/crescendo-songbook.png | Bin 0 -> 10936 bytes .../notation-legend/dead-default.png | Bin 0 -> 13184 bytes .../notation-legend/dead-songbook.png | Bin 0 -> 13184 bytes .../notation-legend/dynamics-default.png | Bin 0 -> 13253 bytes .../notation-legend/dynamics-songbook.png | Bin 0 -> 13253 bytes .../notation-legend/fingering-default.png | Bin 0 -> 23090 bytes .../notation-legend/fingering-songbook.png | Bin 0 -> 22961 bytes .../notation-legend/full-default.png | Bin 0 -> 717234 bytes .../notation-legend/full-songbook.png | Bin 0 -> 724416 bytes .../notation-legend/grace-default.png | Bin 0 -> 10605 bytes .../notation-legend/grace-songbook.png | Bin 0 -> 10288 bytes .../notation-legend/hammer-default.png | Bin 0 -> 27632 bytes .../notation-legend/hammer-songbook.png | Bin 0 -> 27632 bytes .../notation-legend/harmonics-default.png | Bin 0 -> 29327 bytes .../notation-legend/harmonics-songbook.png | Bin 0 -> 29327 bytes .../notation-legend/let-ring-default.png | Bin 0 -> 69240 bytes .../notation-legend/let-ring-songbook.png | Bin 0 -> 53283 bytes .../notation-legend/mixed-default.png | Bin 0 -> 75567 bytes .../notation-legend/mixed-songbook.png | Bin 0 -> 73403 bytes .../notation-legend/multi-grace-default.png | Bin 0 -> 17439 bytes .../notation-legend/multi-grace-songbook.png | Bin 0 -> 17456 bytes .../notation-legend/multi-voice-default.png | Bin 0 -> 16657 bytes .../notation-legend/multi-voice-songbook.png | Bin 0 -> 16657 bytes .../notation-legend.gp | Bin .../notation-legend/ottavia-default.png | Bin 0 -> 15968 bytes .../notation-legend/ottavia-songbook.png | Bin 0 -> 15968 bytes .../notation-legend/pick-stroke-default.png | Bin 0 -> 12775 bytes .../notation-legend/pick-stroke-songbook.png | Bin 0 -> 12775 bytes .../notation-legend/slash-default.png | Bin 0 -> 12654 bytes .../notation-legend/slash-songbook.png | Bin 0 -> 12654 bytes .../notation-legend/slides-default.png | Bin 0 -> 16400 bytes .../notation-legend/slides-songbook.png | Bin 0 -> 16400 bytes .../notation-legend/staccatissimo-default.png | Bin 0 -> 10485 bytes .../staccatissimo-songbook.png | Bin 0 -> 10485 bytes .../notation-legend/sweep-default.png | Bin 0 -> 20254 bytes .../notation-legend/sweep-songbook.png | Bin 0 -> 13253 bytes .../notation-legend/tap-riff-default.png | Bin 0 -> 16752 bytes .../notation-legend/tap-riff-songbook.png | Bin 0 -> 16752 bytes .../notation-legend/tempo-change-default.png | Bin 0 -> 27744 bytes .../notation-legend/tempo-change-songbook.png | Bin 0 -> 27696 bytes .../notation-legend/text-default.png | Bin 0 -> 11212 bytes .../notation-legend/text-songbook.png | Bin 0 -> 11212 bytes .../notation-legend/trill-default.png | Bin 0 -> 13192 bytes .../notation-legend/trill-songbook.png | Bin 0 -> 13192 bytes .../notation-legend/triplet-feel-default.png | Bin 0 -> 20623 bytes .../notation-legend/triplet-feel-songbook.png | Bin 0 -> 20623 bytes .../notation-legend/vibrato-default.png | Bin 0 -> 13565 bytes .../notation-legend/vibrato-songbook.png | Bin 0 -> 13565 bytes .../notation-legend/wah-default.png | Bin 0 -> 10473 bytes .../notation-legend/wah-songbook.png | Bin 0 -> 10473 bytes .../notation-legend/whammy-default.png | Bin 0 -> 98331 bytes .../notation-legend/whammy-songbook.png | Bin 0 -> 89597 bytes .../special-notes/dead-notes.gp5 | Bin .../visual-tests/special-notes/dead-notes.png | Bin 0 -> 33958 bytes .../special-notes/ghost-notes.gp5 | Bin .../special-notes/ghost-notes.png | Bin 0 -> 28979 bytes .../special-notes/grace-notes-advanced.gp | Bin .../special-notes/grace-notes-advanced.png | Bin 0 -> 42959 bytes .../special-notes/grace-notes.gp5 | Bin .../special-notes/grace-notes.png | Bin 0 -> 27893 bytes .../special-notes/tied-notes.gp5 | Bin .../visual-tests/special-notes/tied-notes.png | Bin 0 -> 31528 bytes .../visual-tests/special-tracks/drum-tabs.gp | Bin 0 -> 14837 bytes .../visual-tests/special-tracks/drum-tabs.png | Bin 0 -> 83244 bytes .../special-tracks/grand-staff.gpx | Bin .../special-tracks/grand-staff.png | Bin 0 -> 79548 bytes .../visual-tests/special-tracks/percussion.gp | Bin 0 -> 19671 bytes .../special-tracks/percussion.png | Bin 0 -> 27309 bytes test/audio/AlphaSynth.test.ts | 2 +- test/audio/FlatMidiEventGenerator.ts | 31 + test/audio/MidiFileGenerator.test.ts | 227 ++- test/audio/TestOutput.ts | 16 +- test/importer/Gp3Importer.test.ts | 11 +- test/importer/Gp7Importer.test.ts | 14 + test/importer/MusicXmlImporterTestHelper.ts | 3 +- test/visualTests/VisualTestHelper.ts | 150 +- .../features/EffectsAndAnnotations.test.ts | 42 +- test/visualTests/features/General.test.ts | 33 +- test/visualTests/features/GuitarTabs.test.ts | 6 +- test/visualTests/features/Layout.test.ts | 14 +- .../features/MusicNotation.test.ts | 16 +- .../features/NotationElements.test.ts | 34 +- .../features/NotationLegend.test.ts | 111 ++ .../visualTests/features/SpecialNotes.test.ts | 10 +- .../features/SpecialTracks.test.ts | 8 +- 415 files changed, 5669 insertions(+), 2232 deletions(-) create mode 100644 src/importer/CapellaImporter.ts create mode 100644 src/importer/CapellaParser.ts create mode 100644 src/midi/Midi20ChannelVoiceEvent.ts create mode 100644 src/model/InstrumentArticulation.ts create mode 100644 src/model/MusicFontSymbol.ts create mode 100644 src/model/PercussionMapper.ts create mode 100644 src/rendering/glyphs/ArticStaccatoAboveGlyph.ts delete mode 100644 src/rendering/glyphs/ChineseCymbalGlyph.ts delete mode 100644 src/rendering/glyphs/DrumSticksGlyph.ts rename src/rendering/glyphs/{BeamGlyph.ts => FlagGlyph.ts} (55%) create mode 100644 src/rendering/glyphs/GuitarGolpeGlyph.ts delete mode 100644 src/rendering/glyphs/HiHatGlyph.ts delete mode 100644 src/rendering/glyphs/MusicFontSymbol.ts create mode 100644 src/rendering/glyphs/PercussionNoteHeadGlyph.ts create mode 100644 src/rendering/glyphs/PictEdgeOfCymbalGlyph.ts delete mode 100644 src/rendering/glyphs/RideCymbalGlyph.ts delete mode 100644 src/rendering/utils/BeatLinePositions.ts delete mode 100644 src/rendering/utils/IBeamYCalculator.ts delete mode 100644 src/rendering/utils/PercussionMapper.ts create mode 100644 test-data/guitarpro7/beat-lyrics.gp rename test-data/visual-tests/{features => }/effects-and-annotations/bends.gp (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/bends.png rename test-data/visual-tests/{features => }/effects-and-annotations/brush.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/brush.png rename test-data/visual-tests/{features => }/effects-and-annotations/chords.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/chords.png rename test-data/visual-tests/{features => }/effects-and-annotations/dynamics.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/dynamics.png rename test-data/visual-tests/{features => }/effects-and-annotations/fade-in.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/fade-in.png rename test-data/visual-tests/{features => }/effects-and-annotations/fingering.gpx (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/fingering.png rename test-data/visual-tests/{features => }/effects-and-annotations/let-ring.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/let-ring.png rename test-data/visual-tests/{features => }/effects-and-annotations/markers.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/markers.png rename test-data/visual-tests/{features => }/effects-and-annotations/palm-mute.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/palm-mute.png rename test-data/visual-tests/{features => }/effects-and-annotations/pick-stroke.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/pick-stroke.png create mode 100644 test-data/visual-tests/effects-and-annotations/rhythm-with-beams.png create mode 100644 test-data/visual-tests/effects-and-annotations/rhythm.png rename test-data/visual-tests/{features => }/effects-and-annotations/slides.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/slides.png rename test-data/visual-tests/{features => }/effects-and-annotations/tap.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/tap.png rename test-data/visual-tests/{features => }/effects-and-annotations/tempo.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/tempo.png rename test-data/visual-tests/{features => }/effects-and-annotations/text.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/text.png rename test-data/visual-tests/{features => }/effects-and-annotations/tremolo-bar.gp (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/tremolo-bar.png rename test-data/visual-tests/{features => }/effects-and-annotations/tremolo-picking.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/tremolo-picking.png rename test-data/visual-tests/{features => }/effects-and-annotations/trill.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/trill.png rename test-data/visual-tests/{features => }/effects-and-annotations/triplet-feel.gpx (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/triplet-feel.png create mode 100644 test-data/visual-tests/effects-and-annotations/tuning.png rename test-data/visual-tests/{features => }/effects-and-annotations/tuplets-advanced.gp (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/tuplets-advanced.png rename test-data/visual-tests/{features => }/effects-and-annotations/tuplets.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/tuplets.png rename test-data/visual-tests/{features => }/effects-and-annotations/vibrato.gp5 (100%) create mode 100644 test-data/visual-tests/effects-and-annotations/vibrato.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/bends.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/brush.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/chords.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/dynamics.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/fade-in.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/fingering.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/let-ring.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/markers.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/palm-mute.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/pick-stroke.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/slides.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/tap.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/tempo.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/text.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/tremolo-bar.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/tremolo-picking.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/trill.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/triplet-feel.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/tuplets-advanced.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/tuplets.png delete mode 100644 test-data/visual-tests/features/effects-and-annotations/vibrato.png delete mode 100644 test-data/visual-tests/features/general/alternate-endings.png delete mode 100644 test-data/visual-tests/features/general/notation-legend-default.png delete mode 100644 test-data/visual-tests/features/general/notation-legend-songbook.png delete mode 100644 test-data/visual-tests/features/general/repeats.png delete mode 100644 test-data/visual-tests/features/general/song-details.png delete mode 100644 test-data/visual-tests/features/general/tuning.png delete mode 100644 test-data/visual-tests/features/guitar-tabs/rhythm-with-beams.png delete mode 100644 test-data/visual-tests/features/guitar-tabs/rhythm.png delete mode 100644 test-data/visual-tests/features/guitar-tabs/string-variations.png delete mode 100644 test-data/visual-tests/features/layout/horizontal-layout-5to8.png delete mode 100644 test-data/visual-tests/features/layout/horizontal-layout.png delete mode 100644 test-data/visual-tests/features/layout/multi-track.png delete mode 100644 test-data/visual-tests/features/layout/multi-voice.png delete mode 100644 test-data/visual-tests/features/layout/page-layout-5barsperrow.png delete mode 100644 test-data/visual-tests/features/layout/page-layout-5to8.png delete mode 100644 test-data/visual-tests/features/layout/page-layout.png delete mode 100644 test-data/visual-tests/features/music-notation/accidentals.png delete mode 100644 test-data/visual-tests/features/music-notation/clefs.png delete mode 100644 test-data/visual-tests/features/music-notation/key-signatures.gp5 delete mode 100644 test-data/visual-tests/features/music-notation/key-signatures.png delete mode 100644 test-data/visual-tests/features/music-notation/notes-rests-beams.png delete mode 100644 test-data/visual-tests/features/music-notation/time-signatures.png delete mode 100644 test-data/visual-tests/features/notation-elements/chord-diagrams-off.png delete mode 100644 test-data/visual-tests/features/notation-elements/chord-diagrams-on.png delete mode 100644 test-data/visual-tests/features/notation-elements/effects-off.png delete mode 100644 test-data/visual-tests/features/notation-elements/effects-on.png delete mode 100644 test-data/visual-tests/features/notation-elements/guitar-tuning-off.png delete mode 100644 test-data/visual-tests/features/notation-elements/guitar-tuning-on.png delete mode 100644 test-data/visual-tests/features/notation-elements/parenthesis-on-tied-bends-off.png delete mode 100644 test-data/visual-tests/features/notation-elements/parenthesis-on-tied-bends-on.png delete mode 100644 test-data/visual-tests/features/notation-elements/score-info-album.png delete mode 100644 test-data/visual-tests/features/notation-elements/score-info-all.png delete mode 100644 test-data/visual-tests/features/notation-elements/score-info-artist.png delete mode 100644 test-data/visual-tests/features/notation-elements/score-info-copyright.png delete mode 100644 test-data/visual-tests/features/notation-elements/score-info-music.png delete mode 100644 test-data/visual-tests/features/notation-elements/score-info-subtitle.png delete mode 100644 test-data/visual-tests/features/notation-elements/score-info-title.png delete mode 100644 test-data/visual-tests/features/notation-elements/score-info-words-and-music.png delete mode 100644 test-data/visual-tests/features/notation-elements/score-info-words.png delete mode 100644 test-data/visual-tests/features/notation-elements/tab-notes-on-tied-bends-off.png delete mode 100644 test-data/visual-tests/features/notation-elements/tab-notes-on-tied-bends-on.png delete mode 100644 test-data/visual-tests/features/notation-elements/track-names-off.png delete mode 100644 test-data/visual-tests/features/notation-elements/track-names-on (1).png delete mode 100644 test-data/visual-tests/features/notation-elements/track-names-on.png delete mode 100644 test-data/visual-tests/features/notation-elements/zeros-on-dive-whammys-off.png delete mode 100644 test-data/visual-tests/features/notation-elements/zeros-on-dive-whammys-on.png delete mode 100644 test-data/visual-tests/features/special-notes/dead-notes.png delete mode 100644 test-data/visual-tests/features/special-notes/ghost-notes.png delete mode 100644 test-data/visual-tests/features/special-notes/grace-notes-advanced.png delete mode 100644 test-data/visual-tests/features/special-notes/grace-notes.png delete mode 100644 test-data/visual-tests/features/special-notes/tied-notes.png delete mode 100644 test-data/visual-tests/features/special-tracks/drum-tabs.gp5 delete mode 100644 test-data/visual-tests/features/special-tracks/drum-tabs.png delete mode 100644 test-data/visual-tests/features/special-tracks/grand-staff.png rename test-data/visual-tests/{features => }/general/alternate-endings.gp5 (100%) create mode 100644 test-data/visual-tests/general/alternate-endings.png rename test-data/visual-tests/{features => }/general/repeats.gp5 (100%) create mode 100644 test-data/visual-tests/general/repeats.png rename test-data/visual-tests/{features => }/general/song-details.gp5 (100%) create mode 100644 test-data/visual-tests/general/song-details.png rename test-data/visual-tests/{features => }/general/tuning.gp5 (100%) create mode 100644 test-data/visual-tests/general/tuning.png rename test-data/visual-tests/{features => }/guitar-tabs/rhythm-with-beams.gp5 (100%) create mode 100644 test-data/visual-tests/guitar-tabs/rhythm-with-beams.png rename test-data/visual-tests/{features => }/guitar-tabs/rhythm.gp5 (100%) create mode 100644 test-data/visual-tests/guitar-tabs/rhythm.png rename test-data/visual-tests/{features => }/guitar-tabs/string-variations.gp5 (100%) create mode 100644 test-data/visual-tests/guitar-tabs/string-variations.png rename test-data/visual-tests/{features => }/layout/grace-notes-advanced.png (100%) rename test-data/visual-tests/{features => }/layout/horizontal-layout-5to8.gp5 (100%) create mode 100644 test-data/visual-tests/layout/horizontal-layout-5to8.png rename test-data/visual-tests/{features => }/layout/horizontal-layout.gp5 (100%) create mode 100644 test-data/visual-tests/layout/horizontal-layout.png rename test-data/visual-tests/{features => }/layout/multi-track.gp5 (100%) create mode 100644 test-data/visual-tests/layout/multi-track.png rename test-data/visual-tests/{features => }/layout/multi-voice.gp5 (100%) create mode 100644 test-data/visual-tests/layout/multi-voice.png rename test-data/visual-tests/{features => }/layout/page-layout-5barsperrow.gp5 (100%) create mode 100644 test-data/visual-tests/layout/page-layout-5barsperrow.png rename test-data/visual-tests/{features => }/layout/page-layout-5to8.gp5 (100%) create mode 100644 test-data/visual-tests/layout/page-layout-5to8.png rename test-data/visual-tests/{features => }/layout/page-layout.gp5 (100%) create mode 100644 test-data/visual-tests/layout/page-layout.png rename test-data/visual-tests/{features => }/layout/tied-notes.png (100%) rename test-data/visual-tests/{features => }/music-notation/accidentals.gp5 (100%) create mode 100644 test-data/visual-tests/music-notation/accidentals.png rename test-data/visual-tests/{features => }/music-notation/clefs.gpx (100%) create mode 100644 test-data/visual-tests/music-notation/clefs.png create mode 100644 test-data/visual-tests/music-notation/forced-accidentals.gp create mode 100644 test-data/visual-tests/music-notation/forced-accidentals.png create mode 100644 test-data/visual-tests/music-notation/key-signatures.gp create mode 100644 test-data/visual-tests/music-notation/key-signatures.png rename test-data/visual-tests/{features => }/music-notation/notes-rests-beams.gp5 (100%) create mode 100644 test-data/visual-tests/music-notation/notes-rests-beams.png rename test-data/visual-tests/{features => }/music-notation/time-signatures.gp5 (100%) create mode 100644 test-data/visual-tests/music-notation/time-signatures.png create mode 100644 test-data/visual-tests/notation-elements/chord-diagrams-off.png create mode 100644 test-data/visual-tests/notation-elements/chord-diagrams-on.png create mode 100644 test-data/visual-tests/notation-elements/effects-off.png create mode 100644 test-data/visual-tests/notation-elements/effects-on.png create mode 100644 test-data/visual-tests/notation-elements/guitar-tuning-off.png create mode 100644 test-data/visual-tests/notation-elements/guitar-tuning-on.png create mode 100644 test-data/visual-tests/notation-elements/parenthesis-on-tied-bends-off.png create mode 100644 test-data/visual-tests/notation-elements/parenthesis-on-tied-bends-on.png create mode 100644 test-data/visual-tests/notation-elements/score-info-album.png create mode 100644 test-data/visual-tests/notation-elements/score-info-all.png create mode 100644 test-data/visual-tests/notation-elements/score-info-artist.png create mode 100644 test-data/visual-tests/notation-elements/score-info-copyright.png create mode 100644 test-data/visual-tests/notation-elements/score-info-music.png create mode 100644 test-data/visual-tests/notation-elements/score-info-subtitle.png create mode 100644 test-data/visual-tests/notation-elements/score-info-title.png create mode 100644 test-data/visual-tests/notation-elements/score-info-words-and-music.png create mode 100644 test-data/visual-tests/notation-elements/score-info-words.png create mode 100644 test-data/visual-tests/notation-elements/tab-notes-on-tied-bends-off.png create mode 100644 test-data/visual-tests/notation-elements/tab-notes-on-tied-bends-on.png create mode 100644 test-data/visual-tests/notation-elements/track-names-off.png create mode 100644 test-data/visual-tests/notation-elements/track-names-on.png create mode 100644 test-data/visual-tests/notation-elements/zeros-on-dive-whammys-off.png create mode 100644 test-data/visual-tests/notation-elements/zeros-on-dive-whammys-on.png create mode 100644 test-data/visual-tests/notation-legend/accentuations-default.png create mode 100644 test-data/visual-tests/notation-legend/accentuations-songbook.png create mode 100644 test-data/visual-tests/notation-legend/arpeggio-default.png create mode 100644 test-data/visual-tests/notation-legend/arpeggio-songbook.png create mode 100644 test-data/visual-tests/notation-legend/bends-default.png create mode 100644 test-data/visual-tests/notation-legend/bends-songbook.png create mode 100644 test-data/visual-tests/notation-legend/chords-default.png create mode 100644 test-data/visual-tests/notation-legend/chords-songbook.png create mode 100644 test-data/visual-tests/notation-legend/crescendo-default.png create mode 100644 test-data/visual-tests/notation-legend/crescendo-songbook.png create mode 100644 test-data/visual-tests/notation-legend/dead-default.png create mode 100644 test-data/visual-tests/notation-legend/dead-songbook.png create mode 100644 test-data/visual-tests/notation-legend/dynamics-default.png create mode 100644 test-data/visual-tests/notation-legend/dynamics-songbook.png create mode 100644 test-data/visual-tests/notation-legend/fingering-default.png create mode 100644 test-data/visual-tests/notation-legend/fingering-songbook.png create mode 100644 test-data/visual-tests/notation-legend/full-default.png create mode 100644 test-data/visual-tests/notation-legend/full-songbook.png create mode 100644 test-data/visual-tests/notation-legend/grace-default.png create mode 100644 test-data/visual-tests/notation-legend/grace-songbook.png create mode 100644 test-data/visual-tests/notation-legend/hammer-default.png create mode 100644 test-data/visual-tests/notation-legend/hammer-songbook.png create mode 100644 test-data/visual-tests/notation-legend/harmonics-default.png create mode 100644 test-data/visual-tests/notation-legend/harmonics-songbook.png create mode 100644 test-data/visual-tests/notation-legend/let-ring-default.png create mode 100644 test-data/visual-tests/notation-legend/let-ring-songbook.png create mode 100644 test-data/visual-tests/notation-legend/mixed-default.png create mode 100644 test-data/visual-tests/notation-legend/mixed-songbook.png create mode 100644 test-data/visual-tests/notation-legend/multi-grace-default.png create mode 100644 test-data/visual-tests/notation-legend/multi-grace-songbook.png create mode 100644 test-data/visual-tests/notation-legend/multi-voice-default.png create mode 100644 test-data/visual-tests/notation-legend/multi-voice-songbook.png rename test-data/visual-tests/{features/general => notation-legend}/notation-legend.gp (100%) create mode 100644 test-data/visual-tests/notation-legend/ottavia-default.png create mode 100644 test-data/visual-tests/notation-legend/ottavia-songbook.png create mode 100644 test-data/visual-tests/notation-legend/pick-stroke-default.png create mode 100644 test-data/visual-tests/notation-legend/pick-stroke-songbook.png create mode 100644 test-data/visual-tests/notation-legend/slash-default.png create mode 100644 test-data/visual-tests/notation-legend/slash-songbook.png create mode 100644 test-data/visual-tests/notation-legend/slides-default.png create mode 100644 test-data/visual-tests/notation-legend/slides-songbook.png create mode 100644 test-data/visual-tests/notation-legend/staccatissimo-default.png create mode 100644 test-data/visual-tests/notation-legend/staccatissimo-songbook.png create mode 100644 test-data/visual-tests/notation-legend/sweep-default.png create mode 100644 test-data/visual-tests/notation-legend/sweep-songbook.png create mode 100644 test-data/visual-tests/notation-legend/tap-riff-default.png create mode 100644 test-data/visual-tests/notation-legend/tap-riff-songbook.png create mode 100644 test-data/visual-tests/notation-legend/tempo-change-default.png create mode 100644 test-data/visual-tests/notation-legend/tempo-change-songbook.png create mode 100644 test-data/visual-tests/notation-legend/text-default.png create mode 100644 test-data/visual-tests/notation-legend/text-songbook.png create mode 100644 test-data/visual-tests/notation-legend/trill-default.png create mode 100644 test-data/visual-tests/notation-legend/trill-songbook.png create mode 100644 test-data/visual-tests/notation-legend/triplet-feel-default.png create mode 100644 test-data/visual-tests/notation-legend/triplet-feel-songbook.png create mode 100644 test-data/visual-tests/notation-legend/vibrato-default.png create mode 100644 test-data/visual-tests/notation-legend/vibrato-songbook.png create mode 100644 test-data/visual-tests/notation-legend/wah-default.png create mode 100644 test-data/visual-tests/notation-legend/wah-songbook.png create mode 100644 test-data/visual-tests/notation-legend/whammy-default.png create mode 100644 test-data/visual-tests/notation-legend/whammy-songbook.png rename test-data/visual-tests/{features => }/special-notes/dead-notes.gp5 (100%) create mode 100644 test-data/visual-tests/special-notes/dead-notes.png rename test-data/visual-tests/{features => }/special-notes/ghost-notes.gp5 (100%) create mode 100644 test-data/visual-tests/special-notes/ghost-notes.png rename test-data/visual-tests/{features => }/special-notes/grace-notes-advanced.gp (100%) create mode 100644 test-data/visual-tests/special-notes/grace-notes-advanced.png rename test-data/visual-tests/{features => }/special-notes/grace-notes.gp5 (100%) create mode 100644 test-data/visual-tests/special-notes/grace-notes.png rename test-data/visual-tests/{features => }/special-notes/tied-notes.gp5 (100%) create mode 100644 test-data/visual-tests/special-notes/tied-notes.png create mode 100644 test-data/visual-tests/special-tracks/drum-tabs.gp create mode 100644 test-data/visual-tests/special-tracks/drum-tabs.png rename test-data/visual-tests/{features => }/special-tracks/grand-staff.gpx (100%) create mode 100644 test-data/visual-tests/special-tracks/grand-staff.png create mode 100644 test-data/visual-tests/special-tracks/percussion.gp create mode 100644 test-data/visual-tests/special-tracks/percussion.png create mode 100644 test/visualTests/features/NotationLegend.test.ts diff --git a/package-lock.json b/package-lock.json index 7bf3b6734..ca166420e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,31 +1,31 @@ { "name": "@coderline/alphatab", - "version": "1.0.0", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.8.3" + "@babel/highlight": "^7.10.4" } }, "@babel/helper-validator-identifier": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz", - "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", "dev": true }, "@babel/highlight": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", - "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.9.0", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } @@ -57,18 +57,30 @@ } }, "@rollup/plugin-commonjs": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-14.0.0.tgz", - "integrity": "sha512-+PSmD9ePwTAeU106i9FRdc+Zb3XUWyW26mo5Atr2mk82hor8+nPwkztEjFo8/B1fJKfaQDg9aM2bzQkjhi7zOw==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-16.0.0.tgz", + "integrity": "sha512-LuNyypCP3msCGVQJ7ki8PqYdpjfEkE/xtFa5DqlF+7IBD0JsfMZ87C58heSwIMint58sAUZbt3ITqOmdQv/dXw==", "dev": true, "requires": { - "@rollup/pluginutils": "^3.0.8", + "@rollup/pluginutils": "^3.1.0", "commondir": "^1.0.1", - "estree-walker": "^1.0.1", - "glob": "^7.1.2", - "is-reference": "^1.1.2", - "magic-string": "^0.25.2", - "resolve": "^1.11.0" + "estree-walker": "^2.0.1", + "glob": "^7.1.6", + "is-reference": "^1.2.1", + "magic-string": "^0.25.7", + "resolve": "^1.17.0" + }, + "dependencies": { + "resolve": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz", + "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==", + "dev": true, + "requires": { + "is-core-module": "^2.0.0", + "path-parse": "^1.0.6" + } + } } }, "@rollup/pluginutils": { @@ -80,14 +92,16 @@ "@types/estree": "0.0.39", "estree-walker": "^1.0.1", "picomatch": "^2.2.2" + }, + "dependencies": { + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + } } }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -121,9 +135,9 @@ } }, "@types/jasmine": { - "version": "3.5.11", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-3.5.11.tgz", - "integrity": "sha512-fg1rOd/DehQTIJTifGqGVY6q92lDgnLfs7C6t1ccSwQrMyoTGSoH6wWzhJDZb6ezhsdwAX4EIBLe8w5fXWmEng==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-3.6.1.tgz", + "integrity": "sha512-eeSCVhBsgwHNS1FmaMu4zrLxfykCTWJMLFZv7lmyrZQjw7foUUXoPu4GukSN9v7JvUw7X+/aDH3kCaymirBSTg==", "dev": true }, "@types/minimatch": { @@ -254,15 +268,6 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, "async-limiter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", @@ -355,9 +360,9 @@ } }, "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", + "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=", "dev": true }, "base64id": { @@ -366,12 +371,6 @@ "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", "dev": true }, - "basic-auth": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.1.0.tgz", - "integrity": "sha1-RSIe5Cn37h5QNb4/UVM/HN/SmIQ=", - "dev": true - }, "better-assert": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", @@ -692,9 +691,9 @@ } }, "concurrently": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-5.2.0.tgz", - "integrity": "sha512-XxcDbQ4/43d6CxR7+iV8IZXhur4KbmEJk1CetVMUqCy34z9l0DkszbY+/9wvmSnToTej0SYomc2WSRH+L0zVJw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-5.3.0.tgz", + "integrity": "sha512-8MhqOB6PWlBfA2vJ8a0bSFKATOdWlHiQlk11IfmQBPaHVP8oP2gsh2MObE6UR3hqDHqvaIvLTyceNW6obVuFHQ==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -788,12 +787,6 @@ "vary": "^1" } }, - "corser": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", - "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=", - "dev": true - }, "custom-event": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", @@ -801,9 +794,9 @@ "dev": true }, "date-fns": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.14.0.tgz", - "integrity": "sha512-1zD+68jhFgDIM0rF05rcwYO8cExdNqxjq4xP1QKM60Q45mnO6zaMWB4tOzrIr4M4GSLntsKeE4c9Bdl2jhL/yw==", + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.16.1.tgz", + "integrity": "sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ==", "dev": true }, "date-format": { @@ -965,26 +958,6 @@ "void-elements": "^2.0.0" } }, - "ecstatic": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz", - "integrity": "sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog==", - "dev": true, - "requires": { - "he": "^1.1.1", - "mime": "^1.6.0", - "minimist": "^1.1.0", - "url-join": "^2.0.5" - }, - "dependencies": { - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - } - } - }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -1035,19 +1008,19 @@ } }, "engine.io-client": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.4.3.tgz", - "integrity": "sha512-0NGY+9hioejTEJCaSJZfWZLk4FPI9dN+1H1C4+wj2iuFba47UgZbJzfWs4aNFajnX/qAaYKbe2lLTfEEWzCmcw==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.4.4.tgz", + "integrity": "sha512-iU4CRr38Fecj8HoZEnFtm2EiKGbYZcPn3cHxqNGl/tmdWRf60KhK+9vE0JeSjgnlS/0oynEfLgKbT9ALpim0sQ==", "dev": true, "requires": { "component-emitter": "~1.3.0", "component-inherit": "0.0.3", - "debug": "~4.1.0", + "debug": "~3.1.0", "engine.io-parser": "~2.2.0", "has-cors": "1.1.0", "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", + "parseqs": "0.0.6", + "parseuri": "0.0.6", "ws": "~6.1.0", "xmlhttprequest-ssl": "~1.5.4", "yeast": "0.1.2" @@ -1060,18 +1033,24 @@ "dev": true }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.0.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "parseqs": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", + "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==", + "dev": true + }, + "parseuri": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", + "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==", "dev": true }, "ws": { @@ -1086,14 +1065,14 @@ } }, "engine.io-parser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.0.tgz", - "integrity": "sha512-6I3qD9iUxotsC5HEMuuGsKA0cXerGz+4uGcXQEkfBidgKf0amsjrrtwcbwK/nzpZBxclXlV7gGl9dgWvu4LF6w==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz", + "integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==", "dev": true, "requires": { "after": "0.8.2", "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.5", + "base64-arraybuffer": "0.1.4", "blob": "0.0.5", "has-binary2": "~1.0.2" } @@ -1132,9 +1111,9 @@ "dev": true }, "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.1.tgz", + "integrity": "sha512-tF0hv+Yi2Ot1cwj9eYHtxC0jB9bmjacjQs6ZBTj82H8JwUywFuc+7E83NWfNMwHXZc11mjfFcVXPe9gEP4B8dg==", "dev": true }, "esutils": { @@ -1150,9 +1129,9 @@ "dev": true }, "eventemitter3": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", - "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", "dev": true }, "expand-brackets": { @@ -1553,30 +1532,10 @@ "dev": true }, "follow-redirects": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz", - "integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==", - "dev": true, - "requires": { - "debug": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", + "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==", + "dev": true }, "for-in": { "version": "1.0.2", @@ -1648,6 +1607,12 @@ "dev": true, "optional": true }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -1738,6 +1703,15 @@ "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", "dev": true }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-binary2": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", @@ -1819,12 +1793,6 @@ } } }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, "homedir-polyfill": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", @@ -1872,24 +1840,6 @@ "requires-port": "^1.0.0" } }, - "http-server": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.12.3.tgz", - "integrity": "sha512-be0dKG6pni92bRjq0kvExtj/NrrAd28/8fCXkaI/4piTwQMSDSLMhWyW0NI1V+DBI3aa1HMlQu46/HjVLfmugA==", - "dev": true, - "requires": { - "basic-auth": "^1.0.3", - "colors": "^1.4.0", - "corser": "^2.0.1", - "ecstatic": "^3.3.2", - "http-proxy": "^1.18.0", - "minimist": "^1.2.5", - "opener": "^1.5.1", - "portfinder": "^1.0.25", - "secure-compare": "3.0.1", - "union": "~0.5.0" - } - }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -1980,6 +1930,15 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, + "is-core-module": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.1.0.tgz", + "integrity": "sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -2101,17 +2060,18 @@ "dev": true }, "jasmine-core": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.5.0.tgz", - "integrity": "sha512-nCeAiw37MIMA9w9IXso7bRaLl+c/ef3wnxsoSAlYrzS+Ot0zTG6nU8G/cIfGkqpkjX2wNaIW9RFG0TwIFnG6bA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.6.0.tgz", + "integrity": "sha512-8uQYa7zJN8hq9z+g8z1bqCfdC8eoDAeVnM5sfqs7KHv9/ifoJ500m018fpFc7RDaO6SWCLCXwo/wPSNcdYTgcw==", "dev": true }, "jest-worker": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.1.0.tgz", - "integrity": "sha512-Z9P5pZ6UC+kakMbNJn+tA2RdVdNX5WH1x+5UCBZ9MxIK24pjYtFt96fK+UwBTrjLYm232g1xz0L3eTh51OW+yQ==", + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", "dev": true, "requires": { + "@types/node": "*", "merge-stream": "^2.0.0", "supports-color": "^7.0.0" }, @@ -2123,9 +2083,9 @@ "dev": true }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -2165,24 +2125,23 @@ } }, "karma": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/karma/-/karma-5.1.0.tgz", - "integrity": "sha512-I3aPbkuIbwuBo6wSog97P5WnnhCgUTsWTu/bEw1vZVQFbXmKO3PK+cfFhZioOgVtJAuQxoyauGNjnwXNHMCxbw==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/karma/-/karma-5.2.3.tgz", + "integrity": "sha512-tHdyFADhVVPBorIKCX8A37iLHxc6RBRphkSoQ+MLKdAtFn1k97tD8WUGi1KlEtDZKL3hui0qhsY9HXUfSNDYPQ==", "dev": true, "requires": { "body-parser": "^1.19.0", "braces": "^3.0.2", - "chokidar": "^3.0.0", + "chokidar": "^3.4.2", "colors": "^1.4.0", "connect": "^3.7.0", "di": "^0.0.1", "dom-serialize": "^2.2.1", - "flatted": "^2.0.2", "glob": "^7.1.6", "graceful-fs": "^4.2.4", "http-proxy": "^1.18.1", "isbinaryfile": "^4.0.6", - "lodash": "^4.17.15", + "lodash": "^4.17.19", "log4js": "^6.2.1", "mime": "^2.4.5", "minimatch": "^3.0.4", @@ -2192,7 +2151,7 @@ "socket.io": "^2.3.0", "source-map": "^0.6.1", "tmp": "0.2.1", - "ua-parser-js": "0.7.21", + "ua-parser-js": "0.7.22", "yargs": "^15.3.1" }, "dependencies": { @@ -2203,15 +2162,30 @@ "dev": true }, "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, + "chokidar": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -2260,17 +2234,6 @@ "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "dev": true }, - "http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "requires": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -2301,6 +2264,15 @@ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, + "readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", @@ -2382,12 +2354,12 @@ } }, "karma-jasmine": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-3.3.1.tgz", - "integrity": "sha512-Nxh7eX9mOQMyK0VSsMxdod+bcqrR/ikrmEiWj5M6fwuQ7oI+YEF1FckaDsWfs6TIpULm9f0fTKMjF7XcrvWyqQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-4.0.1.tgz", + "integrity": "sha512-h8XDAhTiZjJKzfkoO1laMH+zfNlra+dEQHUAjpn5JV1zCPtOIVWGQjLBrqhnzQa/hrU2XrZwSyBa6XjEBzfXzw==", "dev": true, "requires": { - "jasmine-core": "^3.5.0" + "jasmine-core": "^3.6.0" } }, "karma-jasmine-html-reporter": { @@ -2432,9 +2404,9 @@ } }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "log4js": { @@ -2451,12 +2423,12 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -2619,9 +2591,9 @@ } }, "moment": { - "version": "2.25.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.25.1.tgz", - "integrity": "sha512-nRKMf9wDS4Fkyd0C9LXh2FFXinD+iwbJ5p/lh3CHitW9kZbRbJ8hCruiadiIXZVbeAqKZzqcTvHnK3mRhFjb6w==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz", + "integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==", "dev": true }, "ms": { @@ -2785,9 +2757,9 @@ } }, "opener": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", - "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", "dev": true }, "p-limit": { @@ -2908,34 +2880,6 @@ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, - "portfinder": { - "version": "1.0.26", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.26.tgz", - "integrity": "sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ==", - "dev": true, - "requires": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.1" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -3130,9 +3074,9 @@ } }, "rollup": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.21.0.tgz", - "integrity": "sha512-BEGgy+wSzux7Ycq58pRiWEOBZaXRXTuvzl1gsm7gqmsAHxkWf9nyA5V2LN9fGSHhhDQd0/C13iRzSh4bbIpWZQ==", + "version": "2.33.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.33.1.tgz", + "integrity": "sha512-uY4O/IoL9oNW8MMcbA5hcOaz6tZTMIh7qJHx/tzIJm+n1wLoY38BLn6fuy7DhR57oNFLMbDQtDeJoFURt5933w==", "dev": true, "requires": { "fsevents": "~2.1.2" @@ -3165,9 +3109,9 @@ } }, "rollup-plugin-dts": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-1.4.8.tgz", - "integrity": "sha512-2qHB4B3oaTyi1mDmqDzsRGKlev32v3EhMUAmc45Cn9eB22R7FsYDiigvT9XdM/oQzfd0qv5MkeZju8DP0nauiA==", + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/rollup-plugin-dts/-/rollup-plugin-dts-1.4.13.tgz", + "integrity": "sha512-7mxoQ6PcmCkBE5ZhrjGDL4k42XLy8BkSqpiRi1MipwiGs+7lwi4mQkp2afX+OzzLjJp/TGM8llfe8uayIUhPEw==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4" @@ -3205,26 +3149,26 @@ } }, "rollup-plugin-license": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-2.1.0.tgz", - "integrity": "sha512-HvwwqCbG+//hAwGxOce+XadsEooq79SqDu3z2GTwU2y1rFQ/uqT5JbCzcmauFII+nKZ0/N2BzG76ZuP7OdfU7A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-2.2.0.tgz", + "integrity": "sha512-xXb1vviEwlJMX+VGUSsglcMA/Rh9d2QzEm94awy4FlnsPqGrXoTYYGOR3UXR6gYIxiJFkr7qmkKF/NXfre/y8g==", "dev": true, "requires": { "commenting": "1.1.0", "glob": "7.1.6", - "lodash": "4.17.15", + "lodash": "4.17.19", "magic-string": "0.25.7", "mkdirp": "1.0.4", - "moment": "2.25.1", + "moment": "2.27.0", "package-name-regex": "1.0.8", "spdx-expression-validate": "2.0.0", "spdx-satisfies": "5.0.0" }, "dependencies": { "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "dev": true }, "mkdirp": { @@ -3235,16 +3179,71 @@ } } }, + "rollup-plugin-serve": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-serve/-/rollup-plugin-serve-1.1.0.tgz", + "integrity": "sha512-pYkSsuA0/psKqhhictkJw1c2klya5b+LlCvipWqI9OE1aG2M97mRumZCbBlry5CMEOzYBBgSDgd1694sNbmyIw==", + "dev": true, + "requires": { + "mime": ">=2.4.6", + "opener": "1" + } + }, "rollup-plugin-terser": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-6.1.0.tgz", - "integrity": "sha512-4fB3M9nuoWxrwm39habpd4hvrbrde2W2GG4zEGPQg1YITNkM3Tqur5jSuXlWNzbv/2aMLJ+dZJaySc3GCD8oDw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.8.3", - "jest-worker": "^26.0.0", - "serialize-javascript": "^3.0.0", - "terser": "^4.7.0" + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + }, + "terser": { + "version": "5.3.8", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.3.8.tgz", + "integrity": "sha512-zVotuHoIfnYjtlurOouTazciEfL7V38QMAOhGqpXDEg6yT13cF4+fEP9b0rrCEQTn+tT46uxgFsTZzhygk+CzQ==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + } + } } }, "run-parallel": { @@ -3254,9 +3253,9 @@ "dev": true }, "rxjs": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.0.tgz", - "integrity": "sha512-3HMA8z/Oz61DUHe+SdOiQyzIf4tOx5oQHmMir7IZEu6TMqCLHT4LRcmNaUS0NwOz8VLvmmBduMsoaUvMaIiqzg==", + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -3283,12 +3282,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "secure-compare": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz", - "integrity": "sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=", - "dev": true - }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -3331,9 +3324,9 @@ } }, "serialize-javascript": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz", - "integrity": "sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -3585,6 +3578,12 @@ "to-array": "0.1.4" }, "dependencies": { + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", + "dev": true + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -3601,16 +3600,22 @@ "dev": true }, "socket.io-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz", - "integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.1.tgz", + "integrity": "sha512-1QLvVAe8dTz+mKmZ07Swxt+LAo4Y1ff50rlyoEx00TQmDFVQYPfcqGvIDJLGaBdhdNCecXtyKpD+EgKGcmmbuQ==", "dev": true, "requires": { - "component-emitter": "1.2.1", + "component-emitter": "~1.3.0", "debug": "~3.1.0", "isarray": "2.0.1" }, "dependencies": { + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -3834,12 +3839,12 @@ "dev": true }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "fs-extra": { @@ -3903,14 +3908,22 @@ } }, "terser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", - "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "version": "5.3.8", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.3.8.tgz", + "integrity": "sha512-zVotuHoIfnYjtlurOouTazciEfL7V38QMAOhGqpXDEg6yT13cF4+fEP9b0rrCEQTn+tT46uxgFsTZzhygk+CzQ==", "dev": true, "requires": { "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } } }, "tmp": { @@ -3982,9 +3995,9 @@ "dev": true }, "ts-node": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", - "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.0.0.tgz", + "integrity": "sha512-/TqB4SnererCDR/vb4S/QvSZvzQMJN8daAslg7MeaiHvD8rDZsSfXmNeNumyZZzMned72Xoq/isQljYSt8Ynfg==", "dev": true, "requires": { "arg": "^4.1.0", @@ -4001,9 +4014,9 @@ "dev": true }, "tslint": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.2.tgz", - "integrity": "sha512-UyNrLdK3E0fQG/xWNqAFAC5ugtFyPO4JJR1KyyfQAyzR8W0fTRrC91A8Wej4BntFzcvETdCSDa/4PnNYJQLYiA==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -4017,7 +4030,7 @@ "mkdirp": "^0.5.3", "resolve": "^1.3.2", "semver": "^5.3.0", - "tslib": "^1.10.0", + "tslib": "^1.13.0", "tsutils": "^2.29.0" } }, @@ -4074,12 +4087,12 @@ } }, "ttypescript": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/ttypescript/-/ttypescript-1.5.10.tgz", - "integrity": "sha512-Hk7TRej1hM+p+Fo+Pyb/XK9pe9CAt3Sh5n5YRutxFS8hUgkh2u1Vd2K40kMcNP3WYhiVFBMqXwM/2E8O95Ep6g==", + "version": "1.5.12", + "resolved": "https://registry.npmjs.org/ttypescript/-/ttypescript-1.5.12.tgz", + "integrity": "sha512-1ojRyJvpnmgN9kIHmUnQPlEV1gq+VVsxVYjk/NfvMlHSmYxjK5hEvOOU2MQASrbekTUiUM7pR/nXeCc8bzvMOQ==", "dev": true, "requires": { - "resolve": "^1.9.0" + "resolve": ">=1.9.0" } }, "type-is": { @@ -4099,26 +4112,17 @@ "dev": true }, "typescript": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.6.tgz", - "integrity": "sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.5.tgz", + "integrity": "sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ==", "dev": true }, "ua-parser-js": { - "version": "0.7.21", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz", - "integrity": "sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ==", + "version": "0.7.22", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.22.tgz", + "integrity": "sha512-YUxzMjJ5T71w6a8WWVcMGM6YWOTX27rCoIQgLXiWaxqXSx9D7DNjiGWn1aJIRSQ5qr0xuhra77bSIh6voR/46Q==", "dev": true }, - "union": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", - "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==", - "dev": true, - "requires": { - "qs": "^6.4.0" - } - }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -4201,12 +4205,6 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, - "url-join": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", - "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=", - "dev": true - }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -4280,9 +4278,9 @@ "dev": true }, "ws": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", - "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.0.tgz", + "integrity": "sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ==", "dev": true }, "xmlhttprequest-ssl": { diff --git a/package.json b/package.json index 5ec7a3166..d51535fdf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coderline/alphatab", - "version": "1.0.1", + "version": "1.1.0", "description": "alphaTab is a music notation and guitar tablature rendering library", "keywords": [ "guitar", @@ -30,7 +30,7 @@ "lint": "tslint --project tsconfig.build.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'", "build": "ttsc --project tsconfig.build.json && rollup -c rollup.config.js", "build-ci": "npm run clean && npm run build && npm pack", - "start": "node scripts/setup-playground.js && npm run build && concurrently --kill-others \"ttsc --project tsconfig.build.json --watch\" \"rollup -c rollup.config.js -w\" \"http-server -o playground/control.html \"", + "start": "node scripts/setup-playground.js && npm run build && concurrently --kill-others \"ttsc --project tsconfig.build.json --watch\" \"rollup -c rollup.config.js -w\"", "test": "ttsc --project tsconfig.json && concurrently --kill-others \"ttsc --project tsconfig.json -w\" \"karma start karma.conf.js --browsers Chrome --no-single-run --reporters spec,kjhtml\"", "test-ci": "ttsc --project tsconfig.json && karma start karma.conf.js --browsers ChromeHeadless --single-run --reporters spec", "generate-csharp": "ts-node --project tsconfig.build-csharp.json src.compiler/csharp/CSharpTranspiler.ts --project tsconfig.build-csharp.json", @@ -40,35 +40,35 @@ "test-csharp-ci": "cd src.csharp && dotnet test" }, "devDependencies": { - "@rollup/plugin-commonjs": "^14.0.0", - "@types/jasmine": "^3.5.11", - "concurrently": "^5.2.0", + "@rollup/plugin-commonjs": "^16.0.0", + "@types/jasmine": "^3.6.1", + "concurrently": "^5.3.0", "cors": "^2.8.5", "fs-extra": "^9.0.1", "git-branch": "^2.0.1", - "http-server": "^0.12.3", - "karma": "^5.1.0", + "karma": "^5.2.3", "karma-chrome-launcher": "^3.1.0", "karma-express-http-server": "0.0.1", - "karma-jasmine": "^3.3.1", + "karma-jasmine": "^4.0.1", "karma-jasmine-html-reporter": "^1.5.4", "karma-rollup-preprocessor": "^7.0.5", "karma-spec-reporter": "0.0.32", - "lodash": "^4.17.19", + "lodash": "^4.17.20", "multer": "^1.4.2", "rimraf": "^3.0.2", - "rollup": "^2.21.0", + "rollup": "^2.33.1", "rollup-plugin-copy": "^3.3.0", - "rollup-plugin-dts": "^1.4.8", - "rollup-plugin-license": "^2.1.0", - "rollup-plugin-terser": "^6.1.0", - "terser": "^4.8.0", - "ts-node": "^8.10.2", - "tslint": "^6.1.2", + "rollup-plugin-dts": "^1.4.13", + "rollup-plugin-license": "^2.2.0", + "rollup-plugin-serve": "^1.1.0", + "rollup-plugin-terser": "^7.0.2", + "terser": "^5.3.8", + "ts-node": "^9.0.0", + "tslint": "^6.1.3", "tslint-config-prettier": "^1.15.0", "tslint-config-standard": "^9.0.0", - "ttypescript": "^1.5.10", - "typescript": "^3.9.6" + "ttypescript": "^1.5.12", + "typescript": "^4.0.5" }, "files": [ "/dist/alphaTab.js", diff --git a/playground-template/control-template.html b/playground-template/control-template.html index 8b73db8a0..b9748be2a 100644 --- a/playground-template/control-template.html +++ b/playground-template/control-template.html @@ -88,6 +88,9 @@
+ + + diff --git a/playground-template/control.js b/playground-template/control.js index 45b320d7a..23b7cbe95 100644 --- a/playground-template/control.js +++ b/playground-template/control.js @@ -201,6 +201,17 @@ function setupControl(selector) { } }; + control.querySelector('.at-count-in').onclick = function (e) { + e.stopPropagation(); + const link = e.target.closest('a'); + link.classList.toggle('active'); + if (link.classList.contains('active')) { + at.countInVolume = 1; + } else { + at.countInVolume = 0; + } + }; + control.querySelectorAll('.at-speed-options a').forEach(function (a) { a.onclick = function (e) { e.preventDefault(); diff --git a/rollup.config.js b/rollup.config.js index 2da6199c8..a6764678f 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -4,6 +4,7 @@ const dts = require('rollup-plugin-dts').default; const copy = require('rollup-plugin-copy'); const branch = require('git-branch'); const license = require('rollup-plugin-license'); +const serve = require('rollup-plugin-serve'); const commonOutput = { name: 'alphaTab', @@ -13,6 +14,8 @@ const commonOutput = { } }; +const isWatch = process.env.ROLLUP_WATCH; + module.exports = [ { input: `dist/lib/alphatab.js`, @@ -59,6 +62,13 @@ module.exports = [ mappings: { '@src': 'dist/lib' } + }), + + isWatch && serve({ + open: true, + openPage: '/playground/control.html', + contentBase: '', + port: 8080 }) ] }, diff --git a/scripts/setup-playground.js b/scripts/setup-playground.js index 7351ef1f6..ed7d5c15f 100644 --- a/scripts/setup-playground.js +++ b/scripts/setup-playground.js @@ -2,4 +2,4 @@ const fs = require('fs-extra'); const src = `${__dirname}/../playground-template` const dest = `${__dirname}/../playground` -fs.copySync(src, dest); \ No newline at end of file +fs.copySync(src, dest, { overwrite: false }); \ No newline at end of file diff --git a/src.compiler/JsonSerializationBuilder.ts b/src.compiler/JsonSerializationBuilder.ts index e3436fdbf..f2e4e86d9 100644 --- a/src.compiler/JsonSerializationBuilder.ts +++ b/src.compiler/JsonSerializationBuilder.ts @@ -15,8 +15,10 @@ function getTypeWithNullableInfo(checker: ts.TypeChecker, node: ts.TypeNode) { for (const t of node.types) { if (t.kind === ts.SyntaxKind.NullKeyword) { isNullable = true; + } else if (ts.isLiteralTypeNode(t) && t.literal.kind === ts.SyntaxKind.NullKeyword) { + isNullable = true; } else if (type !== null) { - throw new Error('Multi union types on JSON settings not supported!'); + throw new Error('Multi union types on JSON settings not supported: ' + node.getSourceFile().fileName + ':' + node.getText()); } else { type = checker.getTypeAtLocation(t); } diff --git a/src.compiler/csharp/CSharpAstTransformer.ts b/src.compiler/csharp/CSharpAstTransformer.ts index c79c6095a..0b130b349 100644 --- a/src.compiler/csharp/CSharpAstTransformer.ts +++ b/src.compiler/csharp/CSharpAstTransformer.ts @@ -495,6 +495,8 @@ export default class CSharpAstTransformer { } } else if (ts.isVariableStatement(s)) { this.visitTestClassProperty(csClass, s); + } else if (ts.isFunctionDeclaration(s)) { + this.visitTestClassMethod(csClass, s); } else { this._context.addTsNodeDiagnostics( s, @@ -507,6 +509,40 @@ export default class CSharpAstTransformer { this._csharpFile.namespace.declarations.push(csClass); } + private visitTestClassMethod(parent: cs.ClassDeclaration, d: ts.FunctionDeclaration) { + const signature = this._context.typeChecker.getSignatureFromDeclaration(d); + const returnType = this._context.typeChecker.getReturnTypeOfSignature(signature!); + + const csMethod: cs.MethodDeclaration = { + parent: parent, + nodeType: cs.SyntaxKind.MethodDeclaration, + isAbstract: false, + isOverride: false, + isStatic: false, + isVirtual: false, + name: this._context.toPascalCase((d.name as ts.Identifier).text), + parameters: [], + returnType: this.createUnresolvedTypeNode(null, d.type ?? d, returnType), + visibility: this.mapVisibility(d.modifiers), + tsNode: d, + skipEmit: this.shouldSkip(d) + }; + csMethod.isAsync = + !!d.modifiers && + !!d.modifiers.find(m => m.kind === ts.SyntaxKind.AsyncKeyword); + + const type = this._context.typeChecker.getTypeAtLocation(d.name!); + csMethod.returnType.parent = csMethod; + + d.parameters.forEach(p => csMethod.parameters.push(this.makeParameter(csMethod, p))); + this._declarationOrAssignmentTypeStack.push(type); + csMethod.body = this.visitBlock(csMethod, d.body as ts.Block); + this._declarationOrAssignmentTypeStack.pop(); + + parent.members.push(csMethod); + this._context.registerSymbol(csMethod); + } + private visitTestMethod(parent: cs.ClassDeclaration, d: ts.CallExpression) { const csMethod: cs.MethodDeclaration = { parent: parent, diff --git a/src.csharp/AlphaTab.Windows/NAudioSynthOutput.cs b/src.csharp/AlphaTab.Windows/NAudioSynthOutput.cs index 7cce0aeaf..50e646d58 100644 --- a/src.csharp/AlphaTab.Windows/NAudioSynthOutput.cs +++ b/src.csharp/AlphaTab.Windows/NAudioSynthOutput.cs @@ -18,7 +18,6 @@ public class NAudioSynthOutput : WaveProvider32, ISynthOutput, IDisposable private DirectSoundOut _context; private CircularSampleBuffer _circularBuffer; - private bool _finished; /// public double SampleRate => PreferredSampleRate; @@ -42,7 +41,6 @@ public void Activate() /// public void Open() { - _finished = false; _circularBuffer = new CircularSampleBuffer(BufferSize * BufferCount); _context = new DirectSoundOut(100); @@ -62,7 +60,6 @@ public void Dispose() /// public void Close() { - _finished = true; _context.Stop(); _circularBuffer.Clear(); _context.Dispose(); @@ -72,7 +69,6 @@ public void Close() public void Play() { RequestBuffers(); - _finished = false; _context.Play(); } @@ -82,12 +78,6 @@ public void Pause() _context.Pause(); } - /// - public void SequencerFinished() - { - _finished = true; - } - /// public void AddSamples(Float32Array f) { @@ -117,29 +107,16 @@ private void RequestBuffers() /// public override int Read(float[] buffer, int offset, int count) { - if (_circularBuffer.Count < count) - { - if (_finished) - { - ((EventEmitter) Finished).Trigger(); - } - } - else - { - var read = new Float32Array(count); - _circularBuffer.Read(read, 0, read.Length); + var read = new Float32Array(count); + _circularBuffer.Read(read, 0, System.Math.Min(read.Length, _circularBuffer.Count)); - Buffer.BlockCopy(read.Data, 0, buffer, offset * sizeof(float), - count * sizeof(float)); + Buffer.BlockCopy(read.Data, 0, buffer, offset * sizeof(float), + count * sizeof(float)); - var samples = count / 2; - ((EventEmitterOfT) SamplesPlayed).Trigger(samples); - } + var samples = count / 2; + ((EventEmitterOfT) SamplesPlayed).Trigger(samples); - if (!_finished) - { - RequestBuffers(); - } + RequestBuffers(); return count; } @@ -152,8 +129,5 @@ public override int Read(float[] buffer, int offset, int count) /// public IEventEmitter SampleRequest { get; } = new EventEmitter(); - - /// - public IEventEmitter Finished { get; } = new EventEmitter(); } } diff --git a/src.csharp/AlphaTab/Core/Globals.cs b/src.csharp/AlphaTab/Core/Globals.cs index 338a5f7b6..5cec54034 100644 --- a/src.csharp/AlphaTab/Core/Globals.cs +++ b/src.csharp/AlphaTab/Core/Globals.cs @@ -4,6 +4,7 @@ namespace AlphaTab.Core { public static class Globals { + public const double NaN = double.NaN; public static Console Console { get; } = new Console(); public static double ParseInt(string s) diff --git a/src.csharp/AlphaTab/Core/TypeHelper.cs b/src.csharp/AlphaTab/Core/TypeHelper.cs index f72836f84..8a8741286 100644 --- a/src.csharp/AlphaTab/Core/TypeHelper.cs +++ b/src.csharp/AlphaTab/Core/TypeHelper.cs @@ -185,6 +185,12 @@ public static int CharCodeAt(this string s, double index) { return s[(int) index]; } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static string CharAt(this string s, double index) + { + return s.Substring((int) index, 1); + } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static string ToLowerCase(this string s) diff --git a/src.csharp/AlphaTab/Platform/CSharp/AlphaSynthWorkerApiBase.cs b/src.csharp/AlphaTab/Platform/CSharp/AlphaSynthWorkerApiBase.cs index a245949e2..1315a4345 100644 --- a/src.csharp/AlphaTab/Platform/CSharp/AlphaSynthWorkerApiBase.cs +++ b/src.csharp/AlphaTab/Platform/CSharp/AlphaSynthWorkerApiBase.cs @@ -59,6 +59,12 @@ public double MasterVolume set => DispatchOnWorkerThread(() => { Player.MasterVolume = value; }); } + public double CountInVolume + { + get => Player.CountInVolume; + set => DispatchOnWorkerThread(() => { Player.CountInVolume = value; }); + } + public double MetronomeVolume { get => Player.MetronomeVolume; @@ -111,6 +117,11 @@ public void Pause() DispatchOnWorkerThread(() => { Player.Pause(); }); } + public void PlayOneTimeMidiFile(MidiFile midiFile) + { + DispatchOnWorkerThread(() => { Player.PlayOneTimeMidiFile(midiFile); }); + } + public void PlayPause() { DispatchOnWorkerThread(() => { Player.PlayPause(); }); @@ -121,9 +132,14 @@ public void Stop() DispatchOnWorkerThread(() => { Player.Stop(); }); } - public void LoadSoundFont(Uint8Array data) + public void ResetSoundFonts() + { + DispatchOnWorkerThread(() => { Player.ResetSoundFonts(); }); + } + + public void LoadSoundFont(Uint8Array data, bool append) { - DispatchOnWorkerThread(() => { Player.LoadSoundFont(data); }); + DispatchOnWorkerThread(() => { Player.LoadSoundFont(data, append); }); } public void LoadMidiFile(MidiFile midi) diff --git a/src.csharp/AlphaTab/Platform/CSharp/GdiCanvas.cs b/src.csharp/AlphaTab/Platform/CSharp/GdiCanvas.cs index d43d460c6..e3c8bd361 100644 --- a/src.csharp/AlphaTab/Platform/CSharp/GdiCanvas.cs +++ b/src.csharp/AlphaTab/Platform/CSharp/GdiCanvas.cs @@ -1,4 +1,5 @@ -using AlphaTab.Rendering.Glyphs; +using AlphaTab.Model; +using AlphaTab.Rendering.Glyphs; using System; using System.Collections.Generic; using System.Drawing; diff --git a/src.csharp/AlphaTab/Platform/CSharp/ManagedUiFacade.cs b/src.csharp/AlphaTab/Platform/CSharp/ManagedUiFacade.cs index 30725a2ef..a3faa8fb9 100644 --- a/src.csharp/AlphaTab/Platform/CSharp/ManagedUiFacade.cs +++ b/src.csharp/AlphaTab/Platform/CSharp/ManagedUiFacade.cs @@ -51,7 +51,7 @@ public IAlphaSynth CreateWorkerPlayer() using (var ms = new MemoryStream()) { sf.CopyTo(ms); - player.LoadSoundFont(new Uint8Array(ms.ToArray())); + player.LoadSoundFont(new Uint8Array(ms.ToArray()), false); } }); return player; @@ -124,19 +124,19 @@ public bool Load(object? data, Action success, Action error) } } - public bool LoadSoundFont(object? data) + public bool LoadSoundFont(object? data, bool append) { switch (data) { case byte[] bytes: - Api.Player.LoadSoundFont(new Uint8Array(bytes)); + Api.Player.LoadSoundFont(new Uint8Array(bytes), append); return true; case Stream stream: { using (var ms = new MemoryStream()) { stream.CopyTo(ms); - Api.Player.LoadSoundFont(new Uint8Array(ms.ToArray())); + Api.Player.LoadSoundFont(new Uint8Array(ms.ToArray()), append); } return true; diff --git a/src.csharp/Directory.Build.props b/src.csharp/Directory.Build.props index 97b7a9c47..59bef48db 100644 --- a/src.csharp/Directory.Build.props +++ b/src.csharp/Directory.Build.props @@ -2,8 +2,8 @@ portable true - 1.0.1 - 1.0.1.0 + 1.1.0 + 1.1.0.0 $(AssemblyVersion) Danielku15 CoderLine diff --git a/src.csharp/Samples/AlphaTab.Samples.Player/Program.cs b/src.csharp/Samples/AlphaTab.Samples.Player/Program.cs index 8d0b93aab..285bce071 100644 --- a/src.csharp/Samples/AlphaTab.Samples.Player/Program.cs +++ b/src.csharp/Samples/AlphaTab.Samples.Player/Program.cs @@ -44,7 +44,7 @@ private static void Main(string[] args) currentTime, e.CurrentTick, endTime, e.EndTick); }); player.ReadyForPlayback.On(() => { Console.WriteLine("Ready for playback"); }); - player.LoadSoundFont(File.ReadAllBytes(args[1])); + player.LoadSoundFont(File.ReadAllBytes(args[1]), false); player.LoadMidiFile(midiFile); Console.WriteLine("Start playing"); diff --git a/src.csharp/Samples/AlphaTab.Samples.Wpf/App.xaml b/src.csharp/Samples/AlphaTab.Samples.Wpf/App.xaml index 85e9fd4d0..9aa2eb59f 100644 --- a/src.csharp/Samples/AlphaTab.Samples.Wpf/App.xaml +++ b/src.csharp/Samples/AlphaTab.Samples.Wpf/App.xaml @@ -1,13 +1,13 @@ - + - -