UNPKG

18 kBHTMLView Raw
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <title>JSDoc: Global</title>
6
7 <script src="scripts/prettify/prettify.js"> </script>
8 <script src="scripts/prettify/lang-css.js"> </script>
9 <!--[if lt IE 9]>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11 <![endif]-->
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">Global</h1>
21
22
23
24
25
26
27<section>
28
29<header>
30
31 <h2></h2>
32
33
34</header>
35
36<article>
37 <div class="container-overview">
38
39
40
41
42
43
44<dl class="details">
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77</dl>
78
79
80
81
82 </div>
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97 <h3 class="subsection-title">Methods</h3>
98
99
100
101
102
103
104 <h4 class="name" id="convert2Abc"><span class="type-signature"></span>convert2Abc<span class="signature">(data)</span><span class="type-signature"> &rarr; {string}</span></h4>
105
106
107
108
109
110<div class="description">
111 Returns a string in abc notation from given data
112</div>
113
114
115
116
117
118
119
120
121
122 <h5>Parameters:</h5>
123
124
125<table class="params">
126 <thead>
127 <tr>
128
129 <th>Name</th>
130
131
132 <th>Type</th>
133
134
135
136
137
138 <th class="last">Description</th>
139 </tr>
140 </thead>
141
142 <tbody>
143
144
145 <tr>
146
147 <td class="name"><code>data</code></td>
148
149
150 <td class="type">
151
152
153<span class="param-type">object</span>
154
155
156
157 </td>
158
159
160
161
162
163 <td class="description last">The JSON string data that should be transformed to abc</td>
164 </tr>
165
166
167 </tbody>
168</table>
169
170
171
172
173
174
175<dl class="details">
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202 <dt class="tag-source">Source:</dt>
203 <dd class="tag-source"><ul class="dummy"><li>
204 <a href="index.js.html">index.js</a>, <a href="index.js.html#line321">line 321</a>
205 </li></ul></dd>
206
207
208
209
210
211
212
213</dl>
214
215
216
217
218
219
220
221
222
223
224
225
226
227<h5>Returns:</h5>
228
229
230
231
232<dl>
233 <dt>
234 Type
235 </dt>
236 <dd>
237
238<span class="param-type">string</span>
239
240
241 </dd>
242</dl>
243
244
245
246
247
248
249
250
251
252
253 <h4 class="name" id="convert2JSON"><span class="type-signature"></span>convert2JSON<span class="signature">(data)</span><span class="type-signature"> &rarr; {string}</span></h4>
254
255
256
257
258
259<div class="description">
260 Returns a string in json notation from given abc data
261</div>
262
263
264
265
266
267
268
269
270
271 <h5>Parameters:</h5>
272
273
274<table class="params">
275 <thead>
276 <tr>
277
278 <th>Name</th>
279
280
281 <th>Type</th>
282
283
284
285
286
287 <th class="last">Description</th>
288 </tr>
289 </thead>
290
291 <tbody>
292
293
294 <tr>
295
296 <td class="name"><code>data</code></td>
297
298
299 <td class="type">
300
301
302<span class="param-type">object</span>
303
304
305
306 </td>
307
308
309
310
311
312 <td class="description last">The abc string that should be transformed to json</td>
313 </tr>
314
315
316 </tbody>
317</table>
318
319
320
321
322
323
324<dl class="details">
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351 <dt class="tag-source">Source:</dt>
352 <dd class="tag-source"><ul class="dummy"><li>
353 <a href="index.js.html">index.js</a>, <a href="index.js.html#line330">line 330</a>
354 </li></ul></dd>
355
356
357
358
359
360
361
362</dl>
363
364
365
366
367
368
369
370
371
372
373
374
375
376<h5>Returns:</h5>
377
378
379
380
381<dl>
382 <dt>
383 Type
384 </dt>
385 <dd>
386
387<span class="param-type">string</span>
388
389
390 </dd>
391</dl>
392
393
394
395
396
397
398
399
400
401
402 <h4 class="name" id="createJsonFromLines"><span class="type-signature"></span>createJsonFromLines<span class="signature">(tune)</span><span class="type-signature"> &rarr; {object}</span></h4>
403
404
405
406
407
408<div class="description">
409 Creates json object from abc tunes object
410</div>
411
412
413
414
415
416
417
418
419
420 <h5>Parameters:</h5>
421
422
423<table class="params">
424 <thead>
425 <tr>
426
427 <th>Name</th>
428
429
430 <th>Type</th>
431
432
433
434
435
436 <th class="last">Description</th>
437 </tr>
438 </thead>
439
440 <tbody>
441
442
443 <tr>
444
445 <td class="name"><code>tune</code></td>
446
447
448 <td class="type">
449
450
451<span class="param-type">object</span>
452
453
454
455 </td>
456
457
458
459
460
461 <td class="description last">The parsed tune object</td>
462 </tr>
463
464
465 </tbody>
466</table>
467
468
469
470
471
472
473<dl class="details">
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500 <dt class="tag-source">Source:</dt>
501 <dd class="tag-source"><ul class="dummy"><li>
502 <a href="index.js.html">index.js</a>, <a href="index.js.html#line149">line 149</a>
503 </li></ul></dd>
504
505
506
507
508
509
510
511</dl>
512
513
514
515
516
517
518
519
520
521
522
523
524
525<h5>Returns:</h5>
526
527
528
529
530<dl>
531 <dt>
532 Type
533 </dt>
534 <dd>
535
536<span class="param-type">object</span>
537
538
539 </dd>
540</dl>
541
542
543
544
545
546
547
548
549
550
551 <h4 class="name" id="getAbcClef"><span class="type-signature"></span>getAbcClef<span class="signature">(sign)</span><span class="type-signature"> &rarr; {string}</span></h4>
552
553
554
555
556
557<div class="description">
558 Returns the key for abc notation from given fifths
559</div>
560
561
562
563
564
565
566
567
568
569 <h5>Parameters:</h5>
570
571
572<table class="params">
573 <thead>
574 <tr>
575
576 <th>Name</th>
577
578
579 <th>Type</th>
580
581
582
583
584
585 <th class="last">Description</th>
586 </tr>
587 </thead>
588
589 <tbody>
590
591
592 <tr>
593
594 <td class="name"><code>sign</code></td>
595
596
597 <td class="type">
598
599
600<span class="param-type">string</span>
601
602
603
604 </td>
605
606
607
608
609
610 <td class="description last">The clef sign</td>
611 </tr>
612
613
614 </tbody>
615</table>
616
617
618
619
620
621
622<dl class="details">
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649 <dt class="tag-source">Source:</dt>
650 <dd class="tag-source"><ul class="dummy"><li>
651 <a href="index.js.html">index.js</a>, <a href="index.js.html#line95">line 95</a>
652 </li></ul></dd>
653
654
655
656
657
658
659
660</dl>
661
662
663
664
665
666
667
668
669
670
671
672
673
674<h5>Returns:</h5>
675
676
677
678
679<dl>
680 <dt>
681 Type
682 </dt>
683 <dd>
684
685<span class="param-type">string</span>
686
687
688 </dd>
689</dl>
690
691
692
693
694
695
696
697
698
699
700 <h4 class="name" id="getAbcKey"><span class="type-signature"></span>getAbcKey<span class="signature">(fifths, mode)</span><span class="type-signature"> &rarr; {string}</span></h4>
701
702
703
704
705
706<div class="description">
707 Returns the key for abc notation from given fifths
708</div>
709
710
711
712
713
714
715
716
717
718 <h5>Parameters:</h5>
719
720
721<table class="params">
722 <thead>
723 <tr>
724
725 <th>Name</th>
726
727
728 <th>Type</th>
729
730
731
732
733
734 <th class="last">Description</th>
735 </tr>
736 </thead>
737
738 <tbody>
739
740
741 <tr>
742
743 <td class="name"><code>fifths</code></td>
744
745
746 <td class="type">
747
748
749<span class="param-type">number</span>
750
751
752
753 </td>
754
755
756
757
758
759 <td class="description last">The position inside the circle of fifths</td>
760 </tr>
761
762
763
764 <tr>
765
766 <td class="name"><code>mode</code></td>
767
768
769 <td class="type">
770
771
772<span class="param-type">string</span>
773|
774
775<span class="param-type">undefined</span>
776
777
778
779 </td>
780
781
782
783
784
785 <td class="description last">The mode (major / minor)</td>
786 </tr>
787
788
789 </tbody>
790</table>
791
792
793
794
795
796
797<dl class="details">
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824 <dt class="tag-source">Source:</dt>
825 <dd class="tag-source"><ul class="dummy"><li>
826 <a href="index.js.html">index.js</a>, <a href="index.js.html#line85">line 85</a>
827 </li></ul></dd>
828
829
830
831
832
833
834
835</dl>
836
837
838
839
840
841
842
843
844
845
846
847
848
849<h5>Returns:</h5>
850
851
852
853
854<dl>
855 <dt>
856 Type
857 </dt>
858 <dd>
859
860<span class="param-type">string</span>
861
862
863 </dd>
864</dl>
865
866
867
868
869
870
871
872
873
874
875 <h4 class="name" id="getAbcNote"><span class="type-signature"></span>getAbcNote<span class="signature">(prevNote, curNote)</span><span class="type-signature"> &rarr; {string}</span></h4>
876
877
878
879
880
881<div class="description">
882 Returns a note in abc notation from given note object (JSON)
883</div>
884
885
886
887
888
889
890
891
892
893 <h5>Parameters:</h5>
894
895
896<table class="params">
897 <thead>
898 <tr>
899
900 <th>Name</th>
901
902
903 <th>Type</th>
904
905
906
907
908
909 <th class="last">Description</th>
910 </tr>
911 </thead>
912
913 <tbody>
914
915
916 <tr>
917
918 <td class="name"><code>prevNote</code></td>
919
920
921 <td class="type">
922
923
924<span class="param-type">object</span>
925
926
927
928 </td>
929
930
931
932
933
934 <td class="description last">The previous note</td>
935 </tr>
936
937
938
939 <tr>
940
941 <td class="name"><code>curNote</code></td>
942
943
944 <td class="type">
945
946
947<span class="param-type">object</span>
948
949
950
951 </td>
952
953
954
955
956
957 <td class="description last">The note that should be transformed to abc</td>
958 </tr>
959
960
961 </tbody>
962</table>
963
964
965
966
967
968
969<dl class="details">
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996 <dt class="tag-source">Source:</dt>
997 <dd class="tag-source"><ul class="dummy"><li>
998 <a href="index.js.html">index.js</a>, <a href="index.js.html#line105">line 105</a>
999 </li></ul></dd>
1000
1001
1002
1003
1004
1005
1006
1007</dl>
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021<h5>Returns:</h5>
1022
1023
1024
1025
1026<dl>
1027 <dt>
1028 Type
1029 </dt>
1030 <dd>
1031
1032<span class="param-type">string</span>
1033
1034
1035 </dd>
1036</dl>
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047 <h4 class="name" id="getAbcString"><span class="type-signature"></span>getAbcString<span class="signature">(input)</span><span class="type-signature"> &rarr; {string}</span></h4>
1048
1049
1050
1051
1052
1053<div class="description">
1054 Returns the abc notation string from given input
1055</div>
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065 <h5>Parameters:</h5>
1066
1067
1068<table class="params">
1069 <thead>
1070 <tr>
1071
1072 <th>Name</th>
1073
1074
1075 <th>Type</th>
1076
1077
1078
1079
1080
1081 <th class="last">Description</th>
1082 </tr>
1083 </thead>
1084
1085 <tbody>
1086
1087
1088 <tr>
1089
1090 <td class="name"><code>input</code></td>
1091
1092
1093 <td class="type">
1094
1095
1096<span class="param-type">object</span>
1097
1098
1099
1100 </td>
1101
1102
1103
1104
1105
1106 <td class="description last">The parsed input from input file</td>
1107 </tr>
1108
1109
1110 </tbody>
1111</table>
1112
1113
1114
1115
1116
1117
1118<dl class="details">
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145 <dt class="tag-source">Source:</dt>
1146 <dd class="tag-source"><ul class="dummy"><li>
1147 <a href="index.js.html">index.js</a>, <a href="index.js.html#line14">line 14</a>
1148 </li></ul></dd>
1149
1150
1151
1152
1153
1154
1155
1156</dl>
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170<h5>Returns:</h5>
1171
1172
1173
1174
1175<dl>
1176 <dt>
1177 Type
1178 </dt>
1179 <dd>
1180
1181<span class="param-type">string</span>
1182
1183
1184 </dd>
1185</dl>
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196 <h4 class="name" id="getJsonId"><span class="type-signature"></span>getJsonId<span class="signature">(data)</span><span class="type-signature"> &rarr; {string}</span></h4>
1197
1198
1199
1200
1201
1202<div class="description">
1203 Get id from abc string
1204</div>
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214 <h5>Parameters:</h5>
1215
1216
1217<table class="params">
1218 <thead>
1219 <tr>
1220
1221 <th>Name</th>
1222
1223
1224 <th>Type</th>
1225
1226
1227
1228
1229
1230 <th class="last">Description</th>
1231 </tr>
1232 </thead>
1233
1234 <tbody>
1235
1236
1237 <tr>
1238
1239 <td class="name"><code>data</code></td>
1240
1241
1242 <td class="type">
1243
1244 </td>
1245
1246
1247
1248
1249
1250 <td class="description last"></td>
1251 </tr>
1252
1253
1254 </tbody>
1255</table>
1256
1257
1258
1259
1260
1261
1262<dl class="details">
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289 <dt class="tag-source">Source:</dt>
1290 <dd class="tag-source"><ul class="dummy"><li>
1291 <a href="index.js.html">index.js</a>, <a href="index.js.html#line134">line 134</a>
1292 </li></ul></dd>
1293
1294
1295
1296
1297
1298
1299
1300</dl>
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314<h5>Returns:</h5>
1315
1316
1317
1318
1319<dl>
1320 <dt>
1321 Type
1322 </dt>
1323 <dd>
1324
1325<span class="param-type">string</span>
1326
1327
1328 </dd>
1329</dl>
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340 <h4 class="name" id="getKeyByValue"><span class="type-signature"></span>getKeyByValue<span class="signature">(object, value)</span><span class="type-signature"> &rarr; {string}</span></h4>
1341
1342
1343
1344
1345
1346<div class="description">
1347 Get object key by value
1348</div>
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358 <h5>Parameters:</h5>
1359
1360
1361<table class="params">
1362 <thead>
1363 <tr>
1364
1365 <th>Name</th>
1366
1367
1368 <th>Type</th>
1369
1370
1371
1372
1373
1374 <th class="last">Description</th>
1375 </tr>
1376 </thead>
1377
1378 <tbody>
1379
1380
1381 <tr>
1382
1383 <td class="name"><code>object</code></td>
1384
1385
1386 <td class="type">
1387
1388
1389<span class="param-type">object</span>
1390
1391
1392
1393 </td>
1394
1395
1396
1397
1398
1399 <td class="description last">The object to search in</td>
1400 </tr>
1401
1402
1403
1404 <tr>
1405
1406 <td class="name"><code>value</code></td>
1407
1408
1409 <td class="type">
1410
1411
1412<span class="param-type">string</span>
1413
1414
1415
1416 </td>
1417
1418
1419
1420
1421
1422 <td class="description last">The value to search for</td>
1423 </tr>
1424
1425
1426 </tbody>
1427</table>
1428
1429
1430
1431
1432
1433
1434<dl class="details">
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461 <dt class="tag-source">Source:</dt>
1462 <dd class="tag-source"><ul class="dummy"><li>
1463 <a href="index.js.html">index.js</a>, <a href="index.js.html#line305">line 305</a>
1464 </li></ul></dd>
1465
1466
1467
1468
1469
1470
1471
1472</dl>
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486<h5>Returns:</h5>
1487
1488
1489
1490
1491<dl>
1492 <dt>
1493 Type
1494 </dt>
1495 <dd>
1496
1497<span class="param-type">string</span>
1498
1499
1500 </dd>
1501</dl>
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512 <h4 class="name" id="getMusicJSON"><span class="type-signature"></span>getMusicJSON<span class="signature">(input)</span><span class="type-signature"> &rarr; {string}</span></h4>
1513
1514
1515
1516
1517
1518<div class="description">
1519 Returns the abc notation string from given input
1520</div>
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530 <h5>Parameters:</h5>
1531
1532
1533<table class="params">
1534 <thead>
1535 <tr>
1536
1537 <th>Name</th>
1538
1539
1540 <th>Type</th>
1541
1542
1543
1544
1545
1546 <th class="last">Description</th>
1547 </tr>
1548 </thead>
1549
1550 <tbody>
1551
1552
1553 <tr>
1554
1555 <td class="name"><code>input</code></td>
1556
1557
1558 <td class="type">
1559
1560
1561<span class="param-type">object</span>
1562
1563
1564
1565 </td>
1566
1567
1568
1569
1570
1571 <td class="description last">The parsed input from input file</td>
1572 </tr>
1573
1574
1575 </tbody>
1576</table>
1577
1578
1579
1580
1581
1582
1583<dl class="details">
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610 <dt class="tag-source">Source:</dt>
1611 <dd class="tag-source"><ul class="dummy"><li>
1612 <a href="index.js.html">index.js</a>, <a href="index.js.html#line68">line 68</a>
1613 </li></ul></dd>
1614
1615
1616
1617
1618
1619
1620
1621</dl>
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635<h5>Returns:</h5>
1636
1637
1638
1639
1640<dl>
1641 <dt>
1642 Type
1643 </dt>
1644 <dd>
1645
1646<span class="param-type">string</span>
1647
1648
1649 </dd>
1650</dl>
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661 <h4 class="name" id="Measure"><span class="type-signature"></span>Measure<span class="signature">()</span><span class="type-signature"></span></h4>
1662
1663
1664
1665
1666
1667<div class="description">
1668 Constructor for measure objects
1669</div>
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683<dl class="details">
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710 <dt class="tag-source">Source:</dt>
1711 <dd class="tag-source"><ul class="dummy"><li>
1712 <a href="index.js.html">index.js</a>, <a href="index.js.html#line223">line 223</a>
1713 </li></ul></dd>
1714
1715
1716
1717
1718
1719
1720
1721</dl>
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744</article>
1745
1746</section>
1747
1748
1749
1750
1751</div>
1752
1753<nav>
1754 <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>
1755</nav>
1756
1757<br class="clear">
1758
1759<footer>
1760 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)
1761</footer>
1762
1763<script> prettyPrint(); </script>
1764<script src="scripts/linenumber.js"> </script>
1765</body>
1766</html>
\No newline at end of file