All notable changes to this project will be documented in this file.
- Stream audio file exporting
- Python API
- Build over the
offscreen
Qt Platform Plugin so that the wasm binary size has been significantly reducedwebmscore.lib.wasm
:
10.47 MB -> 7.42 MBwebmscore.lib.mem.wasm
:
4.97 MB -> 3.92 MB
SynthRes.chunk
becomes non-interleaved float32 PCM data
SynthRes.chunk = Float32Array[ channelA 512 frames, channelB 512 frames ]
- Webpack import
- Improve
synthAudioBatch
performance
- Synthesize audio frames in bulk (n * 512 frames)
const fn = await score.synthAudioBatch(starttime, batchSize)
for (...) {
const resArr = await fn(cancel?)
}
- Emit detailed debug info (function names) in a separate
.symbols
file
This saves 2.45 MB (23%) uncompressed, 0.42 MB (13%) brotli'd for the generated wasm file, compared to v0.19.1
.
How to look up function names in the .symbols file?
RuntimeError: function signature mismatch
at wasm-function[1078]:0x315ac
at wasm-function[28467]:0x99f067
...
webmscore.lib.symbols
1078:Ms::Element::abbox() const
...
28467:Ms::savePng(Ms::Score*, QIODevice*, int, bool, bool)
- Support loading Guitar Pro files into webmscore
await WebMscore.load(format: 'gtp' | 'gp3' | 'gp4' | 'gp5' | 'gpx' | 'gp' | 'ptb', data, fonts, doLayout)
- Generate detailed debug info
// Before
RuntimeError: function signature mismatch
at <anonymous>:wasm-function[1117]:0x359ec
at <anonymous>:wasm-function[28469]:0x99e040
...
// After
RuntimeError: function signature mismatch
at Ms::Element::abbox() const (wasm-function[1117]:0x359ec)
at Ms::savePng(Ms::Score*, QIODevice*, int, bool, bool) (wasm-function[28469]:0x99e040)
...
- Support loading MusicXML (
musicxml
or compressedmxl
) and MIDI files into webmscore
await WebMscore.load(format: 'musicxml' | 'mxl' | 'midi', data, fonts, doLayout)
- Support MSCZ/MSCX internal file format version 3.02
- Merge upstream v3.6.0 into webmscore, see the changelogs there
- The
fonts
parameter inWebMscore.load
can now be passed as type ofPromisable<Uint8Array[]>
.
This allows webmscore to initiate fonts and wasm assets simultaneously.
- For Webpack build, asset files (
webmscore.lib.*
) will be served via the jsDelivr CDN by default. (importingwebmscore
resolves towebmscore/webmscore.cdn.mjs
)
So those files will no longer appear in yourdist
directory, and the workaround is no longer needed.
- Support raw PCM audio data export (for future internal use)
- The original error stack of worker errors is reported in the property
originalStack
- The workaround for Webpack 4 is no longer enabled by default. To enable it, run
cd node_modules/webmscore && npm run install:webpack
after package installation.
- The legacy browser support is removed
- Remove the previous SoundFont file when
setSoundFont
is called multiple times
- Expose
setSoundFont
as a static method for Node.js
This allows loading soundfonts in advance, before any score is loaded.
- SoundFont related bug (
2b07ee9
)
- Data files are in
.wasm
file extension for Webpack. This makes web servers compress those files automatically.
- WebMscore web worker no longer extends the native
Worker
class
- Support legacy browsers that have no WebAssembly support
- ES5 compilation
- ES5 Compatibility (Webpack only)
- Handle exceptions sent from the webmscore web worker
- Fixed an issue that webmscore catches all (and irrelevant) uncaught exceptions in Node.js
- Allow to set custom
stdout
andstderr
(Node.js exclusive feature)
See the example in web-public/src/index.js
- Throw file loading error instead of failing silently
- Support MP3 export
await score.saveAudio('mp3')
- The
instrumentName
field of parts in Metadata JSON
- Commonjs Compatibility
- The return value of
synthAudio
's iterator function has changed, seeinterface SynthRes
in schemas.ts
no production code change
-
The
.destory()
method is now having thesoft
parameter (default:true
)true
: destroy the score instance only, orfalse
: destroy the whole WebMscore context
To retrieve the default
.destory()
behavior of webmscore in WebWorker prior to v0.9.0, setsoft
tofalse
- Don't transfer the ownership of SoundFont data to the webworker context
- Webpack Compatibility
- Use WOFF2 fonts and LZ4 compression to reduce the data file size (significantly)
- TypeScript declaration (
.d.ts
) files
- The
pageSize
(in pixels) field in position JSON (measurePositions()
orsegmentPositions()
)
-
Save part score as MSCZ/MSCX file
-
Boost Mode (set the
doLayout
parameter inWebMscore.load
tofalse
) if you only need score metadata or midi file
- Fixed the runtime error in
processSynth
-
Generate audio files in WAV, OGG, or FLAC formats
-
Synthesize raw audio frames, can be used in the Web Audio API
A soudfont (sf2/sf3) file must be set using
setSoundFont
- CJK fonts are no longer bundled inside webmscore. If you would like to export sheet PDF/images with those characters, pass an array of font file (ttf/ttc/otf/otc/woff/etc.) data (Uint8Array) to the
fonts
parameter inWebMscore.load
- Always load scores in page mode
- Generate excerpts (if no excerpts found) from parts using
await score.generateExcerpts()
- The
name
param is replaced byfiletype
("mscz"
or"mscx"
) inWebMscore.load
-
Export individual parts (or
excerpt
s, linked parts). Set the excerpt range of exported files usingawait score.setExcerptId(n)
. -
Excerpt information is available in score metadata
Changelog of early versions are omitted