Skip to content

Commit 14074e8

Browse files
committed
doc: README
1 parent bdfb945 commit 14074e8

File tree

1 file changed

+81
-88
lines changed

1 file changed

+81
-88
lines changed

README.md

Lines changed: 81 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,121 @@
1-
![MuseScore](mscore/data/musescore_logo_full.png)
2-
Music notation and composition software
31

4-
[![Travis CI](https://secure.travis-ci.org/musescore/MuseScore.svg?branch=master)](https://travis-ci.org/musescore/MuseScore)
5-
[![Appveyor](https://ci.appveyor.com/api/projects/status/bp3ww6v985i64ece/branch/master?svg=true)](https://ci.appveyor.com/project/MuseScore/musescore/branch/master)
6-
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
2+
# webmscore
73

8-
MuseScore is an open source and free music notation software. For support, contribution, and bug reports visit MuseScore.org. Fork and make pull requests!
4+
> MuseScore's libmscore (the core library) in WebAssembly!
95
106
## Features
117

12-
- WYSIWYG design, notes are entered on a "virtual notepaper"
13-
- TrueType font(s) for printing & display allows for high quality scaling to all sizes
14-
- Easy & fast note entry
15-
- Many editing functions
16-
- MusicXML import/export
17-
- MIDI (SMF) import/export
18-
- MuseData import
19-
- MIDI input for note entry
20-
- Integrated sequencer and software synthesizer to play the score
21-
- Print or create pdf files
8+
* Parse `mscz` file data
9+
* Get score metadata
10+
* Generate music sheets in SVG/PNG/PDF formats
11+
* Generate MIDI
12+
* Export as MusicXML compressed/uncompressed
13+
* Generate position information of measures or segments on the generated sheets
2214

23-
## More info
24-
- [MuseScore Homepage](https://musescore.org)
25-
- [MuseScore Git workflow instructions](https://musescore.org/en/developers-handbook/git-workflow)
26-
- [How to compile MuseScore?](https://musescore.org/en/developers-handbook/compilation)
15+
## Installation
2716

28-
## License
29-
MuseScore is licensed under GPL version 2.0. See [LICENSE.GPL](https://github.com/musescore/MuseScore/blob/master/LICENSE.GPL) in the same directory.
17+
The package is available on npm: https://www.npmjs.com/package/webmscore
3018

31-
## Packages
32-
- **aeolus:** Clone of [Aeolus](http://kokkinizita.linuxaudio.org/linuxaudio/aeolus/). Disabled by default in the stable releases. See http://dev-list.musescore.org/Aeolus-Organ-Synth-td7578364.html. Kept as an example of how to integrate with a complex synthesizer.
19+
```sh
20+
npm i webmscore
21+
```
3322

34-
- **assets:** Graphical assets, use them if you need a MuseScore icon. For logo, color, etc., see https://musescore.org/en/about/logos-and-graphics.
23+
## Use webmscore
3524

36-
- **awl:** Audio Widget Library, from the MusE project.
25+
### Load in browsers
3726

38-
- **build:** Utility files for build.
27+
```html
28+
<!-- using a CDN -->
29+
<script src="https://cdn.jsdelivr.net/npm/webmscore/webmscore.js"></script>
30+
<script>
31+
WebMscore.ready.then(async () => {
32+
const score = await WebMscore.load(name, msczdata)
33+
})
34+
</script>
35+
```
3936

40-
- **bww2mxml:** Command line tool to convert BWW files to MusicXML. BWW parser is used by MuseScore to import BWW files.
37+
### Run in Node.js directly
4138

42-
- **demos:** A few MuseScore files to demonstrate what can be done.
39+
Minimum version: v8.9.0 with ES Modules support
4340

44-
- **fluid:** Clone of [FluidSynth@sourceforge](https://sourceforge.net/projects/fluidsynth), ported to C++ and customized. Code now at [fluidsynth@github](https://github.com/FluidSynth/fluidsynth).
41+
The `--experimental-modules` flag is required for Node.js versions under 14,
42+
Also require `"type": "module"` in `package.json`
4543

46-
- **fonts:** Contains fontforge source (sfd) + ttf/otf fonts. MuseScore includes the "Emmentaler" font from the Lilypond project.
44+
```js
45+
import WebMscore from 'webmscore'
46+
WebMscore.ready.then(async () => {
47+
const score = await WebMscore.load(name, msczdata)
48+
})
49+
```
4750

48-
- **libmscore:** Data model of MuseScore.
51+
### Use a JavaScript bundler
4952

50-
- **mscore:** Main code for the MuseScore UI.
53+
*(TBD)*
5154

52-
- **msynth:** Abstract interface to Fluid + Aeolus.
55+
### Note:
5356

54-
- **mtest:** Unit testing using QTest.
57+
**Important!**
5558

56-
- **omr:** Optical music recognition.
59+
Copy `webmscore.lib.data` and `webmscore.lib.wasm` to your artifact dir (the same directory as your final js bundle).
5760

58-
- **share:** Files moved to /usr/share/... on install.
61+
## Compiling
5962

60-
- **test:** Old tests. Should move to mtest.
63+
1. Install essential tools like `make`, `cmake`, `llvm`, etc.
6164

62-
- **vtest:** Visual tests. Compare reference images with current implementation.
65+
2. Install `emscripten` using `emsdk`
66+
https://emscripten.org/docs/getting_started/downloads.html
6367

64-
- **thirdparty:** Contains projects which are included for convenience, usually to integrate them into the build system to make them available for all supported platforms.
68+
3. Get and compile Qt5 for WebAssembly
6569

66-
- **thirdparty/rtf2html:**
67-
Used for capella import. Clone from [rtf2html@sourceforge](https://sourceforge.net/projects/rtf2html), code now at [rtf2html@github](https://github.com/lvu/rtf2html).
70+
```sh
71+
CPUS=$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || 8)
6872

69-
- **thirdparty/dtl:**
70-
Used for the score comparison tool. [Diff Template Library](https://github.com/cubicdaiya/dtl).
73+
QT_PATH=/usr/qt515/
74+
# If you want to use other directory, make sure you changed `PREFIX_PATH` to your Qt5WASM installation dir in the Makefile
7175

72-
- **thirdparty/ofqf:**
73-
OSC server interface. Based on [OSC for Qt4](http://www.arnoldarts.de/projects/ofqf/), code now at [ofq@github](https://github.com/kampfschlaefer/ofq).
76+
git clone git://code.qt.io/qt/qt5.git --depth=1 -b 5.15.0 $QT_PATH
77+
# or
78+
# download and extract qt-everywhere 5.15.0 (https://download.qt.io/development_releases/qt/5.15/5.15.0-rc/single/ later https://download.qt.io/official_releases/qt/5.15/5.15.0/single/)
7479

75-
- **thirdparty/singleapp:**
76-
Clone from [Qt Single Application](https://github.com/qtproject/qt-solutions/tree/master/qtsingleapplication).
80+
cd $QT_PATH
81+
./configure -xplatform wasm-emscripten -nomake examples -prefix $PWD/qtbase
82+
make -j$CPUS
83+
```
7784

78-
- **thirdparty/portmidi:**
79-
Clone from [PortMidi](https://sourceforge.net/projects/portmedia/).
85+
4. Compile `webmscore`
8086

81-
- **thirdparty/beatroot:**
82-
It's a core part of [BeatRoot Vamp Plugin](https://code.soundsoftware.ac.uk/projects/beatroot-vamp/repository) by Simon Dixon and Chris Cannam, used in MIDI import for beat detection.
87+
```sh
88+
make release
89+
```
8390

91+
Build artifacts are in the [web-public](./web-public) directory
8492

85-
## Building
86-
**Read the developer handbook for a [complete build walkthrough](https://musescore.org/en/developers-handbook/compilation) and a list of dependencies.**
93+
## Browser Support
8794

88-
### Getting sources
89-
If using git to download repo of entire code history, type:
95+
All modern browsers
9096

91-
git clone https://github.com/musescore/MuseScore.git
92-
cd MuseScore
97+
| Name | [Minimum Version](https://caniuse.com/#feat=wasm) |
98+
|---|---|
99+
| Chrome | 57 |
100+
| Firefox | 53, 52 (non-ESR) |
101+
| Edge | 16 (Fall Creators Update) |
102+
| Safari | 11 |
103+
| IE | NO! |
104+
| Other browsers | I don't know! |
93105

94-
Otherwise, you can just download the latest source release tarball from the [Releases page](https://github.com/musescore/MuseScore/releases), and then from your download directory type:
106+
Only tested on the latest version of Chrome and Firefox.
95107

96-
tar xzf MuseScore-x.x.x.tar.gz
97-
cd MuseScore-x.x.x
108+
## Examples
98109

99-
### Release Build
100-
To compile MuseScore, type:
110+
see files in the [web-example](./web-example) directory
101111

102-
make release
112+
```sh
113+
cd ./web-example
114+
npm i
115+
npm start # Node.js example
116+
npm run start:browser # browser example
117+
```
103118

104-
If something goes wrong, then remove the whole build subdirectory with `make clean` and start new with `make release`.
119+
---
105120

106-
### Running
107-
To start MuseScore, type:
108-
109-
./build.release/mscore/mscore
110-
111-
The Start Center window will appear on every invocation until you disable that setting via the "Preferences" dialog.
112-
113-
### Installing
114-
To install to default prefix using root user, type:
115-
116-
sudo make install
117-
118-
### Debug Build
119-
A debug version can be built by doing `make debug` instead of `make release`.
120-
121-
To run the debug version, type:
122-
123-
./build.debug/mscore/mscore
124-
125-
### Testing
126-
See [mtest/README.md](/mtest/README.md) or [the developer handbook](https://musescore.org/handbook/developers-handbook/finding-your-way-around/automated-tests) for instructions on how to run the test suite.
127-
128-
The new [script testing facility](https://musescore.org/node/278278) is also available to create your own automated tests. Please try it out!
121+
webmscore is part of the [LibreScore](https://github.com/LibreScore/) project.

0 commit comments

Comments
 (0)