1 | <!DOCTYPE html>
|
2 | <html lang="en">
|
3 | <head>
|
4 | <meta charset="utf-8">
|
5 | <title>JSDoc: Home</title>
|
6 |
|
7 | <script src="scripts/prettify/prettify.js"> </script>
|
8 | <script src="scripts/prettify/lang-css.js"> </script>
|
9 | |
10 |
|
11 |
|
12 | <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
13 | <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
14 | </head>
|
15 |
|
16 | <body>
|
17 |
|
18 | <div id="main">
|
19 |
|
20 | <h1 class="page-title">Home</h1>
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | <h3> </h3>
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | <section>
|
46 | <article><h1>musicjson2abc</h1><p><a href="https://travis-ci.org/freakimkaefig/musicjson2abc"><img src="https://travis-ci.org/freakimkaefig/musicjson2abc.svg?branch=master" alt="Build Status"></a>
|
47 | <a href="https://badge.fury.io/js/musicjson2abc"><img src="https://badge.fury.io/js/musicjson2abc.svg" alt="npm version"></a></p>
|
48 | <p>A command-line tool to convert musicJSON to abc notation
|
49 | An example of the used format of json is in <a href="https://github.com/freakimkaefig/musicjson2abc/blob/master/example.json">example.json</a>.</p>
|
50 | <p>This project is still under development. Feel free to use it and submit issues here.</p>
|
51 | <h2>Getting started</h2><p>Install the module with:</p>
|
52 | <pre class="prettyprint source lang-sh"><code>npm install -g musicjson2abc</code></pre><h2>Example</h2><pre class="prettyprint source lang-javascript"><code>var musicjson2abc = require('musicjson2abc');
|
53 |
|
54 | var abc = musicjson2abc.convert2Abc('{"id":"123456","attributes":{"divisions":4,"clef":{"sign":"G","line":2},"key":{"fifths":-1},"time":{"beats":3,"beat-type":4}},"measures":[{"attributes":{"repeat":{"left":false,"right":false}},"notes":[{"type":"quarter","duration": 4,"rest": false,"pitch": {"step":"C","octave":4,"alter":0,"accidental": "flat"},"$$hashKey":"object:1255"}]}]}');
|
55 |
|
56 | console.log(abc);
|
57 | // output:
|
58 | // X:123456
|
59 | // T:123456
|
60 | // M:3/4
|
61 | // L:1/16
|
62 | // K:F
|
63 | // _C4|
|
64 |
|
65 |
|
66 | var json = musicjson2abc.convert2JSON(abc);
|
67 | console.log(json);
|
68 | // output:
|
69 | // {"id":"123456","attributes":{"divisions":4,"clef":{"sign":"G","line":2},"key":{"fifths":-1},"time":{"beats":3,"beat-type":4}},"measures":[{"attributes":{"repeat":{"left":false,"right":false}},"notes":[{"type":"quarter","duration": 4,"rest": false,"pitch": {"step":"C","octave":4,"alter":0,"accidental": "flat"}}]}]}</code></pre><h2>Command line tool</h2><p>The command <code>musicjson2abc</code> accepts filepaths for input and output files.</p>
|
70 | <pre class="prettyprint source"><code>$ musicjson2abc --help
|
71 |
|
72 | Usage: musicjson2abc [options] <input> [output]
|
73 |
|
74 | Options:
|
75 |
|
76 | -h, --help output usage information
|
77 | -r, --reverse convert abc to json instead
|
78 | -d, --debug outputs debug information on stdout
|
79 | -V, --version output the version number
|
80 |
|
81 | Examples:
|
82 |
|
83 | $ musicjson2abc input.json output.abc
|
84 | $ musicjson2abc input.json output.abc -d
|
85 | $ musicjson2abc example.abc example.json -r
|
86 |
|
87 | Hint:
|
88 |
|
89 | The input file should be a valid json / abc file.
|
90 | No syntax checks performed.
|
91 | The output file will become a valid abc / json file.
|
92 | May overwrite existing files.</code></pre><h2>License</h2><p>Licensed under the MIT License. See <a href="https://github.com/freakimkaefig/musicjson2abc/blob/master/LICENSE">LICENSE</a> for further information.</p></article>
|
93 | </section>
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 | </div>
|
101 |
|
102 | <nav>
|
103 | <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#convert2Abc">convert2Abc</a></li><li><a href="global.html#convert2JSON">convert2JSON</a></li><li><a href="global.html#createJsonFromLines">createJsonFromLines</a></li><li><a href="global.html#getAbcClef">getAbcClef</a></li><li><a href="global.html#getAbcKey">getAbcKey</a></li><li><a href="global.html#getAbcNote">getAbcNote</a></li><li><a href="global.html#getAbcString">getAbcString</a></li><li><a href="global.html#getJsonId">getJsonId</a></li><li><a href="global.html#getKeyByValue">getKeyByValue</a></li><li><a href="global.html#getMusicJSON">getMusicJSON</a></li><li><a href="global.html#Measure">Measure</a></li></ul>
|
104 | </nav>
|
105 |
|
106 | <br class="clear">
|
107 |
|
108 | <footer>
|
109 | Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Sat Apr 23 2016 19:38:33 GMT+0200 (Mitteleuropäische Sommerzeit)
|
110 | </footer>
|
111 |
|
112 | <script> prettyPrint(); </script>
|
113 | <script src="scripts/linenumber.js"> </script>
|
114 | </body>
|
115 | </html> |
\ | No newline at end of file |