An example of magenta-js/music/src/core/viewer
derived Visualizer using staffrender library to display music score on browsers through SVG.
This is an alpha version which will serve to two purposses:
- To teach how to develop and compile some other
magenta-js/music/src/core/viewer
derived classes with different technologies (likethree.js
and the like). - To act as stage to test the contribution of
staff_svg_visualizer.ts
tomagenta-js/music/src/core/viewer
as a first class citizen of the Magenta ecosystem. This will allow testing it avoiding circular dependencies.
To try it out, you must follow this four simple steps:
- Clone the repo and
mv
to the root directory wherepackage.json
is. - Do
yarn install
to install allnpm
dependencies. Do install yarn throughbrew install yarn
(in Mac), or similar, if you didn't it before. - Do
yarn build
to compile the TypeScript code to JavaScript. - Do
yarn serve
to launch a local web server you can access with your browser inlocalhost:8080
- Due
VisualizerConfig
has not been exported from @magenta package it has been needed to be re-declared it until exportation PR gets accepted in master. tsconfig.json
andwebpack.config.js
could have extra parameters which will be excluded in future versions.tsconfig.json
forces the compilation to theES6
version (ECMAScript 2015, a precise variant of javascript), avoidingES5
for simplicity sake. Magenta currently deals with several compiling versions.webpack.config.js
forces the creation of reference maps linking original .ts to compiled .js versions in order to allow debugging (for instance through Chrome inspector). If you want to avoid it in final version, remove linedevtool: 'inline-source-map'
.- There are no known issues, but the uncompleted features of staffrender. They are all welcome in the repo's issue placeholder.