Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From bb366150962b55e3 To afc1222e0282b772
|
2022-02-16
| ||
| 15:53 | core: fix: bad setting of voice parameters in the tune header with possible crash - reported by Hudson Lacerda ... (check-in: 8a9b5595a4 user: jef tags: trunk) | |
|
2022-02-12
| ||
| 17:42 | New release v1.21.6 ... (check-in: afc1222e02 user: jef tags: trunk, v1.21.6) | |
| 15:42 | core: add !caesura!, !tick! and !short! ... (check-in: 21e5a0d63b user: jef tags: trunk) | |
|
2021-01-27
| ||
| 09:43 | util: abcweb: fix: accept class abc with other classes - ticket [f632b51e4d] ... (check-in: 16278b1c38 user: jef tags: trunk) | |
|
2021-01-24
| ||
| 18:23 | New release v1.20.17 ... (check-in: bb36615096 user: jef tags: trunk, v1.20.17) | |
| 18:21 | core: play: separate %%soundfont from the other fonts definitions ... (check-in: ec8cb878ad user: jef tags: trunk) | |
Added MIT.txt.
|
Changes to README.md.
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - - + + - + - + - - - - - |
<style>
p{margin-left:.5cm;max-width:21cm}
li{margin-left:.5cm;max-width:20cm}
li p{margin-left:0}
</style>
## abc2svg
|
| ︙ | |||
54 55 56 57 58 59 60 | 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 78 79 | - + - + - - + + | Once you see the textual abc code, click on the bookmarklet that you created. After a slight delay depending upon the complexity of the abc code, it should be replaced by a music representation or a list of the contents of the ABC file. Here are two bookmarklets that you can try. This |
| ︙ | |||
132 133 134 135 136 137 138 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 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 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | - + - + - + - - - - - - - + + - + - + | in the HTML <head> and put the music as ABC sequences in the <body>. [This example][4] demonstrates how to do it. (Note that, in the example, the paths are relative - see why below.) |
| ︙ | |||
272 273 274 275 276 277 278 | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | - + - - - + - + + + + + | You can automate the process of creating music sheets with **abc2svg** using shell scripts running a Javascript interpreter. The interfaces to the various scripts are different. Below you will find various scripts that I had to built. - `abcqjs` with `qjs` [QuickJS by Fabrice Bellard and Charlie Gordon][10] |
| ︙ | |||
314 315 316 317 318 319 320 | 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | - + + + + | - `toabw.js` This script outputs an Abiword file (ABW+SVG) that can be read by some word processors (abiword, libreoffice...). The word processor allows you to convert the file to many other formats from a command line. The abc2svg music font (`abc2svf.woff` or `abc2svg.ttf`) must be installed in the local system for displaying and/or converting the .abw file. Example: |
| ︙ | |||
434 435 436 437 438 439 440 | 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 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 501 502 503 504 505 506 507 508 509 510 511 512 513 514 | - + - - - + + - - - - - - + + + + + + + + - - - + + + + + + - - + - - + + + - - + + - + - + | [fullsvg documentation](http://moinejf.free.fr/abcm2ps-doc/fullsvg.xhtml) for more information). - Playing uses the HTML5 audio and/or the midi APIs. For audio, by default, abc2svg uses a sound font (format SF2) which is split into one file per instrument. This sound font is stored in the subdirectory `Scc1t2/`. |
| ︙ |
Changes to abc2svg.
| ︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | + - + + + + |
}
abc2svg.quit = function() {
process.exit(1)
}
abc2svg.readFile = function(fname) {
var fs = require("fs")
try {
|
| ︙ | |||
47 48 49 50 51 52 53 54 55 56 57 58 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | + + + + + - + |
}
// load the command line
m = require("abc2svg/cmdline");
global.user = m.user;
global.abc_cmd = m.abc_cmd
// set the ABC path
var path = process.env.ABCPATH
if (path)
abc2svg.path = path.split(':')
// main
var args = process.argv
args.shift();
args.shift()
|
Changes to abc2svg.ttf.
cannot compute difference between binary files
Changes to abcjsc.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | + + + + + + + + - + - + | #!/bin/sh # abc2svg with jsc (webkit2gtk) # search where are the abc2svg scripts c=$0 if [ `dirname $c` = . ]; then c=`which $c` fi if [ -L $c ]; then c=`realpath $c` fi |
| ︙ | |||
46 47 48 49 50 51 52 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | + - + + + + + + + + + + + + |
printErr: function(str) {
printErr(str)
},
quit: function() {
quit(1)
},
readFile: function(fname) {
try {
|
Added abcmjs.
|
Changes to abcnode.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 86 | + + + + + + + + + - + - + - + - + + - + + + + - + - + + + + + - + | :;# abc2svg with raw nodeJS # search where are the abc2svg scripts p=$0 if [ `dirname $p` = . ]; then p=`which $p` fi if [ -L $p ]; then p=`realpath $p` fi |
Changes to abcqjs.
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 | + + + + + + + + + + - + - - + - - - + - - - - - - - - - - + + - - + - + + + + - + |
:;# shell script to convert ABC or MEI music notation to other format
# using abc2svg and quickjs (https://bellard.org/quickjs/)
# search where are the abc2svg scripts
p=$0
if [ `dirname $p` = . ]; then
p=`which $p`
fi
if [ -L $p ]; then
p=`realpath $p`
fi
p=`dirname $p`
exec qjs --std -e '
var i,
args = scriptArgs,
core = "abc2svg-1.js",
|
Changes to abctopdf.
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + - - + - + - - + - + | :;# abctopdf # convert ABC to PDF using abc2svg and one of # - a chrome/chromium compatible web browser |
| ︙ | |||
84 85 86 87 88 89 90 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | - - + + - + + - + - + - - - - - - - - - - - + + + + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | else set -- "$@" "$a" fi shift done # check if some chromium-based browser is available |
Changes to build.
| ︙ | |||
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | + + | gen modules/gamelan.js > gamelan-$MAJOR.js gen modules/grid.js > grid-$MAJOR.js gen modules/grid2.js > grid2-$MAJOR.js gen modules/grid3.js > grid3-$MAJOR.js gen modules/jazzchord.js > jazzchord-$MAJOR.js gen modules/jianpu.js > jianpu-$MAJOR.js gen modules/mdnn.js > mdnn-$MAJOR.js gen modules/nns.js > nns-$MAJOR.js gen modules/MIDI.js > MIDI-$MAJOR.js gen modules/page.js modules/strftime.js > page-$MAJOR.js gen modules/pedline.js > pedline-$MAJOR.js gen modules/perc.js > perc-$MAJOR.js gen modules/wps.js modules/psvg.js > psvg-$MAJOR.js gen modules/roman.js > roman-$MAJOR.js gen modules/soloffs.js > soloffs-$MAJOR.js gen modules/sth.js > sth-$MAJOR.js gen modules/strtab.js > strtab-$MAJOR.js gen modules/temper.js > temper-$MAJOR.js cp editor/edit.css edit-$MAJOR.css |
| ︙ |
Changes to build.ninja.
| ︙ | |||
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | + + | build grid-$MAJOR.js: jscu modules/grid.js build grid2-$MAJOR.js: jscu modules/grid2.js build grid3-$MAJOR.js: jscu modules/grid3.js build jazzchord-$MAJOR.js: jscu modules/jazzchord.js build jianpu-$MAJOR.js: jscu modules/jianpu.js build mdnn-$MAJOR.js: jscu modules/mdnn.js build MIDI-$MAJOR.js: jscu modules/MIDI.js build nns-$MAJOR.js: jscu modules/nns.js build page-$MAJOR.js: jscu modules/page.js modules/strftime.js build pedline-$MAJOR.js: jscu modules/pedline.js build perc-$MAJOR.js: jscu modules/perc.js build psvg-$MAJOR.js: jscu modules/wps.js modules/psvg.js build roman-$MAJOR.js: jscu modules/roman.js build soloffs-$MAJOR.js: jscu modules/soloffs.js build sth-$MAJOR.js: jscu modules/sth.js build strtab-$MAJOR.js: jscu modules/strtab.js build temper-$MAJOR.js: jscu modules/temper.js build edit-$MAJOR.css: cp editor/edit.css |
| ︙ | |||
147 148 149 150 151 152 153 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | - - - + + + - + | abcemb-$MAJOR.js abcemb1-$MAJOR.js abcemb2-$MAJOR.js $ abcweb-$MAJOR.js abcweb1-$MAJOR.js abcweb2-$MAJOR.js chord-$MAJOR.js $ json-$MAJOR.js toaudio-$MAJOR.js snd-$MAJOR.js play-$MAJOR.js psvg-$MAJOR.js $ ambitus-$MAJOR.js break-$MAJOR.js capo-$MAJOR.js $ chordnames-$MAJOR.js clair-$MAJOR.js clip-$MAJOR.js $ combine-$MAJOR.js diag-$MAJOR.js equalbars-$MAJOR.js gamelan-$MAJOR.js $ grid-$MAJOR.js grid2-$MAJOR.js grid3-$MAJOR.js jianpu-$MAJOR.js $ |
Changes to cmdline.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 | - + + - + + + + + + + + + + + + + + + + + + + + - + - - - - - + + + - - + + + + + - - - - + - - - - - - - - - - - | // abc2svg - cmdline.js - command line // |
| ︙ | |||
108 109 110 111 112 113 114 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | - + | i -= 2 f = a[--i] a.splice(i, 1) a.push(f) } // arg_reorder() // if the first argument is a javascript file, load it |
| ︙ |
Changes to core/abc2svg.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | // abc2svg - abc2svg.js // |
| ︙ | |||
46 47 48 49 50 51 52 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | - - + + - + + + + + | // note heads FULL: 0, EMPTY: 1, OVAL: 2, OVALBARS: 3, SQUARE: 4, |
| ︙ | |||
169 170 171 172 173 174 175 176 177 178 179 180 181 182 | 173 174 175 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 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
"min+7": "m+7",
"aug7": "+7",
"7+5": "+7",
"7#5": "+7",
"sus": "sus4",
"7sus": "7sus4"
} // ch_alias
// extract one of the chord symbols
// With chords as "xxx(yyy)" or "[yyy];xxx"
// (!sel - default) returns "xxx" and (sel) returns "yyy"
abc2svg.cs_sel0 = /[\[(].*[\])]/g
abc2svg.cs_sel1 = /.*[\[(]|[\])].*/g
abc2svg.cs_filter = function(a_cs, sel) {
var i, cs,
tcs = ""
for (i = 0; i < a_cs.length; i++) {
cs = a_cs[i]
if (cs.type == 'g')
tcs += cs.text
}
return tcs.replace(sel ? abc2svg.cs_sel1 : abc2svg.cs_sel0, '')
} // cs_filter()
// font weight
// reference:
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
abc2svg.ft_w = {
thin: 100,
extralight: 200,
light: 300,
regular: 400,
medium: 500,
semi: 600,
demi: 600,
semibold: 600,
demibold: 600,
bold: 700,
extrabold: 800,
ultrabold: 800,
black: 900,
heavy: 900
}
abc2svg.ft_re = new RegExp('\
-?Thin|-?Extra Light|-?Light|-?Regular|-?Medium|\
-?[DS]emi|-?[DS]emi[ -]?Bold|\
-?Bold|-?Extra[ -]?Bold|-?Ultra[ -]?Bold|-?Black|-?Heavy/',
"i")
// simplify a rational number n/d
abc2svg.rat = function(n, d) {
var a, t,
n0 = 0,
d1 = 0,
n1 = 1,
|
| ︙ | |||
230 231 232 233 234 235 236 | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | - + | CLOSE_BRACE2 = 0x0200, OPEN_BRACKET2 = 0x0400, CLOSE_BRACKET2 = 0x0800, MASTER_VOICE = 0x1000, IN = 96, // resolution 96 PPI CM = 37.8, // 1 inch = 2.54 centimeter |
| ︙ | |||
278 279 280 281 282 283 284 | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | - + |
// utilities
function clone(obj, lvl) {
if (!obj)
return obj
var tmp = new obj.constructor
for (var k in obj)
if (obj.hasOwnProperty(k)) {
|
| ︙ |
Changes to core/deco.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | // abc2svg - deco.js - decorations // |
| ︙ | |||
48 49 50 51 52 53 54 | 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - + + - - + + - - + + - - - + + - - + - - + - - - - - - - - - - - + + + + + + + + + - - + + - + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - |
// up, // above the symbol
// val, // value
// x, // x offset
// y, // y offset
// }
var dd_tb = {}, // definition of the decorations
|
| ︙ | |||
166 167 168 169 170 171 172 | 170 171 172 173 174 175 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 203 204 205 206 207 208 209 210 211 | - + + + - - - + + + + + + + + + + + + + + + + - - + + | editorial: "42 0 0 0 0", "sacc-1": "3 sacc-1 6,4 4 4", sacc3: "3 sacc3 6,5 4 4", sacc1: "3 sacc1 6,4 4 4", courtesy: "43 0 0 0 0", "cacc-1": "3 cacc-1 0 0 0", cacc3: "3 cacc3 0 0 0", |
| ︙ | |||
207 208 209 210 211 212 213 | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - - - + + + |
}
}
return y
}
/* -- adjust the vertical offsets -- */
function y_set(st, up, x, w, y) {
|
| ︙ | |||
234 235 236 237 238 239 240 | 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | + + + + + + + + + + + + + + - - - + + + - + - + - + - + - + |
if (p_staff.bot[i] > y)
p_staff.bot[i] = y;
i++
}
}
}
// get the staff position
// - of the ornements
function up3(s, pos) {
switch (pos & 0x07) {
case C.SL_ABOVE:
return 1 // true
case C.SL_BELOW:
return 0 // false
}
if (s.multi)
return s.multi > 0
return 1 // true
} // up3()
|
| ︙ | |||
288 289 290 291 292 293 294 | 321 322 323 324 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 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | - + - - - + + + + - - - - + + - - - + + + - + - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - - + + + + + + - + - - + - - - - - - - + - - - + - + + - - - - + + + + + + + + | if (h < m) h = m; de.has_val = true; de.val = h; // de.x = s.x - xc; de.x -= xc; |
| ︙ | |||
420 421 422 423 424 425 426 427 428 429 430 431 432 | 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 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | + + + + + + - + - + + + |
s = de.s,
dd = de.dd,
de_prev;
// don't treat here the long decorations
if (de.ldst) // if long deco start
return
if ((de.pos & C.SL_ALI_MSK) == C.SL_CLOSE
|| ((de.pos & C.SL_ALI_MSK) == 0
&& s.fmt.dynalign < 0)) { // if no dynalign
d_upstaff(de) // then, do as above/below the staff
return
}
if (de.start) { // if long decoration
d_cresc(de)
return
}
de.val = dd.wl + dd.wr;
|
| ︙ | |||
501 502 503 504 505 506 507 | 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 | - - - + + - - - - - + + + + + + + + + + + - - + + + + + + - | x = de2.s.x + de.dd.wl + 2 de2.val -= de2.dd.wr if (de2.val < 8) de2.val = 8 } de.st = st |
| ︙ | |||
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 | 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 | + - + + - - - + + + - - - - + + + - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - + + + + + + + + + + - - + + - - + - - - + + + - - - - - - + + + + + + + + - - - + - - - - + + - - + - - - - + + + + + + + + + + + + + + + + + + + + + - - - + - - + - - - - + - - - + + - - + + + + + + + + - - - + + + + + + + + + | } de.lden = false; de.has_val = true; de.val = w; de.x = x; de.y = y de.up = up if (up) y += dd.h; y_set(st, up, x, w, y) if (up) s.ymx = s2.ymx = y else s.ymn = s2.ymn = y } |
| ︙ | |||
719 720 721 722 723 724 725 | 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 | - + - - - - + + + + |
wr = parseFloat(a[5])
if (isNaN(c_func)) {
error(1, null, "%%deco: bad C function value '$1'", a[1])
return //undefined
}
if (c_func > 10
|
| ︙ | |||
750 751 752 753 754 755 756 | 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 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 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 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 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 | - + + + + + + - + - + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - - + + - - - - - + + + + + - - + - + - + - - + - - - - + + + - + - + - - - + + + - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - - + + - + - + - - + + - + - - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + |
dd = {
name: nm
}
dd_tb[nm] = dd
}
/* set the values */
|
| ︙ | |||
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 | 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 | + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + - + - - |
case "lphr":
case "mphr":
case "sphr":
if (s.wr < 20)
s.wr = 20
break
}
// fall thru
default:
switch (dd.ty) {
case '<':
w = dd.wl + dd.wr + 6
if (wl < w)
wl = w
break
case '>':
w = dd.wl + dd.wr + 8
if (s.wr < w)
s.wr = w
break
}
break
}
}
|
| ︙ | |||
1072 1073 1074 1075 1076 1077 1078 | 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 | + + + - + |
if (de.m != undefined) {
note = s.notes[de.m];
if (note.shhd)
x += note.shhd * stv_g.scale;
/* center the dynamic marks between two staves */
/*fixme: KO when deco on other voice and same direction*/
} else if (dd.func == 6
&& ((de.pos & C.SL_ALI_MSK) == C.SL_CENTER
|| ((de.pos & C.SL_ALI_MSK) == 0
|
| ︙ | |||
1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 | 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 | + + |
//fixme: y_set is not used later!
if ((de.up && y2 > ym)
|| (!de.up && y2 < ym)) {
y = ym;
// y_set(st, de.up, de.x, de.val,
// (de.up ? y + dd.h : y)
// - staff_tb[st].y)
if (stv_g.scale != 1)
y += stv_g.dy / 2
}
}
}
// check if user JS decoration
uf = user[f]
if (uf && typeof(uf) == "function") {
|
| ︙ | |||
1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 | 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 | + - + |
anno_start(s, 'deco')
// if (de.flags.grace) {
// g_open(x, y, 0, .7, de.inv ? -.7 : 0);
// x = y = 0
// } else
if (de.inv) {
y = y + dd.h - dd.hd
g_open(x, y, 0, 1, -1);
x = y = 0
}
if (de.has_val) {
if (dd.func != 2 // if not !arpeggio!
|| stv_g.st < 0) // or not staff scale
// || voice_tb[s.v].scale != 1)
out_deco_val(x, y, f, de.val / stv_g.scale, de.defl)
else
out_deco_val(x, y, f, de.val, de.defl)
|
| ︙ | |||
1182 1183 1184 1185 1186 1187 1188 | 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 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 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 | - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + + - + - + - - + - - - + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + |
de.s.x = de.x = x;
de.defl.nost = true
}
}
/* -- create the deco elements, and treat the near ones -- */
function create_deco(s) {
|
| ︙ | |||
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 | 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 1611 1612 1613 1614 1615 1616 1617 1618 1619 | + - - + + + + - - + + |
de2 = {
s: s,
st: de.st,
dd: dd2,
ix: a_de.length - 1,
x: realwidth - 6,
y: s.y,
cont: true, // keep for next line
lden: true,
defl: {
noen: true
}
}
if (de2.x < s.x + 10)
de2.x = s.x + 10
if (de.m != undefined)
de2.m = de.m;
a_de.push(de2)
}
de2.start = de;
de2.defl.nost = de.defl.nost
|
| ︙ | |||
1440 1441 1442 1443 1444 1445 1446 | 1679 1680 1681 1682 1683 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 1711 1712 | - + - + |
for (i = 0; i < nd; i++) {
de = a_de[i];
dd = de.dd;
f = dd.func
if (f_note[f]
&& de.m == undefined)
|
| ︙ | |||
1481 1482 1483 1484 1485 1486 1487 | 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 | - + - + + + + + + + + + + + |
for (;;) {
if (!s.next)
break
s = s.next
if (s.rbstop)
break
}
|
| ︙ | |||
1546 1547 1548 1549 1550 1551 1552 | 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 | - + - - - |
w = s.rbstop ? 0 : 8
}
w = (s.x - x - w) // / staff_tb[p_voice.st].staffscale;
if (!s.next // 2nd ending at end of line
&& !s.rbstop
&& !p_voice.bar_start) { // continue on next line
|
| ︙ | |||
1584 1585 1586 1587 1588 1589 1590 | 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 | - + + + - + + + + - + | de = a_de[i]; dd = de.dd if (!dd) // if error continue if (!f_staff[dd.func] /* if not tied to the staff */ || de.m != undefined) // or head decoration continue |
| ︙ | |||
1680 1681 1682 1683 1684 1685 1686 | 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 | - - - + |
continue
}
break
}
// don't display the number twice
if (s.type != C.BAR || !s.bar_num) {
|
| ︙ | |||
1732 1733 1734 1735 1736 1737 1738 | 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 | - + - - + + | if (!any_nb) any_nb = true; w = w0 if (bar_num >= 10) w *= bar_num >= 100 ? 3 : 2 if (gene.curfont.pad) w += gene.curfont.pad * 2 |
| ︙ | |||
1760 1761 1762 1763 1764 1765 1766 | 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 | - + |
if (font_size)
param_set_font("measurefont", "* " + font_size.toString());
}
/* -- draw the parts and the tempo information -- */
/* (the staves are being defined) */
function draw_partempo(st, top) {
|
| ︙ | |||
1821 1822 1823 1824 1825 1826 1827 | 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 | + - + + + - - + + + - - + + + - + - + + - - - - - - + + + + + + - - + + - - - + |
}
}
/* then, put the parts */
/*fixme: should reduce vertical space if parts don't overlap tempo...*/
ymin = staff_tb[st].topbar + 6
for (s = tsfirst; s; s = s.ts_next) {
s2 = s.part
|
Changes to core/draw.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | // abc2svg - draw.js - draw functions // |
| ︙ | |||
77 78 79 80 81 82 83 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | - + |
delete s.a_gch
delete s.a_ly
delete s.a_dd;
delete s.tp
s.notes = clone(s.notes)
for (m = 0; m <= s.nhd; m++) {
note = s.notes[m] = clone(s.notes[m])
|
| ︙ | |||
210 211 212 213 214 215 216 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | - + - - - + + + + + + | } s.xs = s.x + x * scale; if (s == s2) break } // have flat beams on grace notes when asked |
| ︙ | |||
622 623 624 625 626 627 628 | 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | - - |
else if (s2.tmp)
unlksym(s2)
anno_stop(s1, 'beam')
}
/* -- draw the left side of the staves -- */
function draw_lstaff(x) {
|
| ︙ | |||
724 725 726 727 728 729 730 | 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 | - + |
}
}
var acc_nd = {} // cache of the microtonal accidentals
/* -- draw an accidental -- */
function draw_acc(x, y, a) {
|
| ︙ | |||
782 783 784 785 786 787 788 | 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 | - + + |
Abc.prototype.draw_hl = function(s) {
var i, j, n, note,
hla = [],
st = s.st,
p_staff = staff_tb[st]
// check if any helper line
|
| ︙ | |||
856 857 858 859 860 861 862 | 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 | - - - + |
flat_cl = new Int8Array([12, 18, 24, 9, 15, 21, 6]),
sharp1 = new Int8Array([-9, 12, -9, -9, 12, -9]),
sharp2 = new Int8Array([12, -9, 12, -9, 12, -9]),
flat1 = new Int8Array([9, -12, 9, -12, 9, -12]),
flat2 = new Int8Array([-12, 9, -12, 9, -12, 9])
Abc.prototype.draw_keysig = function(x, s) {
|
| ︙ | |||
912 913 914 915 916 917 918 | 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 | - + - + |
shift = sharp_cl[clef_ix];
p_seq = shift > 9 ? sharp1 : sharp2
for (i = 0; i < s.k_sf; i++) {
xygl(x, staffb + shift, "acc1");
shift += p_seq[i];
x += 5.5
}
|
| ︙ | |||
956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 | 956 957 958 959 960 961 962 963 964 965 966 967 968 969 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 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 | + + + + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - + + - - - - - - - + + |
notes: [{}]
}
for (i = 0; i < s.k_a_acc.length; i++) {
acc = s.k_a_acc[i];
shift = (s.k_y_clef // clef shift
+ acc.pit - 18) * 3
while (shift < -3) // let the accidentals inside the staff
shift += 21
while (shift > 27)
shift -= 21
if (i != 0
&& (shift > last_shift + 18
|| shift < last_shift - 18))
x -= 5.5 // no clash
else if (acc.acc != last_acc)
x += 3;
last_acc = acc.acc;
s2.x = x
s2.notes[0].pit = shift / 3 + 18;
// is this useful?
// s2.head = C.FULL
// s2.notes[0].shhd = 0
|
| ︙ | |||
1090 1091 1092 1093 1094 1095 1096 | 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 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 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - + - - - - - + + + + + + + + - - + + + - - - - + + + + + + + + + + + + - - - - - + - - - - - - - - - - - - + + - - - + - - - - - - - - - - - - - + + + | && p_staff.stafflines.length <= 2) y -= 6 /* semibreve a bit lower */ // draw the rest if (!s.notes[0].invis) // if not head replacement xygl(x, y + yb, rest_tb[i]) |
| ︙ | |||
1270 1271 1272 1273 1274 1275 1276 | 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 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 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 | + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
} else if (y3 < y0 - 4) {
y3 = y0 - 4;
x0 = last.x + 2;
y0 = last.y + 4
}
}
so.slur = {
x0: x0,
y0: y0,
|
| ︙ | |||
1330 1331 1332 1333 1334 1335 1336 | 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 | - + + |
function y_head(s, note) {
return staff_tb[s.st].y + 3 * (note.pit - 18)
}
/* -- draw m-th head with accidentals and dots -- */
/* (the staves are defined) */
// sets {x,y}_note
|
| ︙ | |||
1452 1453 1454 1455 1456 1457 1458 | 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 | - + - - + + + + + - - - - - - - - + |
set_color(old_color)
}
/* -- draw a note or a chord -- */
/* (the staves are defined) */
function draw_note(s,
fl) { // draw flags
|
| ︙ | |||
1513 1514 1515 1516 1517 1518 1519 | 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 | - - + | slen -= 5 + 5.4 } slen /= s.p_v.scale; out_trem(x1, staffb + slen, ntrem) } /* draw the note heads */ |
| ︙ | |||
1723 1724 1725 1726 1727 1728 1729 | 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 | - - - - + + - - + + - - + + - - + + - - - - - + + + + - - - - + + + + |
if (dir > 0) {
if (k1.stem > 0) {
x1 += 5
if (k1.beam_end
&& k1.nflags >= -1 /* if with a stem */
//fixme: check if at end of tuplet
&& !k1.in_tuplet) {
|
| ︙ | |||
1957 1958 1959 1960 1961 1962 1963 | 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 | - + - + |
if (dir > 0) {
if (height < .8 * y)
height = .8 * y
} else {
if (height > -.8 * y)
height = -.8 * y
}
|
| ︙ | |||
2168 2169 2170 2171 2172 2173 2174 | 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 | - + - - + + | s = s.next } } /* -- draw a tuplet -- */ /* (the staves are not yet defined) */ /* (delayed output) */ |
| ︙ | |||
2428 2429 2430 2431 2432 2433 2434 | 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 | - + - - - + + + - |
/* shift the slurs / decorations */
ym += 6
for (s3 = s1; ; s3 = s3.next) {
if (s3.st == upstaff) {
yy = ym + (s3.x - xm) * a
if (s3.ymx < yy)
s3.ymx = yy
|
| ︙ | |||
2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 | 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 | + + + + |
a = (y2 - y1) / (x2 - x1);
s0 = 3 * (s2.notes[0].pit - s1.notes[0].pit) / (x2 - x1)
if (s0 > 0) {
if (a < 0)
a = 0
else if (a > s0)
a = s0
if (a > .35)
a = .35
} else {
if (a > 0)
a = 0
else if (a < s0)
a = s0
if (a < -.35)
a = -.35
}
if (a * a < .1 * .1)
a = 0
/* shift down the bracket if needed */
dy = 0
for (s3 = s1; ; s3 = s3.next) {
|
| ︙ | |||
2501 2502 2503 2504 2505 2506 2507 | 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 | - - + + - + - - - + + + + + + + - |
y1 = ym + a * (x1 - xm);
y2 = ym + a * (x2 - xm);
/* shift the slurs / decorations */
ym -= 2
for (s3 = s1; ; s3 = s3.next) {
if (s3.st == upstaff) {
|
| ︙ | |||
2570 2571 2572 2573 2574 2575 2576 | 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 | - - + + + - + - + + - + + - - - + - - - + + + - - - - - - - - - - - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - + + - - - + + - - - - - - - - - + + + + + + + + - - - - + - + - - - - - + + + + + + - - - - + + + + + + + + - - - + + - - - - - - - - - + + + + + + - - + - - - - - - + - - - - - + - - + - + + - + - - - + + - + - - + - - - - - - - - - - + - - - + + - + - - + + - + |
if (s2.notes[m - 1].shhd < sh)
sh = s2.notes[m - 1].shhd
}
x2 += sh // * .6
}
switch (job) {
|
| ︙ | |||
2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 | 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 | + - - - + + - + + + + + + + + + + + + + + + |
p_st.bot[i] = y
i++
}
}
} // set_yab()
output = ""
YSTEP = Math.ceil(realwidth / 2)
// initialize the min/max vertical offsets in the staves
for (st = 0; st <= nstaff; st++) {
p_st = staff_tb[st]
|
| ︙ | |||
3032 3033 3034 3035 3036 3037 3038 | 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 | - + + | if (bot < p_st.bot[i]) p_st.bot[i] = bot } } if (cfmt.measurenb >= 0) draw_measnb(); |
| ︙ | |||
3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 | 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 | + - + + |
y = staff_tb[st].y
+ staff_tb[st].topbar * .5
* staff_tb[st].staffscale
+ h2 * (a_p.length - 2)
// if instrument with 2 staves, center the voice name
if ((cur_sy.staves[st].flags & OPEN_BRACE)
&& st + 1 < staff_tb.length
&& (cur_sy.staves[st + 1].flags & CLOSE_BRACE)
&& !staff_d[st + 1])
y -= (staff_tb[st].y - staff_tb[st + 1].y) * .5
for (n = 0; n < a_p.length; n++) {
p = a_p[n];
xy_str(indent, y, p, "c");
y -= h
}
}
}
// -- set the y offset of the staves and return the height of the whole system --
function set_staff() {
|
| ︙ | |||
3166 3167 3168 3169 3170 3171 3172 | 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 | - + |
if (!gene.st_print[st]) {
p_staff.y = -y
return y
}
/* set the vertical offset of the 1st staff */
y *= p_staff.staffscale;
|
| ︙ | |||
3250 3251 3252 3253 3254 3255 3256 | 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 | - + - + - - + + | if (gene.st_print[st]) break } if (st < 0) /* no symbol in this system ! */ return y } dy = -mbot; |
| ︙ | |||
3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 | 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 | + | //fixme: 's.ts_prev.st != st - 1' when floating voice in lower staff // && (s.ts_prev.type != C.BAR || s.ts_prev.st != st - 1)) && s.ts_prev.type != C.BAR) h = p_staff.topbar * p_staff.staffscale; s.ymx = s.ymn + h; set_sscale(-1) anno_start(s) if (s.color) set_color(s.color); // compute the middle vertical offset of the staff yb = p_staff.y + 12; if (p_staff.stafflines != '|||||') |
| ︙ | |||
3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 | 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 | + - - + + + - + + + + |
;
xygl(s2.x, yb, "mrep")
} else {
xygl(x, yb, "mrep2")
if (s.v == cur_sy.top_voice)
nrep_out(x, yb + p_staff.topbar, s.bar_mrep)
}
set_sscale(-1)
}
if (bar_type == '||:')
bar_type = '[|:'
for (i = bar_type.length; --i >= 0; ) {
switch (bar_type[i]) {
case "|":
if (s.bar_dotted) {
|
| ︙ | |||
3458 3459 3460 3461 3462 3463 3464 | 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 | - - + - - + - - - - + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + - + + + - + + + + + + + + + + + + - + | b = ba[i]; // symbol, bottom, height draw_bar(b[0], b[1], b[2]) } if (bx) gene.curfont.box = bx set_sscale(-1) |
| ︙ | |||
3547 3548 3549 3550 3551 3552 3553 | 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 | + + + - + + + + | if (sy.st_print[st]) xstaff[st] = x2 } cur_sy = sy; bar_set() continue case C.BAR: // display the bars after the staves if (s.invis || !s.bar_type || !cur_sy.st_print[s.st]) break |
| ︙ | |||
3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 | 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 | + + + + + + + + + + + + + + + + + + - + |
s.x - s.xmx
if (x >= x2)
break
draw_staff(st, x, x2)
xstaff[st] = s.x
}
break
case C.GRACE:
for (s2 = s.extra; s2; s2 = s2.next)
self.draw_hl(s2)
break
case C.NOTE:
if (!s.invis)
self.draw_hl(s)
break
case C.REST:
if (s.fmr // if full measure rest
|| (s.rep_nb && s.rep_nb >= 0))
center_rest(s)
if (!s.invis)
hl_rest(s)
break
// default:
//fixme:does not work for "%%staves K: M: $" */
//removed for K:/M: in empty staves
// if (!cur_sy.st_print[st])
// s.invis = true
// break
}
}
// draw the end of the staves
for (st = 0; st <= nstaff; st++) {
if (bar_force && !cur_sy.st_print[st])
continue
x = xstaff[st]
if (x < 0 || x >= realwidth)
continue
draw_staff(st, x, realwidth)
}
// the ledger lines
draw_all_hl()
// and the bars
out_bars()
draw_vname(indent, stl)
// set_sscale(-1)
}
/* -- draw remaining symbols when the staves are defined -- */
// (possible hook)
Abc.prototype.draw_symbols = function(p_voice) {
var bm = {},
|
| ︙ | |||
3685 3686 3687 3688 3689 3690 3691 | 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 | - + + + |
if (s.clef_small)
y -= 1
} else {
y += s.ymn + 6
if (s.clef_small)
y += 1
}
|
| ︙ | |||
3712 3713 3714 3715 3716 3717 3718 | 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 | - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + - - + + + + + + + + + + - - - - - - - - - - - - - + | set_color(); set_sscale(s.st); anno_start(s); self.draw_keysig(x, s); anno_a.push(s) break case C.MREST: |
| ︙ | |||
3946 3947 3948 3949 3950 3951 3952 | 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 | - + |
if (!s)
continue
s = s.next
if (!s)
continue
set_tie_dir(s)
for ( ; s; s = s.next) {
|
| ︙ |
Changes to core/format.js.
| ︙ | |||
23 24 25 26 27 28 29 30 31 32 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | + + - + + + + + + + + + + + + - + - - + - - + + - - + + - + - + - - + + - - + + + + + + - + - - + + - + - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + |
serif: 1,
serifBold: 1,
'sans-serif': 1,
'sans-serifBold': 1,
Palatino: 1.1,
monospace: 1.35
},
txt_ff = "text,serif", // text font-family (serif for compatibility)
fmt_lock = {}
var cfmt = {
"abc-version": "1", // default: old version
|
| ︙ | |||
165 166 167 168 169 170 171 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | - + - + |
pad: 0
}
} else {
font = {
name: font.name,
size: font.size,
box: font.box,
|
| ︙ | |||
217 218 219 220 221 222 223 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 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 352 353 354 355 356 357 358 359 360 361 362 363 | - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - - - - - - - + |
p = p.replace(a[0], a[2])
}
// the font size is the last item
a = p.match(/\s+([0-9.]+|\*)$/)
if (a) {
if (a[1] != "*")
|
| ︙ | |||
312 313 314 315 316 317 318 319 320 321 322 | 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 | + - - + + + + + - + |
// get the text option
var textopt = {
align: 'j',
center: 'c',
fill: 'f',
justify: 'j',
obeylines: 'l',
ragged: 'f',
right: 'r',
skip: 's'
}
|
| ︙ | |||
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | + + + + + - - - + |
if (cmd == "soundfont")
cfmt.soundfont = param
else
param_set_font(cmd, param)
return
}
// duplicate the global parameters if already used by symbols
if (sfmt[cmd] && parse.ufmt)
cfmt = Object.create(cfmt)
switch (cmd) {
case "aligncomposer":
case "barsperstaff":
case "infoline":
case "measurenb":
case "rbmax":
case "rbmin":
case "measrepnb":
case "shiftunison":
v = parseInt(param)
if (isNaN(v)) {
syntax(1, "Bad integer value");
break
}
cfmt[cmd] = v
break
case "abc-version":
case "bgcolor":
case "fgcolor":
|
| ︙ | |||
458 459 460 461 462 463 464 465 466 467 468 469 470 471 | 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 | + - - + + + + + + + + + + + + + |
case "annotationbox":
case "gchordbox":
case "measurebox":
case "partsbox":
param_set_font(cmd.replace("box", "font"), // font
"* * " + (get_bool(param) ? "box" : "nobox"))
break
case "altchord":
case "bstemdown":
case "breakoneoln":
case "cancelkey":
case "checkbars":
case "contbarnb":
case "custos":
case "decoerr":
|
| ︙ | |||
564 565 566 567 568 569 570 | 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 | - + + + - + + + - - + + + + + + + + + + + + + + + + + + - + - - - + + - - - + + - + - - + + + + + + | } //fixme: should check only alpha, num and '_' characters cfmt[cmd] = param break case "gracespace": v = param.split(/\s+/) for (i = 0; i < 3; i++) |
| ︙ | |||
632 633 634 635 636 637 638 639 | 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 | + + - + - - - + + + + + + + + + + + + + + + + - + + + + + + + | } cfmt.rightmargin = v; img.chg = true break case "textoption": cfmt[cmd] = get_textopt(param) break case "dynalign": case "stretchlast": case "titletrim": |
| ︙ | |||
698 699 700 701 702 703 704 | 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 | - + + + + + - + - - + + |
font_tb.push(font)
if (!font.swfac)
set_font_fac(font)
if (!font.pad)
font.pad = 0
}
add_fstyle(".f" + font.fid +
|
| ︙ |
Changes to core/front.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | // abc2svg - front.js - ABC parsing front-end // |
| ︙ | |||
100 101 102 103 104 105 106 | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | - + + + | i += 4 break } dst += c j = i + 5 continue case 't': // TAB |
| ︙ | |||
179 180 181 182 183 184 185 | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | - - + + | case ';': dst += c2 + "\u0328" // ogonek j = i + 2 continue } break } |
| ︙ | |||
282 283 284 285 286 287 288 289 290 291 292 293 294 295 | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | + + |
char_tb = sav.char_tb;
glovar = sav.glovar;
maps = sav.maps;
mac = sav.mac;
maci = sav.maci;
parse.tune_v_opts = null;
parse.scores = null;
parse.ufmt = false
delete parse.part
init_tune()
img.chg = true;
set_page();
} // end_tune()
// get %%voice
function do_voice(select, in_tune) {
|
| ︙ | |||
393 394 395 396 397 398 399 400 401 402 403 404 405 406 | 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | + + |
parse.fname = in_fname
// scan the file
if (bol == undefined)
bol = 0
if (!eof)
eof = file.length
if (file.slice(bol, bol + 5) == "%abc-")
cfmt["abc-version"] = /[1-9.]+/.exec(file.slice(bol + 5, bol + 10))
for ( ; bol < eof; bol = parse.eol + 1) {
eol = file.indexOf('\n', bol) // get a line
if (eol < 0 || eol > eof)
eol = eof;
parse.eol = eol
// remove the ending white spaces
|
| ︙ | |||
481 482 483 484 485 486 487 | 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | - + - - + |
if (i < 0) {
syntax(1, "No $1 after %%$2",
end.slice(1), a[1]);
parse.eol = eof
continue
}
self.do_begin_end(b, uncomment(a[2]),
|
| ︙ | |||
705 706 707 708 709 710 711 | 710 711 712 713 714 715 716 717 718 719 720 721 722 723 | - - - - - | get_sym(text, txt_add == ' ') break case 'w': if (parse.state != 3 || cfmt.writefields.indexOf(line0) < 0) break get_lyrics(text, txt_add == ' ') |
| ︙ |
Changes to core/gchord.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | // abc2svg - gchord.js - chord symbols // |
| ︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | - + |
text = type.slice(1, -1);
iend = istart + 1
} else {
i = ++line.index // search the ending double quote
while (1) {
j = line.buffer.indexOf('"', i)
if (j < 0) {
|
| ︙ | |||
83 84 85 86 87 88 89 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | + - + + + + + + + + + + + + + - + |
y_abs = 0
} else {
y_abs = get_float()
if (c != ' ')
i--
}
gch.x = x_abs;
y_abs -= h_ann * .3 // center vertically
|
| ︙ | |||
201 202 203 204 205 206 207 | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | + + + + + + + + + + + + + + + + - + - - - + - |
gch.text = gch_tr1(gch.text, curvoice.vtransp)
}
}
// parser: add the parsed list of chord symbols and annotations
// to the symbol (note, rest or bar)
function csan_add(s) {
var i, gch
// there cannot be chord symbols on measure bars
if (s.type == C.BAR) {
for (i = 0; i < a_gch.length; i++) {
if (a_gch[i].type == 'g') {
syntax(1,
"There cannot be chord symbols on measure bars")
a_gch.splice(i)
}
}
}
if (s.a_gch)
s.a_gch = s.a_gch.concat(a_gch)
else
|
| ︙ | |||
257 258 259 260 261 262 263 | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | - - - - - |
gch.text = str2svg(gch.text)
wh = gch.text.wh
wh[1] += gch.font.pad * 2
switch (gch.type) {
case '@':
break
case '^': /* above */
|
| ︙ | |||
308 309 310 311 312 313 314 315 316 317 318 | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | + + - + + + + + + + |
}
// -- draw the chord symbols and annotations
// (the staves are not yet defined)
// (unscaled delayed output)
// (possible hook)
Abc.prototype.draw_gchord = function(i, s, x, y) {
if (s.invis && s.play) // play sequence: no chord nor annotation
return
var y2,
an = s.a_gch[i],
h = an.text.wh[1],
pad = an.font.pad,
|
| ︙ | |||
343 344 345 346 347 348 349 350 351 352 353 354 355 356 | 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | + + + + |
x += pad
}
y += (s.type == C.NOTE ?
(((s.notes[s.nhd].pit + s.notes[0].pit) >> 1) -
18) * 3 :
12) // fixed offset on rests and bars
- h / 2
if (y > 24)
y_set(s.st, 1, x, w, y + h + pad)
if (y < 0)
y_set(s.st, 0, x, w, y - pad)
break
default: // chord symbol
if (y >= 0) {
y += pad
y_set(s.st, 1, x, w, y + h + pad)
} else {
y -= h + pad
|
| ︙ | |||
376 377 378 379 380 381 382 | 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | - + - - - - - + - - - + + - - + |
}
use_font(an.font)
set_font(an.font)
set_dscale(s.st)
if (user.anno_start)
user.anno_start("annot", an.istart, an.iend,
x - 2, y + h + 2, w + 4, h + 4, s)
|
| ︙ | |||
467 468 469 470 471 472 473 | 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 | - + - + |
i = an.length
if (i > n_an)
n_an = i
while (--i >= 0) {
if (an[i].type == 'g') {
an = an[i]
w = an.text.wh[0]
|
| ︙ |
Changes to core/license.
1 2 | 1 2 3 | - + | // abc2svg - ABC to SVG translator // @source: https://chiselapp.com/user/moinejf/repository/abc2svg |
Changes to core/lyrics.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | // abc2svg - lyrics.js - lyrics // |
| ︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + - - + |
s = curvoice.sym_cont
if (!s) {
syntax(1, "+: symbol line without music")
return
}
} else {
if (curvoice.sym_restart) { // new music
|
| ︙ | |||
68 69 70 71 72 73 74 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - + |
case '!':
case '"':
j = ++i
i = p.indexOf(c, j)
if (i < 0) {
syntax(1, c == '!' ?
"No end of decoration" :
|
| ︙ | |||
91 92 93 94 95 96 97 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 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 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 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 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | - + - + + - + - + - + + + + + + + - + + - - - + + - - - - - - + + + - + - + + + + + + + + - + - + - - - - - - - + - + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - + + + - - - - + + + - - + + - + + - - - + + + - + - - - + + + - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - + - - + - - - - + + - - - + + + - + - - + - - - + - + - - - + | } } syntax(1, errs.bad_char, c) break } /* store the element in the next note */ |
| ︙ | |||
379 380 381 382 383 384 385 | 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | - + - - - + + + - + - - + - + - - + - - + - + - + - + | } } continue } if (ly.font != gene.curfont) /* font change */ gene.curfont = font = ly.font; p = ly.t; |
| ︙ | |||
468 469 470 471 472 473 474 | 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | - - + + - + - + |
function draw_lyrics(p_voice, nly, a_h, y,
incr) { /* 1: below, -1: above */
var j, top,
sc = staff_tb[p_voice.st].staffscale;
set_font("vocal")
if (incr > 0) { /* under the staff */
|
| ︙ | |||
530 531 532 533 534 535 536 | 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | - + - - + + - + |
/*fixme:should get the real width*/
x = s.x;
w = 10
for (i = 0; i < a_ly.length; i++) {
ly = a_ly[i]
if (ly) {
x -= ly.shift;
|
| ︙ |
Changes to core/mei.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + - + | // abc2svg - mei.js - MEI front-end // |
| ︙ | |||
64 65 66 67 68 69 70 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - + - - + - + - + + - + - - - - + + + + + + + + | continue } o = stack.pop() if (!o) error(1, null, 'No start tag "' + item + '"') continue } |
| ︙ | |||
1191 1192 1193 1194 1195 1196 1197 | 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 | + - + - - + + - - - - + + + - - - - + + + - - - + + + - - - + + - - - - - - - + + + + + + + + |
text: function(tag) {
if (curr.text != undefined)
curr.text += tag.content.replace(/[ \t\n]+/g, ' ')
},
// tie
tie: function(tag) {
var m1, m2, not1, not2,
|
| ︙ |
Changes to core/modules.js.
| ︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | + + |
gamelan: {},
grid: {},
grid2: {},
jazzchord: {},
jianpu: {},
mdnn: {},
MIDI: {},
nns: {},
pageheight: { fn: 'page' },
pedline: {},
percmap: { fn: 'perc' },
roman: {},
soloffs: {},
sth: {},
strtab: {},
temperament: { fn: 'temper' },
nreq: 0,
hooks: [],
|
| ︙ |
Changes to core/music.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | // abc2svg - music.js - music generation // |
| ︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + - - - - - - - - - | // along with abc2svg-core. If not, see <http://www.gnu.org/licenses/>. var gene, staff_tb, nstaff, // current number of staves tsnext, // next line when cut realwidth, // real staff width while generating |
| ︙ | |||
81 82 83 84 85 86 87 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + | dur = dur_o if (dur % 12 != 0) error(1, s, "Invalid note duration $1", dur); dur /= 12 /* see C.BLEN for values */ if (!dur) error(1, s, "Note too short") |
| ︙ | |||
105 106 107 108 109 110 111 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | - + | error(1, s, "Note too long") flags = -4 /* fall thru */ case -4: head = C.SQUARE break case -3: |
| ︙ | |||
127 128 129 130 131 132 133 | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | - + - + | dir = s.stem, n = s.nhd if (!n) return // single note /* set the head shifts */ |
| ︙ | |||
245 246 247 248 249 250 251 | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | + + - + |
if (p1 > ps + 4) { // if interval greater than a sixth
if (dx1 > dx2)
dx2 = dx1 // align the accidentals
notes[i1].shac = notes[i2].shac = dx2
} else {
notes[i1].shac = dx1
if (p1 != ps)
dx1 += 7 // (there is a shift of a head when unison)
|
| ︙ | |||
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | + + - - + + - - + + + + + - - - + + + + + + |
if (s.prev)
s.prev.next = s
else
s.p_v.sym = s;
next.prev = s
}
function lktsym(s, next) { // time linkage
var old_wl
s.ts_next = next
if (next) {
s.ts_prev = next.ts_prev
if (s.ts_prev)
s.ts_prev.ts_next = s;
next.ts_prev = s
} else {
//fixme
error(2, s, "Bad linkage")
s.ts_prev = null
}
s.seqst = !s.ts_prev
|| s.time != s.ts_prev.time
|
| ︙ | |||
437 438 439 440 441 442 443 444 445 446 447 448 449 450 | 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 | + + + + |
}
new_s.nhd = 0;
/* link in time */
while (!s.seqst)
s = s.ts_prev;
lktsym(new_s, s)
if (s.soln) { // move the start of line
new_s.soln = true
delete s.soln
}
return new_s
}
/* -- set the staff of the floating voices -- */
/* this function is called only once per tune */
function set_float() {
var p_voice, st, staff_chg, v, s, s1, up, down
|
| ︙ | |||
530 531 532 533 534 535 536 | 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | - - - + + + - + - - + + - - + + - - |
}
}
}
/* -- set the x offset of the grace notes -- */
function set_graceoffs(s) {
var next, m, dx, x,
|
| ︙ | |||
589 590 591 592 593 594 595 | 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | - + + + + + + + | x += gspright; /* return the whole width */ return x } // Compute the smallest spacing between symbols according to chord symbols |
| ︙ | |||
668 669 670 671 672 673 674 | 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 | - + - + + + + - + + - + - - + + + + |
/* -- set the width of a symbol -- */
/* This routine sets the minimal left and right widths wl,wr
* so that successive symbols are still separated when
* no extra glue is put between them */
// (possible hook)
Abc.prototype.set_width = function(s) {
|
| ︙ | |||
799 800 801 802 803 804 805 | 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 | - - + - - | } } /* leave room for guitar chord */ if (s.a_gch) wlw = gchord_width(s, wlnote, wlw) |
| ︙ | |||
824 825 826 827 828 829 830 831 832 833 834 835 836 837 | 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 | + + + - - + + - + - + + + |
s.wl = xx
return
case C.BAR:
bar_type = s.bar_type
switch (bar_type) {
case "|":
w = 5 // 3 + 2
break
case "[": // repeat number on secondary staff
w = 0
break
default:
w = 2 + 2.8 * bar_type.length
for (i = 0; i < bar_type.length; i++) {
switch (bar_type[i]) {
case "[":
case "]":
|
| ︙ | |||
878 879 880 881 882 883 884 885 886 887 888 | 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 | + + + + - + - - - + |
// (there may be invisible clefs in empty staves)
if (s.invis) {
s.wl = s.wr = 1 // (!! not 0 !!)
return
}
s.wl = s.clef_small ? 11 : 12
s.wr = s.clef_small ? 10 : 12
if (s.prev && s.prev.type == C.STBRK) {
s.wl -= 6
delete s.next.clef_small
}
if (s.next && s.next.type == C.BAR)
s.wr -= 4
return
case C.KEY:
|
| ︙ | |||
979 980 981 982 983 984 985 | 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 | - + - - - - - + - - | return case C.GRACE: if (s.invis) break s.wl = set_graceoffs(s); s.wr = 0 if (s.a_ly) |
| ︙ | |||
1044 1045 1046 1047 1048 1049 1050 | 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 | - + - + - + | i = 2 else if (len >= C.BLEN / 64) i = 1 else i = 0 } l = len - ((C.BLEN / 16 / 8) << i) |
| ︙ | |||
1073 1074 1075 1076 1077 1078 1079 | 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 | - - + + + + - |
case C.MREST:
return s.wl
///*fixme:do same thing at start of line*/
// case C.NOTE:
// case C.REST:
// if (s.ts_prev.type == C.BAR) {
// if (s.nflags < -2)
|
| ︙ | |||
1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 | 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 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 1290 1291 1292 1293 | + + + - + + - - - - + - + - + - + - + + + - - - + + + + + + |
fname: s.fname,
istart: s.istart,
iend: s.iend,
v: s.v,
p_v: s.p_v,
st: s.st,
dur: 0,
time: s.time + (s.dur || 0),
nhd: 0,
notes: [{
pit: s.notes ? s.notes[0].pit : 22
}],
seqst: true,
invis: true,
|
| ︙ | |||
1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 | 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 | + |
if (s2.wr > wr[st])
wr[st] = s2.wr
s2 = s2.ts_next
} while (!s2.seqst)
}
// let the chord symbols at the same offset
// and adjust the spacing due to the lyrics
if (s_chs)
set_w_chs(s_chs)
}
// insert a rest, this one replacing a sequence or a measure
function to_rest(so) {
var s = clone(so)
|
| ︙ | |||
1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 | 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 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 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 | + + - - + + - + - + - - - + + + + - - - + + + + + + + + + + + + + + + + | p_voice.last_sym = s.prev; // if (!p_voice.last_sym) // p_voice.sym = null; p_voice.time = s.time; new_s = sym_add(p_voice, C.CUSTOS); new_s.next = s; s.prev = new_s; new_s.wl = 0 // (needed here for lktsym) new_s.wr = 4 lktsym(new_s, s); new_s.shrink = s.shrink if (new_s.shrink < 8 + 4) new_s.shrink = 8 + 4; new_s.space = s2.space; |
| ︙ | |||
1668 1669 1670 1671 1672 1673 1674 | 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 | - + - - + - - + |
function do_warn(s) { // start of next line
var s1, s2, s3
// advance in the next line
for (s2 = s; s2; s2 = s2.ts_next) {
switch (s2.type) {
case C.KEY:
|
| ︙ | |||
1704 1705 1706 1707 1708 1709 1710 | 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 | - - + - + - + - - - - - - - - | } } // put the warning symbol at end of line s3 = clone(s2) // duplicate the K:/M:/clef lktsym(s3, s1.ts_next) // time link |
| ︙ | |||
1772 1773 1774 1775 1776 1777 1778 | 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 | - + |
switch (s.type) {
case C.STAVES:
if (!s.ts_prev)
return // null // no music yet
if (s.ts_prev.type == C.BAR)
break
while (s.ts_next) {
|
| ︙ | |||
1830 1831 1832 1833 1834 1835 1836 | 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 | - + - + - + - + - - + |
// get the width of the symbols up to the next soln or eof
// also, set a x (nice spacing) to all symbols
// two returned values: width of nice spacing, width with max shrinking
function get_width(s, next) {
var shrink, space,
w = 0,
wmx = 0,
|
| ︙ | |||
1889 1890 1891 1892 1893 1894 1895 | 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 | - + + | return next || last } s2 = first = s; xmin = s.x - s.shrink - indent; xmax = xmin + lwidth; xmid = xmin + wwidth / nlines; |
| ︙ | |||
1928 1929 1930 1931 1932 1933 1934 | 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 | + + - - + + - - - - - + + + + + + - - - - + + + + + + + - - + - - - - - - - - - + - - - - - + + - + - - - + + + + |
if (!s3 || x - xmid < xmid - s3.x)
s3 = s // closest bar after middle
break
}
// no bar, try to avoid to cut a beam or a tuplet */
if (!s3) {
s = s4 // restart after xmin
|
| ︙ | |||
2040 2041 2042 2043 2044 2045 2046 | 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 | - - + + - + | lwidth -= i[0]; indent += i[1] if (cfmt.custos && voice_tb.length == 1) lwidth -= 12 /* if asked, count the measures and set the EOLNs */ |
| ︙ | |||
2078 2079 2080 2081 2082 2083 2084 2085 | 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 | + + - - |
// }
if (!s.ts_next) {
s = null
} else if (!s.soln) {
continue
} else {
s.soln = false
if (s.time == s2.time)
continue // empty music line!
while (!s.seqst)
|
| ︙ | |||
2178 2179 2180 2181 2182 2183 2184 | 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 | - + + |
staff_noo = new Int8Array(new Array(m)) // number of ottava values
// add an ottava decoration
function ottava_add(s, ottava, start) {
var dc_st = ["15mb(", "8vb(", null, "8va(", "15ma("],
dc_en = ["15mb)", "8vb)", null, "8va)", "15ma)"];
|
| ︙ | |||
2242 2243 2244 2245 2246 2247 2248 | 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 | - + - - + + - - - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + + + - - - - + |
// expand the multi-rests as needed
function mrest_expand() {
var s, s2
// expand a multi-rest into a set of rest + bar
function mexp(s) {
|
| ︙ | |||
2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 | 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 | + + |
if (s4.bar_num && !s4.seqst)
delete s4.bar_num
// add the rest
s4 = clone(s)
delete s4.a_dd
delete s4.soln
delete s4.a_gch
delete s4.part
if (s2.next) {
s4.next = s2.next
s4.next.prev = s4
} else {
s4.next = null
}
s2.next = s4
|
| ︙ | |||
2367 2368 2369 2370 2371 2372 2373 | 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 | - + + + - - |
}
}
} // mrest_expand()
// set the clefs (treble or bass) in a 'auto clef' sequence
// return the starting clef type
function set_auto_clef(st, s_start, clef_type_start) {
|
| ︙ | |||
2438 2439 2440 2441 2442 2443 2444 | 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 | - + - + |
if (s2
&& s2.st == st
&& s2.time == time
&& s2.type == C.NOTE
&& s2.notes[0].pit >= 19) /* F */
continue
} else {
|
| ︙ | |||
2513 2514 2515 2516 2517 2518 2519 | 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 | - - - - + + + + |
* global variables:
* - staff_tb[st].clef = clefs at start of line (here, start of tune)
* (created here, updated on clef draw)
* - voice_tb[v].clef = clefs at end of generation
* (created on voice creation, updated here)
*/
function set_clefs() {
|
| ︙ | |||
2546 2547 2548 2549 2550 2551 2552 | 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 | - + | sy.staves[st].staffscale = p_voice.staffscale if (sy.voices[v].sep) sy.staves[st].sep = sy.voices[v].sep if (sy.voices[v].maxsep) sy.staves[st].maxsep = sy.voices[v].maxsep; if (!p_voice.clef.clef_auto) |
| ︙ | |||
2573 2574 2575 2576 2577 2578 2579 | 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 | - + |
for (s = tsfirst; s; s = s.ts_next) {
if (s.repeat_n)
set_repeat(s)
switch (s.type) {
case C.STAVES:
|
| ︙ | |||
3023 3024 3025 3026 3027 3028 3029 | 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 | - - + + |
if (i == st_v.length - 1) {
s.multi = -1 /* last voice */
} else {
s.multi = 1 /* first voice(s) */
/* if 3 voices, and vertical space enough,
* have stems down for the middle voice */
|
| ︙ | |||
3220 3221 3222 3223 3224 3225 3226 | 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 | - + - - + + + + + + + - + + - |
p_v.last_sym = s;
lktsym(s, last_s)
}
/* -- init the symbols at start of a music line -- */
function init_music_line() {
|
| ︙ | |||
3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 | 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 | + + - + - - + + + - + - + + - + - - - + + - - - - - + - - - - - + |
delete last_s.seqst
}
delete s.clef_small;
s.second = cur_sy.voices[v].second
// (fixme: needed for sample5 X:3 Fugue & staffnonote.xhtml)
if (!cur_sy.st_print[st])
s.invis = true
s.fmt = fmt
}
/* add keysig */
for (v = 0; v < nv; v++) {
if (!cur_sy.voices[v]
|| cur_sy.voices[v].second
|| !cur_sy.st_print[cur_sy.voices[v].st])
continue
p_voice = voice_tb[v]
s2 = p_voice.ckey
if (s2.k_sf || s2.k_a_acc) {
s = clone(s2)
new_sym(s, p_voice, last_s)
delete s.invis
s.k_old_sf = s2.k_sf // no key cancel
s.fmt = fmt
}
}
/* add time signature (meter) if needed */
|
| ︙ | |||
3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 | 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 | + + + + - - - |
if (s == last_s)
break
shlp = shl
}
// update the spacing before the first old time sequence
shr = 0
if (last_s.type == C.BAR && s2.type == C.CLEF)
shl += 4 // (see set_width)
do {
self.set_width(s)
if (s.a_ly)
ly_set(s)
if (shr < s.wl)
shr = s.wl;
s = s.ts_next
} while (s && !s.seqst);
last_s.shrink = shl + shr
last_s.space = 0
} // init_music_line()
// check if the tune ends on a measure bar
function check_end_bar() {
var s2,
s = tsfirst
while (s.ts_next)
s = s.ts_next
if (s.type != C.BAR) {
s2 = _bar(s)
|
| ︙ | |||
3487 3488 3489 3490 3491 3492 3493 | 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 | + + - + |
if (s.a_gch)
self.gch_build(s)
switch (s.type) {
case C.MREST:
start_flag = true
break
case C.BAR:
res = s.fmt.bardef[s.bar_type]
if (res)
|
| ︙ | |||
3551 3552 3553 3554 3555 3556 3557 | 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 | - + - |
if (start_flag
|| nflags <= 0) {
if (lastnote) {
lastnote.beam_end = true;
lastnote = null
}
if (nflags <= 0) {
|
| ︙ | |||
3605 3606 3607 3608 3609 3610 3611 | 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 | - + - + - + + + |
continue
}
n = 0;
s2 = null
for (s = s.next; s; s = s.next) {
if (s.type != C.BAR)
continue
|
| ︙ | |||
3766 3767 3768 3769 3770 3771 3772 | 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 | - - - - - - - - - - - - - - - - - - - - - + - - - - - - - + - - - - + - - - + + - + - - + - - - - + + - + - - |
/* notes in a beam have the same stem direction */
if (beam) {
s.stem = laststem
} else if (s.beam_st && !s.beam_end) { // beam start
beam = true;
|
| ︙ | |||
3864 3865 3866 3867 3868 3869 3870 | 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 | - + + - + - + |
s_opp = null
}
}
}
// check if there may be one head for unison when voice overlap
function same_head(s1, s2) {
|
| ︙ | |||
3955 3956 3957 3958 3959 3960 3961 | 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 | - + - + |
}
if (l1 < C.BLEN / 2) {
if (s2.dots)
head = 2
else if (s1.dots)
head = 1
} else if (l2 < C.BLEN / 4) { /* (l1 >= C.BLEN / 2) */
|
| ︙ | |||
3992 3993 3994 3995 3996 3997 3998 | 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 | - + - + |
function unison_acc(s1, s2, i1, i2) {
var m, d, acc
acc = s2.notes[i2].acc
if (!acc) {
d = w_note[s2.head] * 2 + s2.xmx + s1.notes[i1].shac + 2
acc = s1.notes[i1].acc
|
| ︙ | |||
4293 4294 4295 4296 4297 4298 4299 | 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 | - + - | case 1: if (s1.notes[i1].pit & 1) s2.dot_low = true else s1.dot_low = false break case 0: |
| ︙ | |||
4512 4513 4514 4515 4516 4517 4518 | 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 | - + | } /* if (s2) */ if (s2.nflags > nflags) nflags = s2.nflags } /* set height of stem end */ |
| ︙ | |||
4603 4604 4605 4606 4607 4608 4609 | 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 | - |
switch (s.subtype) {
case "leftmargin":
case "rightmargin":
case "pagescale":
case "pagewidth":
case "scale":
case "staffwidth":
|
| ︙ | |||
4646 4647 4648 4649 4650 4651 4652 | 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 | - + + | set_page() break case "ml": blk_flush() user.img_out(s.text) break case "newpage": |
| ︙ | |||
4761 4762 4763 4764 4765 4766 4767 | 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 | - + | p_staff.botbar -= 12; p_staff.topbar += 12 continue // no helper line } } // define the helper lines |
| ︙ | |||
4817 4818 4819 4820 4821 4822 4823 | 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 | - + + |
continue
// the block symbols will be treated after music line generation
case C.BLOCK:
if (!s.play) {
blocks.push(s)
unlksym(s)
|
| ︙ | |||
4922 4923 4924 4925 4926 4927 4928 | 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 | - + - |
}
}
}
/* -- position the symbols along the staff -- */
// (possible hook)
Abc.prototype.set_sym_glue = function(width) {
|
| ︙ | |||
4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 | 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 | + - + - - + + |
// last line?
ll = !tsnext || // yes
(tsnext.type == C.BLOCK // no, but followed by %%command
&& !tsnext.play)
|| blocks.length // (abcm2ps compatibility)
// strong shrink
s = tsfirst
if (xmin >= width) {
if (xmin > width)
error(1, s, "Line too much shrunk $1 $2 $3",
xmin.toFixed(1),
xx.toFixed(1),
width.toFixed(1));
x = 0
|
| ︙ | |||
5008 5009 5010 5011 5012 5013 5014 | 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 | - - + + + - + - - + + + |
s.x = x
}
if (Math.abs(x - width) < 0.1)
break
}
spf_last = spf
} else { // shorter line
|
| ︙ | |||
5104 5105 5106 5107 5108 5109 5110 | 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 | - - - + + + + + + - - - |
/* -- generate the music -- */
// (possible hook)
Abc.prototype.output_music = function() {
var v, lwidth, indent, line_height, ts1st, tslast, p_v,
nv = voice_tb.length
|
| ︙ | |||
5144 5145 5146 5147 5148 5149 5150 | 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 | - + - + - - | // save symbol pointers for play ts1st = tsfirst v = nv while (--v >= 0) voice_tb[v].osym = voice_tb[v].sym |
| ︙ | |||
5194 5195 5196 5197 5198 5199 5200 | 5192 5193 5194 5195 5196 5197 5198 | - - - - - - - |
while (--v >= 0) {
p_v = voice_tb[v]
if (p_v.sym && p_v.s_prev)
p_v.sym.prev = p_v.s_prev
p_v.sym = p_v.osym
}
}
|
Changes to core/parse.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + - + | // abc2svg - parse.js - ABC parse // |
| ︙ | |||
98 99 100 101 102 103 104 | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | - + + + + - + + - - - + + + - - - + + + |
curvoice.ckey.k_drum = true // no transpose
break
default:
syntax(1, "Unknown clef '$1'", clef_def)
return //undefined
}
if (clef_def[i] >= '1' && clef_def[i] <= '9') {
|
| ︙ | |||
138 139 140 141 142 143 144 145 146 147 148 149 150 151 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | + + + + |
if (!note) {
if (i != 1 || !score) {
syntax(1, errs.bad_transp)
return
}
pit[i] = 242 // 'c' (C5)
} else {
if (typeof note.acc == "object") {
syntax(1, errs.bad_transp)
return
}
pit[i] = abc2svg.pab40(note.pit, note.acc)
}
}
return pit[1] - pit[0]
}
// set the linebreak character
|
| ︙ | |||
238 239 240 241 242 243 244 | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | - + - - - + |
// get a stafflines value
function get_st_lines(param) {
if (!param)
return
if (/^[\]\[|.-]+$/.test(param))
return param.replace(/\]/g, '[')
|
| ︙ | |||
306 307 308 309 310 311 312 | 312 313 314 315 316 317 318 319 320 321 322 323 324 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 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | - + - - + + + + + + + + - + - + + + - + - + + + - + + + + + + - + + + - + + + + + - + + + + + + - + - + + - + - + + | clefpit = 4 - val // 4 = 'G' break } } syntax(1, errs.bad_val, item) break case "octave=": |
| ︙ | |||
472 473 474 475 476 477 478 479 480 481 482 483 484 485 | 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 | + + |
s = new_clef(s)
if (s) {
if (clefpit)
s.clefpit = clefpit
get_clef(s)
}
}
if (tr_p)
set_transp()
} // set_vp()
// set the K: / V: parameters
function set_kv_parm(a) { // array of items
if (!curvoice.init) { // add the global parameters if not done yet
curvoice.init = true
if (info.V) {
|
| ︙ | |||
562 563 564 565 566 567 568 569 570 | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 | + - + - - - - + - - - - - + + + + + - + |
set_ref(s);
// tonic
i = 1
if (sf < -1) {
switch (param[0]) {
case 'H': // bagpipe
key_end = true
if (param[1].toLowerCase() != 'p') {
syntax(1, "Unknown bagpipe-like key")
|
| ︙ | |||
697 698 699 700 701 702 703 | 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 | + + - + + + - + |
s.k_map = []
i = s.k_a_acc.length
while (--i >= 0) {
note = s.k_a_acc[i]
s.k_map[(note.pit + 19) % 7] = note.acc
}
} else {
s.k_map = s.k_bagpipe && !sf
? abc2svg.keys[9] // implicit F# and C#
|
| ︙ | |||
823 824 825 826 827 828 829 | 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 | - + - + |
if (p[i] != ' ' && p[i] != '+')
break
if (i >= p.length
|| p[i + 1] == '(') /* "M:5 (2/4+3/4)" */
break
meter.top += p[i++]
}
|
| ︙ | |||
858 859 860 861 862 863 864 | 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 | - + - - + + - - + - + + + + - + - + |
if (cfmt.writefields.indexOf('M') < 0)
s.a_meter = []
if (parse.state != 3) {
info.M = p;
glovar.meter = s
|
| ︙ | |||
961 962 963 964 965 966 967 | 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 | - + - + - - - - - - + + + + + + + - - - - + + + - - - - + - - + + - + - + - - + + + + - - + + - + - + |
i = text.indexOf('/')
if (i > 0) {
nd = get_nd(text)
if (!nd)
return
s.new_beat = nd
} else {
|
| ︙ | |||
1118 1119 1120 1121 1122 1123 1124 | 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 | - + | while (s2.type != C.BAR && s2.prev) s2 = s2.prev; time = s2.time; auto_time = curvoice.time - time fac = curvoice.wmeasure / auto_time /* remove the invisible rest at start of tune */ |
| ︙ | |||
1152 1153 1154 1155 1156 1157 1158 | 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 | - + - - - + - - - - + + - - | for (i = 0; i <= s2.nhd; i++) s2.notes[i].dur *= fac } curvoice.time = s.time = time } /* -- parse a bar -- */ |
| ︙ | |||
1230 1231 1232 1233 1234 1235 1236 | 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 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 | - - - + - - - - - - - - + + + + + + + + + + + + + + - - - + + - - + - - - - - - - - + - - + + + + + + - + - - - - - - - - + + + + + + + - + - + - + + + + - - + |
* a chord or an embedded header */
if (bar_type.slice(-1) == '['
&& !(/[0-9" ]/.test(c))) { // "
bar_type = bar_type.slice(0, -1);
line.index--;
c = '['
}
|
| ︙ | |||
1371 1372 1373 1374 1375 1376 1377 | 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 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 | - + - + + + - - + + - + |
/* set some flags */
switch (bar_type) {
case "[":
s.rbstop = 2
case "[]":
case "[|]":
s.invis = true;
|
| ︙ | |||
1541 1542 1543 1544 1545 1546 1547 | 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 | - + |
flags |= STOP_BAR
continue
}
break
}
if (vids[vid]) {
syntax(1, "Double voice in %%score")
|
| ︙ | |||
1702 1703 1704 1705 1706 1707 1708 | 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 | - - - - |
}
}
}
note.map = map = map[nn]
if (map[1]) { // if print map
note.pit = pit = map[1].pit
note.acc = map[1].acc
|
| ︙ | |||
1737 1738 1739 1740 1741 1742 1743 | 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 | - + + + |
return note
}
function parse_vpos() {
var line = parse.line,
ty = 0
|
| ︙ | |||
1823 1824 1825 1826 1827 1828 1829 | 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 | - + - + |
p0, p1, s, b40
if (curvoice.snd_oct)
o += curvoice.snd_oct
if (acc == 3) // if natural accidental
acc = 0
if (acc) {
|
| ︙ | |||
1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 | 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + + + + + + |
p1 = cfmt.temper[(abc2svg.p_b40[pit % 7] + 39) % 40]
if (p1 > p0)
p1 -= 12
s = -s
}
return p0 + o + (p1 - p0) * s
} // pit2mid()
// handle the ties
// @s = tie ending smbol
// @tei_s = tie starting symbol
function do_ties(s, tie_s) {
var i, m, not1, not2, mid, g,
nt = 0,
se = (tie_s.time + tie_s.dur) == curvoice.time // 'start-end' flag
for (m = 0; m <= s.nhd; m++) {
not2 = s.notes[m]
mid = not2.midi
if (tie_s.type != C.GRACE) {
for (i = 0; i <= tie_s.nhd; i++) {
not1 = tie_s.notes[i]
if (!not1.tie_ty)
continue
if (not1.midi == mid
&& (!se
|| !not1.tie_e)) { // (if unison)
not2.tie_s = not1
not2.s = s
if (se) {
not1.tie_e = not2
not1.s = tie_s
}
nt++
break
}
}
} else {
for (g = tie_s.extra; g; g = g.next) {
not1 = g.notes[0] // (fixme: only one note)
if (!not1.tie_ty)
continue
if (not1.midi == mid) {
g.ti1 = true
not2.tie_s = not1
not2.s = s
not1.tie_e = not2
not1.s = g
nt++
break
}
}
}
}
if (!nt)
error(1, tie_s, "Bad tie")
else
s.ti2 = true
} // do_ties()
// (possible hook)
Abc.prototype.new_note = function(grace, sls) {
var note, s, in_chord, c, dcn, type, tie_s, acc_tie,
|
| ︙ | |||
1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 | 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 | + + |
s.type = C.REST;
line.index++;
nd = parse_dur(line);
s.dur_orig = ((curvoice.ulen < 0) ?
C.BLEN :
curvoice.ulen) * nd[0] / nd[1];
s.dur = s.dur_orig * curvoice.dur_fact;
if (s.dur == curvoice.wmeasure)
s.fmr = 1 // full measure rest
s.notes = [{
pit: 18,
dur: s.dur_orig
}]
break
case '[': // chord
in_chord = true;
|
| ︙ | |||
2030 2031 2032 2033 2034 2035 2036 | 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 | - - - + - + - - - - - - - - - - - - + - + + - - - - - - + + + + + + + + - - + + - - + + |
type = char_tb[i]
switch (type[0]) {
case '(':
sl1.push(parse_vpos());
c = line.char()
continue
case '!':
|
| ︙ | |||
2185 2186 2187 2188 2189 2190 2191 | 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 | - - - - - + |
s.dur_orig = s.notes[0].dur;
s.dur = s.notes[0].dur * curvoice.dur_fact
}
if (s.grace && s.type != C.NOTE) {
syntax(1, errs.bad_grace)
return //null
}
|
| ︙ | |||
2234 2235 2236 2237 2238 2239 2240 | 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 | - + - + + + + + + - + - - + - - + - - - - - - - - - - - - - - + + + + |
curvoice.time = s2.time + s2.dur;
// adjust the time of the grace notes, bars...
for (s2 = s2.next; s2; s2 = s2.next)
s2.time = curvoice.time
}
} else { /* grace note - adjust its duration */
|
| ︙ | |||
2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 | 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 | + + + + + + + + + + + + + + + + + + + + + + + + + + |
else
s.tpe = 1
break
}
s = s.next
}
} // tp_adj()
// get a decoration
function get_deco() {
var c,
line = parse.line,
i = line.index, // in case no deco end
dcn = ""
while (1) {
c = line.next_char()
if (!c) {
syntax(1, "No end of decoration")
line.index = i;
return
}
if (c == '!')
break
dcn += c
}
if (ottava[dcn] != undefined) {
glovar.ottava = true;
parse.ottava.push(ottava[dcn])
} else {
a_dcn.push(dcn)
}
} // get_deco()
// characters in the music line (ASCII only)
var nil = "0",
char_tb = [
nil, nil, nil, nil, /* 00 - .. */
nil, nil, nil, nil,
nil, " ", "\n", nil, /* . \t \n . */
|
| ︙ | |||
2404 2405 2406 2407 2408 2409 2410 | 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 | - + - + - + - + - + + + |
function check_mac(m) {
var i, j, b
for (i = 1, j = line.index + 1; i < m.length; i++, j++) {
if (m[i] == line.buffer[j])
continue
if (m[i] != 'n') // search the base note
|
| ︙ | |||
2491 2492 2493 2494 2495 2496 2497 | 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 | - + - + | range: curvoice.v } } curvoice.time = ti s = curvoice.last_sym parse.line = line = new scanBuf parse.istart += line_sav.index |
| ︙ | |||
2531 2532 2533 2534 2535 2536 2537 | 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 | - - - - - - - - - - - - + - + | break // [V:nn] found c = line.next_char() if (!c) return } } |
| ︙ | |||
2587 2588 2589 2590 2591 2592 2593 | 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 | - - - + - + | if (grace) grace.gr_shift = true } break case '\n': // line break if (cfmt.barsperstaff) break |
| ︙ | |||
2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 | 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 | + + + + + + + + + + + + + + + - + |
}
}
if (qplet == 0 || qplet == undefined)
qplet = (curvoice.wmeasure % 9) == 0 ?
3 : 2;
if (tpn < 0)
tpn = tp.length // new tuplet
c = cfmt.tuplets
if (curvoice.pos.tup) {
c = Object.create(c)
switch (curvoice.pos.tup & 0x07) {
case C.SL_ABOVE:
c[3] = 1
break
case C.SL_BELOW:
c[3] = 2
break
case C.SL_HIDDEN:
c[2] = 1
break
}
}
tp.push({
p: pplet,
q: qplet,
r: rplet,
ro: rplet,
|
| ︙ | |||
2688 2689 2690 2691 2692 2693 2694 | 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 | - - - - - + + + - - - - - - - - - - - - - - - - - - - - - + - | syntax(1, errs.bad_char, c) break } s.notes[0].s = s slur_add(s.notes[0]) break case '!': // start of decoration |
| ︙ | |||
2825 2826 2827 2828 2829 2830 2831 | 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 | - + + + - + - + - + |
if (grace) {
syntax(1, "'{' in grace note")
break
}
last_note_sav = curvoice.last_note;
curvoice.last_note = null;
a_dcn_sav = a_dcn;
|
| ︙ | |||
2889 2890 2891 2892 2893 2894 2895 | 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 | - - - + + - - + + + + - - - + - - + - - + + | syntax(1, errs.bad_char, c) break } line.index++ } } // parse_seq() |
Changes to core/subs.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | // abc2svg - subs.js - text output // |
| ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + + |
// along with abc2svg-core. If not, see <http://www.gnu.org/licenses/>.
// add font styles
var sheet
var add_fstyle = typeof document != "undefined" ?
function(s) {
var e
if (cfmt.fullsvg)
font_style += "\n" + s
if (!sheet) {
if (abc2svg.sheet) { // if styles from a previous generation
sheet = abc2svg.sheet
e = sheet.cssRules.length
while (--e >= 0)
sheet.deleteRule(e)
} else {
|
| ︙ | |||
131 132 133 134 135 136 137 | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | - + - |
if (typeof str == "object") { // if string already converted
el.innerHTML = str
str.wh = [ el.clientWidth, el.clientHeight ]
return str.wh
}
|
| ︙ | |||
167 168 169 170 171 172 173 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | - | el.style.font = style_font(font).slice(5); i += 2; i0 = i } el.innerHTML = str.slice(i0); w += el.clientWidth; |
| ︙ | |||
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | + + - |
}
i++;
swfac = font.swfac
if (font.size > h)
h = font.size
continue
case '&':
if (str[i + 1] == ' ')
break // normal '&'
j = str.indexOf(';', i)
if (j > 0 && j - i < 10) {
i = j;
c = 'a' // XML character reference
}
break
}
w += cwid(c) * swfac
}
|
| ︙ | |||
240 241 242 243 244 245 246 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | - + - | cl = nf.class // change only the class else cl = font_class(nf) return '<tspan\n\tclass="' + cl + '">' } // tspan() |
| ︙ | |||
267 268 269 270 271 272 273 | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | - + - - + + + | c_font = n_font if (c_font == o_font) return c return c + tspan(c_font, o_font) } return c // &xxx; }) |
| ︙ | |||
343 344 345 346 347 348 349 | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 | - + |
function trim_title(title, is_subtitle) {
var i
if (cfmt.titletrim) {
i = title.lastIndexOf(", ")
if (i < 0 || title[i + 2] < 'A' || title[i + 2] > 'Z') {
i = 0
|
| ︙ | |||
434 435 436 437 438 439 440 | 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 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 501 502 503 | - - - - - - + + + - - + + + + + - + - - - + + + - + - - + - + + + + - - - + + |
case 'c': x = strlw / 2; break
case 'r': x = strlw - font.pad; break
default: x = font.pad; break
}
j = 0
while (1) {
i = text.indexOf('\n', j)
|
| ︙ | |||
514 515 516 517 518 519 520 | 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 | - + + + - - - - + + + + + + - + |
function put_words(words) {
var p, i, j, nw, w, lw, x1, x2, i1, i2, do_flush,
maxn = 0, // max number of characters per line
n = 1 // number of verses
// output a line of words after tune
function put_wline(p, x) {
|
| ︙ | |||
677 678 679 680 681 682 683 | 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 | - + |
R: "info",
T: "title",
X: "title"
}
function write_headform(lwidth) {
var c, font, font_name, align, x, y, sz,
info_val = {},
|
| ︙ |
Changes to core/svg.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | // abc2svg - svg.js - svg functions // |
| ︙ | |||
52 53 54 55 56 57 58 | 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 78 79 80 81 82 83 84 85 | - - - + + + + + + |
// 1: start a block
// 2: start a new page
// glyphs in music font
var tgls = {
"mtr ": {x:0, y:0, c:"\u0020"}, // space
brace: {x:0, y:0, c:"\ue000"},
|
| ︙ | |||
124 125 126 127 128 129 130 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | - + - - + + + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + |
sacc1: {x:-2, y:0, sc: .7, c:"\ue262"}, // small sharp (editorial)
acc2: {x:-3, y:0, c:"\ue263"}, // double sharp
"acc-2": {x:-3, y:0, c:"\ue264"}, // double flat
"acc-1_2": {x:-2, y:0, c:"\ue280"}, // quarter-tone flat
"acc-3_2": {x:-3, y:0, c:"\ue281"}, // three-quarter-tones flat
acc1_2: {x:-1, y:0, c:"\ue282"}, // quarter-tone sharp
acc3_2: {x:-3, y:0, c:"\ue283"}, // three-quarter-tones sharp
|
| ︙ | |||
195 196 197 198 199 200 201 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | - + |
// convert a meter string to a SmuFL encoded string
function m_gl(s) {
return s.replace(/[Cco]\||[co]\.|./g,
function(e) {
var m = tgls["mtr" + e]
//fixme: !! no m.x nor m.y yet !!
// if (!m.x && !m.y)
|
| ︙ | |||
426 427 428 429 430 431 432 | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | + - - + + |
anno_out(s, t, user.anno_start)
}
function a_stop(s, t) {
anno_out(s, t, user.anno_stop)
}
function empty_function() {
}
// the values are updated on generate()
|
| ︙ | |||
554 555 556 557 558 559 560 561 562 563 564 565 566 567 | 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
function xypath(x, y, fill) {
if (fill)
out_XYAB('<path d="mX Y', x, y)
else
out_XYAB('<path class="stroke" d="mX Y', x, y)
}
Abc.prototype.xypath = xypath
// draw all the helper/ledger lines
function draw_all_hl() {
var st, p_st
function hlud(hla, d) {
var hl, hll, i, xp, dx2, x2,
n = hla.length
if (!n)
return
for (i = 0; i < n; i++) { // for all lines
hll = hla[i]
if (!hll || !hll.length)
continue
xp = sx(hll[0][0]) // previous x
output +=
'<path class="stroke" stroke-width="1" d="M' +
xp.toFixed(1) + ' ' +
sy(p_st.y + d * i).toFixed(1)
dx2 = 0
while (1) {
hl = hll.shift()
if (!hl)
break
x2 = sx(hl[0])
output += 'm' +
(x2 - xp + hl[1] - dx2).toFixed(2) +
' 0h' + (-hl[1] + hl[2]).toFixed(2)
xp = x2
dx2 = hl[2]
}
output += '"/>\n'
}
} // hlud()
for (st = 0; st <= nstaff; st++) {
p_st = staff_tb[st]
if (!p_st.hlu)
continue // (staff not yet displayed)
set_sscale(st)
hlud(p_st.hlu, 6)
hlud(p_st.hld, -6)
}
} // draw_all_hl()
// output the list of glyphs and the stems
// [0] = x glyph
// [1] = y glyph
// [2] = glyph code
// [3] = x, y, h of stem (3 values per stem)
var gla = [[], [], "", [], [], []]
|
| ︙ | |||
788 789 790 791 792 793 794 | 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 | - + + - + + + + + + - + - + - + - - - - - - - + - + + + + + + + | y += h; dx /= stv_g.scale; output += '<path class="stroke" d="m'; out_sxsy(x, ' ', y); output += 'v' + h.toFixed(1) + 'l' + dx.toFixed(1) + ' ' + (-dy).toFixed(1) + |
| ︙ | |||
882 883 884 885 886 887 888 | 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 | - + - + - + |
while (--val >= 0) {
xygl(x, 6, "ltr");
x += 6
}
g_close()
}
function out_cresc(x, y, val, defl) {
|
| ︙ | |||
916 917 918 919 920 921 922 923 924 | 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 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 | + + + + - + - - + + + + - - + + - - + + - - + + + + - + - - + + + + - - + + - - + + - - |
y += 4;
if (!defl.nost)
xygl(x, y, "ped");
if (!defl.noen)
xygl(x + val + 6, y, "pedoff")
}
function out_8va(x, y, val, defl) {
if (val < 18) {
val = 18
x -= 4
}
if (!defl.nost) {
out_XYAB('<text x="X" y="Y" \
|
| ︙ | |||
1104 1105 1106 1107 1108 1109 1110 | 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 | - + - + - + - + - - - + - + - + - - + |
set_font("tempo")
if (s.tempo_str1) {
str.push(s.tempo_str1)
w += strwh(s.tempo_str1)[0]
}
if (s.tempo_notes) {
|
| ︙ | |||
1225 1226 1227 1228 1229 1230 1231 | 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 | + + - + - + - - - - |
posy *= cfmt.scale
if (user.imagesize) {
head += user.imagesize +
' viewBox="0 0 ' + img.width.toFixed(0) + ' ' +
posy.toFixed(0) + '">\n'
} else {
head += ' viewBox="0 0 ' + img.width.toFixed(0) + ' ' +
posy.toFixed(0) +
|
| ︙ |
Changes to core/tail.js.
| ︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + + + + + + + + |
init_tune()
// Abc functions used by the modules
Abc.prototype.a_de = function() { return a_de }
Abc.prototype.add_style = function(s) { style += s };
Abc.prototype.cfmt = function() { return cfmt };
Abc.prototype.clone = clone;
|
| ︙ | |||
52 53 54 55 56 57 58 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - |
Abc.prototype.get_posy = function() { var t = posy; posy = 0; return t };
Abc.prototype.get_staff_tb = function() { return staff_tb };
Abc.prototype.get_top_v = function() { return par_sy.top_voice };
Abc.prototype.get_tsfirst = function() { return tsfirst };
Abc.prototype.get_unit = get_unit;
Abc.prototype.get_voice_tb = function() { return voice_tb };
Abc.prototype.glout = glout
|
| ︙ |
Changes to core/tune.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | // abc2svg - tune.js - tune generation // |
| ︙ | |||
53 54 55 56 57 58 59 60 61 | 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | + + - - - - - - - + + + + + + + - + + + + + + + + + |
if (parse.tune_v_opts.hasOwnProperty(opt))
vfilt(parse.tune_v_opts[opt], opt)
}
}
/* -- link a ABC symbol into the current voice -- */
function sym_link(s) {
var tim = curvoice.time
if (!s.fname)
set_ref(s)
|
| ︙ | |||
105 106 107 108 109 110 111 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 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 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | - + - - - + + + - + - - + + - - - - + + + + + + + + + + + + + + + + + + + - + - - + + - + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - + - - + - - - - - + + + + - - + + + - - + + - - - - - - - - - - - - - - - + | } return s } /* -- sort all symbols by time and vertical sequence -- */ // weight of the symbols !! depends on the symbol type !! var w_tb = new Uint8Array([ |
| ︙ | |||
285 286 287 288 289 290 291 | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 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 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - + - - - - - - - - - - - - - - - - - - - - + + + + + + - - + + |
// terminate voice cloning
if (curvoice && curvoice.clone) {
parse.istart = parse.eol
do_cloning()
}
|
| ︙ | |||
466 467 468 469 470 471 472 473 474 475 476 477 478 479 | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | + |
// set the measure number on the top bars
for ( ; s; s = s.ts_next) {
if (!s.seqst)
continue
switch (s.type) {
case C.METER:
if (wmeasure != 1) // if not M:none
bar_num += (s.time - bar_tim) / wmeasure
bar_tim = s.time
wmeasure = s.wmeasure
break
case C.BAR:
if (s.invis)
break
|
| ︙ | |||
541 542 543 544 545 546 547 | 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 | - + - + - + |
// convert a note to ABC
function not2abc(pit, acc) {
var i,
nn = ''
if (acc && acc != 3) {
|
| ︙ | |||
690 691 692 693 694 695 696 697 698 699 700 701 702 703 | 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 | + |
if (sndtran == undefined)
return
} else {
curvoice.vtransp = transp
}
if (is_voice_sig()) { // if no symbol yet
curvoice.okey.fmt = cfmt
curvoice.key = s = clone(curvoice.okey)
} else {
s = curvoice.last_sym
while (1) { // set the transposition in the previous K:
if (s.type == C.KEY)
break
s = s.prev
|
| ︙ | |||
718 719 720 721 722 723 724 725 726 727 728 729 730 731 | 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 | + + + + + + + + |
/* transpose a note / chord */
function note_transp(s, sk, note) {
var ak, an, d, b40,
n = note.pit,
a = note.acc
if (typeof a == "object") {
d = a[1]
a = a[0]
if (d != 2) {
error(1, s, "Microtone transposition not coded")
return
}
}
if (!a && sk.k_a_acc) // if accidental list
a = sk.k_map[(n + 19) % 7] // invisible accidental
b40 = abc2svg.pab40(n, a) + sk.k_transp // base-40 transposition
note.pit = abc2svg.b40p(b40) // new pitch
|
| ︙ | |||
752 753 754 755 756 757 758 | 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 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 825 826 827 828 829 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + |
return // no change
ak = sk.k_map[(note.pit + 19) % 7]
if (ak)
an = 3 // natural
} else {
return // same accidental (in the key)
}
if (d && an != a) {
switch (Number(a)) {
case -3:
switch (an) {
case -2:
an = -1
break
case 3: // natural
an = -3
note.pit++
break
case 2:
an = -1
break
}
break
case -1:
switch (an) {
case -2:
an = -3
break
case 3: // natural
an = 1
break
}
break
case 1:
switch (an) {
case -1:
an = -3
break
case 3: // natural
an = -1
break
case 2:
an = 3
break
}
break
case 3:
switch (an) {
case -1:
an = 1
break
case 1:
an = 1
note.pit++
break
}
break
}
}
|
| ︙ | |||
866 867 868 869 870 871 872 | 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 | - - - - - - - - - - - - - - - - + - + - + + - - |
if (param.slice(-5) == ' lock') {
fmt_lock[cmd] = true;
param = param.slice(0, -5).trim()
} else if (fmt_lock[cmd]) {
return
}
|
| ︙ | |||
959 960 961 962 963 964 965 | 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 | - + - - + - - - - + - - | break default: syntax(1, "Unknown keyword '$1' in %%multicol", param) break } return case "ottava": |
| ︙ | |||
1057 1058 1059 1060 1061 1062 1063 | 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 | - - - + - - + - - - + - - + - - |
return
case "setbarnb":
val = parseInt(param)
if (isNaN(val) || val < 1) {
syntax(1, "Bad %%setbarnb value")
break
}
|
| ︙ | |||
1118 1119 1120 1121 1122 1123 1124 | 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 | - + - + - - + - - - - - + - - - + - - - - - + + - + - + - + - + - - - | case "stafflines": case "staffscale": case "staffnonote": set_v_param(cmd, param) return case "staves": case "score": |
| ︙ | |||
1195 1196 1197 1198 1199 1200 1201 | 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 | - - + - - - - + | case "tune": //fixme: to do return case "user": set_user(param) return case "voicecolor": |
| ︙ | |||
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 | 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 | + + + + |
var i, j, action, s
switch (type) {
case "js":
js_inject(text)
break
case "ml":
if (cfmt.pageheight) {
syntax(1, "Cannot have %%beginml with %%pageheight")
break
}
if (parse.state >= 2) {
s = new_block(type);
s.text = text
} else {
blk_flush()
if (user.img_out)
user.img_out(text)
|
| ︙ | |||
1296 1297 1298 1299 1300 1301 1302 | 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 | + + - + |
}
break
case "text":
action = get_textopt(opt);
if (!action)
action = cfmt.textoption
set_font("text")
if (text.indexOf('\\') >= 0)
text = cnv_escape(text)
|
| ︙ | |||
1325 1326 1327 1328 1329 1330 1331 | 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 | - - + + + + |
}
if (vover) {
syntax(1, "No end of voice overlay");
get_vover(vover.bar ? '|' : ')')
}
|
| ︙ | |||
1435 1436 1437 1438 1439 1440 1441 | 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 | - - - + + + + + + - - - + + + - - - - - - + - - - + - + + + + + + + + + + + + + + + + - + - - + + + |
}
}
return //undefined
}
/* -- get staves definition (%%staves / %%score) -- */
function get_staves(cmd, parm) {
|
| ︙ | |||
1605 1606 1607 1608 1609 1610 1611 | 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 | + + - + + + + + + + + + + + + + + + |
/* change the behaviour of '|' in %%score */
if (cmd[1] == 'c') { /* if %%score */
for (st = 0; st < nstaff; st++)
par_sy.staves[st].flags ^= STOP_BAR
}
nv = voice_tb.length
st = 0
|
| ︙ | |||
1651 1652 1653 1654 1655 1656 1657 | 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 | - | p_voice.sls = [] delete p_voice.nm delete p_voice.snm delete p_voice.new_name delete p_voice.lyric_restart delete p_voice.lyric_cont |
| ︙ | |||
1733 1734 1735 1736 1737 1738 1739 | 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 | - - - - + + + - + + - + - + + - - - + + + - + + |
par_sy.voices[v2].range = range + 1
}
p_voice2.ulen = curvoice.ulen
p_voice2.dur_fact = curvoice.dur_fact
p_voice2.acc = [] // no accidental
if (!vover) { /* first '&' in a measure */
|
| ︙ | |||
1819 1820 1821 1822 1823 1824 1825 | 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 | - - + - - + + - + - - - + + - + - - + + - + + + + + + + - - + + + - - + + - - + + | var v, p_voice, s, transp, sndtran, // [s_key, a] = new_key(parm) // KO with nodejs a = new_key(parm), s_key = a[0]; a = a[1] |
| ︙ | |||
1925 1926 1927 1928 1929 1930 1931 | 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 | - - - - - - - + + + + + + + + |
p_voice = {
v: v,
id: id,
time: 0,
new: true,
pos: {
|
| ︙ | |||
1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 | 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 | + |
nstaff = -1;
voice_tb = [];
curvoice = null;
new_syst(true);
staves_found = -1;
gene = {}
a_de = [] // remove old decorations
cross = {} // new cross voice decorations
}
// treat V: with many voices
function do_cloning() {
var i,
clone = curvoice.clone,
vs = clone.vs,
|
| ︙ | |||
2041 2042 2043 2044 2045 2046 2047 | 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 | - + - - - |
if (vid == '*') {
syntax(1, "Cannot have V:* in tune body")
return
}
curvoice = new_voice(vs[0])
|
| ︙ | |||
2084 2085 2086 2087 2088 2089 2090 | 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 | - + - - + + - - - - - - - - - + - - - - - - - + + + - - + + + + - - + - - - - - - |
&& (parse.voice_opts
|| parse.tune_v_opts)) {
curvoice.filtered = true;
voice_filter()
}
}
|
Changes to edit-de.js.
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | - |
//JS - abc2svg edit - Text in Deutsch
function loadtxt() {
texts = {
bad_nb: 'fehlerhafte Zeilennummer',
fn: 'Filename: ',
load: 'Bitte öffne die eingebundene Datei ',
play: 'Wiedergabe',
stop: 'Stop',
}
var text_kv = {
a: 'Über ...',
b: 'ABC-Files:',
|
| ︙ |
Changes to edit-en.js.
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - |
//JS - abc2svg edit - text in English
function loadtxt() {
texts = {
bad_nb: 'Bad line number',
fn: 'File name: ',
load: 'Please, load the included file ',
}
var text_kv = {
a: 'About',
b: 'ABC files:',
|
| ︙ |
Changes to edit-fr.js.
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - |
//JS - abc2svg edit - textes en français
function loadtxt() {
texts = {
bad_nb: 'Mauvais numéro de ligne',
fn: 'Nom de fichier: ',
load: 'SVP, ouvrez le fichier à inclure ',
}
var text_kv = {
a: 'A propos',
b: 'Fichiers ABC:',
|
| ︙ |
Changes to edit-it.js.
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - |
//JS - abc2svg edit - text in Italian
function loadtxt() {
texts = {
bad_nb: 'Numero di linea errato',
fn: 'Nome file: ',
load: 'Carica il file da includere ',
}
var text_kv = {
a: 'A proposito',
b: 'File ABC:',
|
| ︙ |
Changes to edit-pt_BR.js.
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - |
//JS - abc2svg edit - texto em português do Brasil
function loadtxt() {
texts = {
bad_nb: 'Número de linha incorreto',
fn: 'Nome do arquivo: ',
load: 'Por favor, inclua o arquivo ',
}
var text_kv = {
a: 'Sobre',
b: 'Arquivos ABC:',
|
| ︙ |
Changes to editor/edit.css.
1 2 | 1 2 3 4 5 6 7 8 9 | - |
/* edit.css - file used in the abc2svg editor */
@page {margin:0}
|
| ︙ |
Changes to editor/edit.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | // edit.js - file used in the abc2svg editor // |
| ︙ | |||
210 211 212 213 214 215 216 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | - + + - + + + + + + + + + + + + + |
}
}
elt_ref.diverr.innerHTML = '';
selx[0] = selx[1] = 0;
render2()
}
function render2() {
|
| ︙ | |||
272 273 274 275 276 277 278 279 | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | + + + - + - - + + |
if (o > m)
o = m
return o
} // soffs()
// select a source ABC element on error
function gotoabc(l, c) {
var s = elt_ref.source
selsrc(0)
if (l >= 0)
|
| ︙ | |||
582 583 584 585 586 587 588 | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | - - + + | return sym } sym = sym.ts_prev } // not reached } |
| ︙ | |||
678 679 680 681 682 683 684 685 686 687 688 689 690 691 | 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 | + |
}
play_start(si, ei)
}
// set the version and initialize the playing engine
function edit_init() {
var a, i, e
// loop until abc2svg is fully loaded
if (typeof abc2svg != "object"
|| !abc2svg.modules) {
setTimeout(edit_init, 500)
return
}
|
| ︙ | |||
738 739 740 741 742 743 744 | 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 | - - - + + + |
loadlang(v, true)
}
document.getElementById("abc2svg").innerHTML =
'abc2svg-' + abc2svg.version + ' (' + abc2svg.vdate + ')'
// keep references on the page elements
|
| ︙ | |||
785 786 787 788 789 790 791 | 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 | - - + + + - + - + |
// Math.log(play.abcplay.set_speed()) / Math.log(3);
document.getElementById("gvol").setAttribute("value",
play.abcplay.set_vol() * 10)
document.getElementById("gvl").setAttribute("value",
(play.abcplay.set_vol() * 10).toFixed(2))
});
|
| ︙ | |||
813 814 815 816 817 818 819 | 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 | + - - + + + + + + |
ctxMenu = document.getElementById("ctxMenu");
ctxMenu.style.display = "block";
x = evt.pageX - elt_ref.target.parentNode.offsetLeft
+ elt_ref.target.parentNode.scrollLeft;
y = evt.pageY + elt_ref.target.parentNode.scrollTop;
ctxMenu.style.left = (x - 30) + "px";
ctxMenu.style.top = (y - 10) + "px"
} // showmenu
|
| ︙ | |||
851 852 853 854 855 856 857 | 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 | - + + + + - + |
+ e.value.slice(h)
src_change()
return
}
// check if file
data = evt.dataTransfer.files // FileList object.
if (data.length) {
|
| ︙ |
Changes to editor/edit.xhtml.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | + |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link href="edit-@MAJOR@.css" rel="stylesheet" type="text/css"/>
<script src="edit-@MAJOR@.js" type="text/javascript" async="true"></script>
<script src="abc2svg-@MAJOR@.js" type="text/javascript" async="true"></script>
<script src="pref.js" type="text/javascript" async="true"></script>
<title>ABC edit with abc2svg</title>
</head>
<body ontouchstart="" bgcolor="#faf0e6">
<!-- left -->
<div id="dleft">
|
| ︙ | |||
61 62 63 64 65 66 67 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - + |
<li onclick="loadlang('pt_BR')">Português do Brasil</li>
</ul>
</li>
<li class="dropbutton"><label id="h">Help</label>
<ul class="droplinks">
<li id="ha" onclick="popshow('help', true)">Help</li>
<li><a id="df" target="_blank"
|
| ︙ | |||
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | + - + + | </p> <textarea id="source" rows="40" cols="73" wrap="off" style="font: 14px monospace" ondrop="drop(event)" ondragenter="drag_enter(event)" oninput="src_change()"></textarea> <textarea id="src1" rows="40" cols="73" wrap="off" style="font: 14px monospace; display: none" ondrop="drop(event)" ondragenter="drag_enter(event)" oninput="src_change()"></textarea> </div> <!-- right - needed for the scrollbars --> <div id="dright"> <!-- context menu --> <div id="ctxMenu" title="Play"> <ul class="droplinks"> |
| ︙ |
Changes to err-de.js.
| ︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | + + + + + + + + + + + + + - + + + + + + + + |
"'$1:' line ignored": "'$1:' Zeile ignoriert",
"$1: inside tune - ignored": "$1: innerhalb der Stimme ignoriert",
"!$1! must be on a note": "!$1! muss an einer Note stehen",
"!$1! must be on a note or a rest": "!$1! muss an einer Note oder Pause stehen",
"!$1! must be on the last of a couple of notes": "!$1! muss an der letzten Notengruppe stehen",
"!beamon! must be on a bar": "!beamon! muss an einem Taktstrich stehen",
"%%deco: abnormal h/wl/wr value '$1'": "%%deco: falscher Wert '$1' für h/wl/wr",
"%%combinevoices is deprecated - use %%voicecombine instead":
"%%combinevoices is deprecated - use %%voicecombine instead",
"%%deco: bad C function index '$1'": "%%deco: falscher C Funktionsindex '$1'",
"%%deco: bad C function value '$1'": "%%deco: falscher C Funtionswert '$1'",
"%%multicol end without start": "%%multicol end ohne start",
"%%multicol new without start": "%%multicol new ohne start",
"%%repeat cannot start a tune": "%%repeat kann nicht am Anfang einer Stimme stehen",
"%%staffwidth too big": "%%staffwidth zu groß",
"%%staffwidth too small": "%%staffwidth zu klein",
"%%tune not treated yet": "%%tune noch nicht behandelt",
"%%vskip cannot be negative": "%%vskip kann nicht negativ sein",
"Bad !xstem!": "!xstem! fehlerhaft",
"Bad %%setbarnb value": "fehlerhaft Wert für %%setbarnb",
"Bad %%staff number $1 (cur $2, max $3)": "falsche %%staff Nummer $1 (cur $2, max $3)",
"Bad %%staff value '$1'": "fehlerhafte %%staff Nummer '$1'",
"Bad %%stafflines value": "fehlerhafter Wert für %%stafflines",
"Bad %%staffnonote value": "Bad %%staffnonote value",
"Bad %%staffscale value": "fehlerhafter Wert für %%staffscale",
"Bad char '$1' in M:": "fehlerhaftes Zeichen '$1' in M:",
"Bad character '$1'": "fehlerhaftes Zeichen '$1'",
"Bad character in grace note sequence":
"fehlerhaftes Zeichen in Sequenz von Vorschlagnoten",
"Bad controller number in %%MIDI": "Bad controller number in %%MIDI",
"Bad controller value in %%MIDI": "Bad controller value in %%MIDI",
"Bad duration '$1' in M:": "fehlerhafte Dauer '$1' in M:",
"Bad integer value": "fehlerhafte Ganzzahl",
"Bad instr= value": "fehlerhafter Wert für instr=",
"Bad L: value": "fehlerhafter Wert für L:",
"Bad length of the macro sequence": "Bad length of the macro sequence",
"Bad measure duration": "Bad measure duration",
"Bad note in %%map": "fehlerhafte Note in %%map",
"Bad page width": "fehlerhafte Seitenbreite",
"Bad program in %%MIDI": "falsches Program in %%MIDI",
"Bad scale value in %%font": "fehlerhafter Wert für scale in %%font",
"Bad strings in tablature": "Bad strings in tablature",
"Bad tempo value": "fehlerhafter Wert für tempo",
"Bad tie": "fehlerhafter Haltebogen",
"Bad transpose value": "fehlerhafter Wert für transpose",
"Bad user character '$1'": "falsches benutzerdefiniertes Zeichen '$1' in U:/%%user",
"Bad value '$1' in %%linebreak - ignored": "fehlerhafter Wert '$1' in %%linebreak - ignoriert",
"Bad value in $1": "fehlerhafter Wert in $1",
"Bad voice ID in %%score": "fehlerhafte ID für Stimme in %%score",
"Bar in repeat sequence": "Taktstrich in Wiederholungssequenz",
"Cannot have !$1! on a head": "!$1! im Kopfbereich nicht erlaubt",
"Cannot have '$1' inside a tune": "'$1' innerhalb einer Stimme nicht erlaubt",
"Cannot have %%beginml with %%pageheight":
"Cannot have %%beginml with %%pageheight",
"Cannot have a bar in grace notes": "Taktstrich in Vorschlagnote nicht erlaubt",
"Cannot have a broken rhythm in grace notes": "gebrochener Rythmus in Ziernoten nicht erlaubt",
"Cannot have V:* in tune body": "V:* im Notenbereich nicht erlaubt",
"Cannot read file '$1'": "File '$1' kann nicht gelesen werden",
"Decoration ignored": "Dekoration ignoriert",
"Decoration without symbol": "Decoration without symbol",
"Double voice in %%score": "Double voice in %%score",
"Empty line in tune header - ignored": "Leerzeile in Kopfbereich - ignoriert",
"End of slur without start": "End of slur without start",
"Erroneous end of voice overlay":
"Fehlerhaftes Ende einer Stimme in Stimm-Überlagerung",
"Error in %%pos": "Error in %%pos",
"Error loading the module $1": "Error loading the module $1",
"Incorrect 1st value in %%repeat": "erster Wert fehlerhaft in %%repeat",
"Incorrect 2nd value in %%repeat": "zweiter Wert fehlerhaft in %%repeat",
"Invalid 'r' in tuplet": "'r' fehlerhaft in Tuplet",
"Invalid decoration '$1'": "fehlerhafte Dekoration '$1'",
"Invalid note duration $1": "Fehlerhafte Notendekoration '$1'",
"K:P is deprecated": "K:P is deprecated",
"Lack of ']'": "']' fehlt",
"Lack of bar after multi-measure rest":
"Lack of bar after multi-measure rest",
"Lack of ending slur(s)": "Lack of ending slur(s)",
"Lack of starting [, ! or \" in U: / %%user":
"[, ! or \" fehlt in U: / %%user",
"Line split problem - adjust maxshrink and/or breaklimit":
"Probleme beim Aufteilen der Zeile - justiere maxshrink und/oder breaklimit",
"Line too much shrunk $1 $2 $3": "Zeile zu stark geschrumpft $1 $2 $3",
"Line underfull ($1pt of $2pt)": "Zeile nicht voll genug ($1pt of $2pt)",
"Microtone transposition not coded":
"Microtone transposition not coded",
"Misplaced '$1' in %%score": "'$1' fehlerhaft platziert in %%score",
"Misplaced dot": "fehlerhaft platzierter Punkt",
"Mix of old and new transposition syntaxes":
"Mix von alter und neuer Transponierungs-syntax",
"No $1 after %%$2": "kein $1 nach %%$2",
"No </defs> in %%beginsvg sequence": "kein </defs> in %%beginsvg squenz",
"No </style> in %%beginsvg sequence": "kein </style> in %%beginsvg sequenz",
"No accidental after 'exp'": "kein Vorzeichen nach 'exp'",
"No end of decoration": "kein Ende der Dekoration",
"No end of grace note sequence": "kein Ende der Vorschlagnoten",
|
Changes to err-fr.js.
| ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | + + + + + + + + + + + + + - + + + + | "$1: inside tune - ignored": "$1: en milieu de morceau - ignoré", "!$1! must be on a note": "!$1! doit être sur une note", "!$1! must be on a note or a rest": "!$1! doit être sur une note ou un silence", "!$1! must be on the last of a couple of notes": "!$1! doit être sur la 2ème note d'un couple", "!beamon! must be on a bar": "!beamon! doit être sur une barre", "%%combinevoices is deprecated - use %%voicecombine instead": "%%combinevoices est déprécié - remplacer par %%voicecombine", "%%deco: abnormal h/wl/wr value '$1'": "%%deco: valeur '$1' anormale pour h/wl/wr", "%%deco: bad C function index '$1'": "%%deco: mauvais index de fonction '$1'", "%%deco: bad C function value '$1'": "%%deco: mauvaise valeur de fonction '$1'", "%%multicol end without start": "%%multicol end sans start", "%%multicol new without start": "%%multicol new sans start", "%%repeat cannot start a tune": "%%repeat ne peut pas être en début de morceau", "%%staffwidth too big": "%%staffwidth trop grand", "%%staffwidth too small": "%%staffwidth trop petit", "%%tune not treated yet": "%%tune n'est pas encore traité", "%%vskip cannot be negative": "%%vskip ne peut pas être négatif", "Bad !xstem!": "!xstem! erroné", "Bad %%setbarnb value": "Valeur incorrecte dans %%setbarnb", "Bad %%staff number $1 (cur $2, max $3)": "Numéro %%staff $1 incorrect (cur $2, max $3)", "Bad %%staff value '$1'": "Valeur incorrecte '$1' dans %%staff", "Bad %%stafflines value": "Valeur incorrecte dans %%stafflines", "Bad %%staffnonote value": "Valeur incorrecte dans %%staffnonote", "Bad %%staffscale value": "Valeur incorrecte dans %%staffscale", "Bad char '$1' in M:": "Mauvais caractère '$1' dans M:", "Bad character '$1'": "Mauvais caractère '$1'", "Bad character in grace note sequence": "Caractère incorrect dans notes d'agrément", "Bad controller number in %%MIDI": "Mauvais numéro de controleur dans %%MIDI", "Bad controller value in %%MIDI": "Mauvaise valeur de controle dans %%MIDI", "Bad duration '$1' in M:": "Durée '$1' incorrecte dans M:", "Bad integer value": "Mauvaise valeur entière", "Bad instr= value": "Mauvaise valeur de instr=", "Bad L: value": "Mauvaise valeur pour L:", "Bad length of the macro sequence": "Mauvaise durée de la séquence macro", "Bad measure duration": "Mauvaise durée de la mesure", "Bad note in %%map": "Note incorrecte dans %%map", "Bad page width": "Mauvaise largeur de page", "Bad program in %%MIDI": "Mauvais 'program' dans %%MIDI", "Bad scale value in %%font": "Mauvaise échelle dans %%font", "Bad strings in tablature": "Mauvaise valeur dans la tablature", "Bad tempo value": "Mauvaise valeur de tempo", "Bad tie": "Mauvaise liaison de prolongation", "Bad transpose value": "Mauvaise valeur de transposition", "Bad user character '$1'": "Caractère illégal '$1' dans U:/%%user", "Bad value '$1' in %%linebreak - ignored": "Valeur incorrecte '$1' dans %%linebreak - ignorée", "Bad value in $1": "Mauvaise valeur dans $1", "Bad voice ID in %%score": "Mauvaise identité de voix dans %%score", "Bar in repeat sequence": "Barre dans la séquence à répéter", "Cannot have !$1! on a head": "!$1! ne peut pas être sur une tête de note", "Cannot have '$1' inside a tune": "'$1' ne peut pas être dans un morceau", "Cannot have %%beginml with %%pageheight": "On ne peut pas avoir %%beginml avec %%pageheight", "Cannot have a bar in grace notes": "Il ne peut pas y avoir de barre dans les notes d'agrément", "Cannot have a broken rhythm in grace notes": "Il ne peut pas y avoir '<' ou '>' dans les notes d'agrément", "Cannot have V:* in tune body": "Il ne peut pas y avoir V:* dans le corps du morceau", "Cannot read file '$1'": "Fichier '$1' inexistant", "Decoration ignored": "Décoration ignorée", "Decoration without symbol": "Pas de symbole où mettre la décoration", "Double voice in %%score": "Voix en double dans %%score", "Empty line in tune header - ignored": "Ligne vide dans en-tête de morceau - ignorée", "End of slur without start": "Fin de liaison sans début", "Erroneous end of voice overlay": "Fin de superposition de voix erronée", "Error in %%pos": "Erreur dans %%pos", "Error loading the module $1": "Erreur de chargement du module $1", "Incorrect 1st value in %%repeat": "Première valeur incorrecte dans %%repeat", "Incorrect 2nd value in %%repeat": "Deuxième valeur incorrecte dans %%repeat", "Invalid 'r' in tuplet": "'r' invalide dans le tuplet", "Invalid decoration '$1'": "Décoration '$1' invalide", "Invalid note duration $1": "Durée de note $1 invalide", "K:P is deprecated": "K:P est déprécié", "Lack of ']'": "']' manquant", "Lack of bar after multi-measure rest": "Manque de barre de mesure après silence multiple", "Lack of ending slur(s)": "Pas de fin de liaison(s)", 'Lack of starting [, ! or " in U: / %%user': 'U: / %%user ne commence pas par [, ! ou "', "Line split problem - adjust maxshrink and/or breaklimit": "Problème de découpe en lignes - ajuster maxshrink et/ou breaklimit", "Line too much shrunk $1 $2 $3": "Ligne trop compressée $1 $2 $3", "Line underfull ($1pt of $2pt)": "Trop d'espacement ($1pt of $2pt)", "Microtone transposition not coded": "Transposition de microtonalité pas codée", "Misplaced '$1' in %%score": "'$1' mal placé dans %%score", "Misplaced dot": "Point mal placé", "Mix of old and new transposition syntaxes": "Mélange des syntaxes de transposition ancienne et nouvelle", "No $1 after %%$2": "Pas de $1 après %%$2", "No </defs> in %%beginsvg sequence": "Pas de </defs> dans séquence %%beginsvg", "No </style> in %%beginsvg sequence": "Pas de </style> dans séquence %%beginsvg", "No accidental after 'exp'": "Pas d'altération après 'exp'", "No end of decoration": "Pas de fin de décoration", "No end of grace note sequence": "Pas de fin de notes d'agrément", |
| ︙ | |||
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | + + + + + | "Pas assez de mesures pour %%repeat", "Not enough parameters in %%map": "Pas assez de paramètres dans %%map", "Not enough notes/rests for %%repeat": "Pas assez de notes/silences pour %%repeat", "Note too long": "Durée de note trop longue", "Note too short": "Durée de note trop courte", "Start of slur without note": "Début de liaison sans note", "s: without music": "s: sans musique", "There cannot be chord symbols on measure bars": "On ne peut pas mettre d'indication d'accord sur une barre de mesure", "Too many elements in symbol line": "Trop d'éléments dans ligne s:", "Too many include levels": "Trop de niveaux d'inclusion de fichier", "Too many ties": "Trop de liaisons de prolongation", "Too many words in lyric line": "Trop de mots dans la ligne de paroles", "Unknown bagpipe-like key": "Armature de cornemuse inconnue", "Unknown clef '$1'": "Clé '$1' inconnue", "Unknown decoration '$1'": "Décoration '$1' inconnue", "Unknown font $1": "Police $1 inconnue", "Unknown glyph: '$1'": "Glyph '$1' inconnu", "Unknown keyword '$1' in %%multicol": "Mot clé '$1' inconnu dans %%multicol", "Unsecure code": "Code dangereux", "Unterminated string": "Chaine de caractères non terminée", "Unterminated string in Q:": "Chaine de caractères non terminée dans Q:", "Variant ending on a left repeat bar": "Variante sur la barre de début de séquence répétée", "Voice overlay already started": "Superposition de voix déjà démarrée", "w: without music": "w: sans musique", "Wrong duration in voice overlay": "Mauvaise durée de la voix superposée" } |
Changes to err-it.js.
| ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | + + + + + + + + + + + + + + - + + + + + + + + | "$1: inside tune - ignored": "$1: nel corpo del brano - ignorato", "!$1! must be on a note": "!$1! deve stare su di una nota", "!$1! must be on a note or a rest": "!$1! deve stare su una nota o su una pausa", "!$1! must be on the last of a couple of notes": "!$1! deve stare sulla seconda di due note", "!beamon! must be on a bar": "!beamon! deve stare su una stanghetta", "%%combinevoices is deprecated - use %%voicecombine instead": "%%combinevoices is deprecated - use %%voicecombine instead", "%%deco: abnormal h/wl/wr value '$1'": "%%deco: valore '$1' illegale per h/wl/wr", "%%deco: bad C function index '$1'": "%%deco: indice errato per la funzione C '$1'", "%%deco: bad C function value '$1'": "%%deco: valore errato per la funzione C '$1'", "%%multicol end without start": "%%multicol end senza start", "%%multicol new without start": "%%multicol new senza start", "%%repeat cannot start a tune": "%%repeat non può stare all'inizio del brano", "%%staffwidth too big": "%%staffwidth troppo grande", "%%staffwidth too small": "%%staffwidth troppo piccolo", "%%tune not treated yet": "%%tune non ancora gestito", "%%vskip cannot be negative": "%%vskip non può essere negativo", "Bad !xstem!": "!xstem! errato", "Bad %%setbarnb value": "Valore errato in %%setbarnb", "Bad %%staff number $1 (cur $2, max $3)": "Numero $1 in %%staff errato (attuale $2, max $3)", "Bad %%staff value '$1'": "Valore errato '$1' in %%staff", "Bad %%stafflines value": "Valore errato in %%stafflines", "Bad %%staffnonote value": "Bad %%staffnonote value", "Bad %%staffscale value": "Valore errato in %%staffscale", "Bad char '$1' in M:": "Carattere errato '$1' in M:", "Bad character '$1'": "Carattere errato '$1'", "Bad character in grace note sequence": "Carattere errato nelle note di abbellimento", "Bad controller number in %%MIDI": "Numero errato del controller in %%MIDI", "Bad controller value in %%MIDI": "Valore errato del controller in %%MIDI", "Bad duration '$1' in M:": "Durata '$1' errata in M:", "Bad integer value": "Valore intero errato", "Bad instr= value": "Valore errato di instr=", "Bad L: value": "Valore errato per L:", "Bad length of the macro sequence": "Bad length of the macro sequence", "Bad measure duration": "Bad measure duration", "Bad note in %%map": "Nota errata in %%map", "Bad page width": "Larghezza di pagina errata", "Bad program in %%MIDI": "Numero di programma non valido in %%MIDI", "Bad scale value in %%font": "Valore di scala non valido in %%font", "Bad strings in tablature": "Bad strings in tablature", "Bad tempo value": "Bad tempo value", "Bad tie": "Legatura non valida", "Bad transpose value": "Valore non valido per la trasposizione", "Bad user character '$1'": "Carattere illegale '$1' in U:/%%user", "Bad value '$1' in %%linebreak - ignored": "Valore errato '$1' in %%linebreak - ignorato", "Bad value in $1": "Valore errato in $1", "Bad voice ID in %%score": "ID di voce non valido in %%score", "Bar in repeat sequence": "Stanghetta in sequenza ripetuta", "Cannot have !$1! on a head": "!$1! non è consentito su una nota", "Cannot have '$1' inside a tune": "'$1' non è consentito entro il brano", "Cannot have %%beginml with %%pageheight": "Cannot have %%beginml with %%pageheight", "Cannot have a bar in grace notes": "Stanghette non consentite nelle note di abbellimento", "Cannot have a broken rhythm in grace notes": "'Broken rhythm' non consentito nelle note di abbellimento", "Cannot have V:* in tune body": "V:* non consentito nel corpo del brano", "Cannot read file '$1'": "File '$1' inesistente", "Decoration ignored": "Decorazione ignorata", "Decoration without symbol": "Decoration without symbol", "Double voice in %%score": "Double voice in %%score", "Empty line in tune header - ignored": "Linea vuota nella testata - ignorata", "End of slur without start": "End of slur without start", "Erroneous end of voice overlap": "Fine di voice overlay errata", "Error in %%pos": "Error in %%pos", "Error loading the module $1": "Error loading the module $1", "Incorrect 1st value in %%repeat": "Primo valore in %%repeat errato", "Incorrect 2nd value in %%repeat": "Secondo valore in %%repeat errato", "Invalid 'r' in tuplet": "'r' non valido in gruppo irregolare", "Invalid decoration '$1'": "Decorazione '$1' non valida", "Invalid note duration $1": "Durée de note $1 non valida", "K:P is deprecated": "K:P is deprecated", "Lack of ']'": "']' mancante", "Lack of bar after multi-measure rest": "Lack of bar after multi-measure rest", "Lack of ending slur(s)": "Lack of ending slur(s)", 'Lack of starting [, ! or " in U: / %%user': 'U: / %%user non inizia con [, ! o "', "Line split problem - adjust maxshrink and/or breaklimit": "Problema di linea divisa - modificare maxshrink e/o breaklimit", "Line too much shrunk $1 $2 $3": "Linea troppo compressa $1 $2 $3", "Line underfull ($1pt of $2pt)": "Linea troppo vuota ($1pt di $2pt)", "Microtone transposition not coded": "Microtone transposition not coded", "Misplaced '$1' in %%score": "'$1' in posizione errata in %%score", "Misplaced dot": "Punto in posizione errata", "Mix of old and new transposition syntaxes": "Sintassi di trasposizione vecchia e nuova allo stesso tempo", "No $1 after %%$2": "Manca $1 dopo %%$2", "No </defs> in %%beginsvg sequence": "Manca </defs> nella sequenza %%beginsvg", "No </style> in %%beginsvg sequence": "manca </style> nella sequenza %%beginsvg", "No accidental after 'exp'": "Manca l'alterazione dopo 'exp'", "No end of chord symbol/annotation": "Accordo di accompagnamento non terminato", "No end of decoration": "Decorazione non terminata", "No end of grace note sequence": "Sequenza di note di abbellimento non terminata", |
Changes to err-pt_BR.js.
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | - + + + + - + + - + - + + + + + + - + + + - - + + + + - + + + + + + + + + | //JS abc2svg - Brazilian Portuguese translation of the error codes: // Tradução dos códigos de erro para português brasileiro // Adicione este arquivo na linha de comando para obter as // mensagens de erro em português do Brasil. |
Changes to font.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 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 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - + + + + + - - + + - - - - - + + + + + - + - - + - - + - - - - - - - - + + + + + + - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - + + + - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + - - - - - - - + + + + + + + + + + + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + - - - - - + + + + - - + - - - - + + + + - - + - - - - - + + + + - - + + - - - + + + - - + + - - - - - - - + + - - + + - - - + + - - - - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - + + + + - - - - - - - - - - - - + + + + + + + + + + + - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + + |
// abc2svg music font
var musicfont = 'url("data:application/octet-stream;base64,\
|
| ︙ | |||
352 353 354 355 356 357 358 | 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | HAAAJSYjIgYVFBcWMzI2NTQTMxEUBiMiJyY1NDYzMhcBJA0lPJcGCyY8lwIdfkhPJA9+SEAkRBdh\ KwoJF2ErCQJu/W5DZ0MeHUNnLQAAAAABAAD/eQFAAqgADQAAATMRFAYjIiY1NDYzMhcBIh55WTI8\ elgxHwKo/YBGaTgnRWocAAAAAQAA/3kCCgKoABoAAAERFAYjIiY1NDYzMhcRNTMeBBUUBzY1NAFA\ eVkyPHpYMR8eBi45OCUyEgG5/m9GaTgnRWocAU7vNVxHTnVJSHJBSe8AAAAAAgAA/3kCCwKoAB8A\ KAAAJTURMx4EFRQHFhUUBzY1NCYjERQGIyImNTQ2MzITHgEXNDY1NCYBIh4JMDg2IxUWIgV2OHlZ\ Mjx6WDE9DoUbAXZr5gFXJEc7QlgzJTIwJC5BGSFfnv7WRmk4J0VqAXY7ojUDDgNfnwAAAQAA/84A\ ZAAyAAcAABYiJjQ2MhYURyodHSodMh0qHR0qAAAAAAAOAK4AAQAAAAAAAACDAQgAAQAAAAAAAQAH\ |
Changes to font/abc2svg.sfd.
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - - + + - + | SplineFontDB: 3.2 FontName: abc2svg FullName: abc2svg FamilyName: abc2svg Weight: Regular Copyright: Copyright \\251 2018-2019 Jean-Francois Moine. This font is licensed under the SIL Open Font License \\(http://scripts.sil.org/OFL\\). Version: ItalicAngle: 0 UnderlinePosition: 0 UnderlineWidth: 0 |
| ︙ | |||
46 47 48 49 50 51 52 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - + - + | Encoding: Custom Compacted: 1 UnicodeInterp: none NameList: Adobe Glyph List DisplaySize: -96 AntiAlias: 1 FitToEm: 1 |
| ︙ | |||
127 128 129 130 131 132 133 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | - + - - + + - + - - - - - + + + + + | 0 1000 l 5 EndSplineSet Validated: 1 EndChar StartChar: uniE038 Encoding: 4 57400 4 |
| ︙ | |||
734 735 736 737 738 739 740 | 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 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 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 | - - - + + + - - + + - - - + + + - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + | StartChar: uniE07D Encoding: 18 57469 18 Width: 200 Flags: HMW LayerCount: 2 Fore SplineSet |
| ︙ | |||
801 802 803 804 805 806 807 | 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 | - + | 115 100 l 29 0 0 l 25 EndSplineSet Validated: 1 EndChar StartChar: uniE082 |
| ︙ | |||
836 837 838 839 840 841 842 | 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 | - + | 28 25 0 60 0 128 c 0 0 213 102 250 199 250 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE083 |
| ︙ | |||
873 874 875 876 877 878 879 | 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 | - + | 252 177 223 213 175 213 c 0 131 213 109 193 102 170 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniE084 |
| ︙ | |||
904 905 906 907 908 909 910 | 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 | - + | 325 -160 l 5 325 -209 l 5 EndSplineSet Validated: 1 EndChar StartChar: uniE085 |
| ︙ | |||
939 940 941 942 943 944 945 | 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 | - + | 25 -217 0 -176 0 -152 c 0 0 -135 3 -113 18 -95 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE086 |
| ︙ | |||
969 970 971 972 973 974 975 | 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 | - + | 1 133 74 250 200 250 c 0 257 250 298 244 340 205 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE087 |
| ︙ | |||
992 993 994 995 996 997 998 | 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 | - + | 305 125 280 121 268 121 c 0 194 121 173 161 97 161 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE088 |
| ︙ | |||
1023 1024 1025 1026 1027 1028 1029 | 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 | - + | 93 -250 0 -194 0 -130 c 0 0 -77 50 -44 108 -16 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniE089 |
| ︙ | |||
1053 1054 1055 1056 1057 1058 1059 | 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 | - + | 384 -133 311 -250 185 -250 c 0 128 -250 87 -244 45 -205 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE08A |
| ︙ | |||
1085 1086 1087 1088 1089 1090 1091 | 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 | - + | 244 130 265 164 302 164 c 2 303 164 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniE08B |
| ︙ | |||
1130 1131 1132 1133 1134 1135 1136 | 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 | - + | 119 -58 126 -133 158 -175 c 0 165 -184 172 -191 180 -197 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniE08C |
| ︙ | |||
1155 1156 1157 1158 1159 1160 1161 | 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 | - + - + - + | 0 -35 l 25 0 35 l 25 EndSplineSet Validated: 1 EndChar StartChar: uniE094 |
| ︙ | |||
1223 1224 1225 1226 1227 1228 1229 | 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 | - + | 87 85 176 130 312 130 c 0 448 130 537 80 537 0 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE0A1 |
| ︙ | |||
1252 1253 1254 1255 1256 1257 1258 | 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 | - + - + | 0 -220 l 25 0 220 l 29 EndSplineSet Validated: 1 EndChar StartChar: uniE0A2 |
| ︙ | |||
1298 1299 1300 1301 1302 1303 1304 | 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 | - + - + | 0 70 105 148 198 148 c 4 245 148 288 128 313 81 c 4 EndSplineSet Validated: 1 EndChar StartChar: uniE0A4 |
| ︙ | |||
1338 1339 1340 1341 1342 1343 1344 | 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 | - + | 132 -0 l 1 -2 113 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniE0B3 |
| ︙ | |||
1374 1375 1376 1377 1378 1379 1380 | 1426 1427 1428 1429 1430 1431 1432 1433 1434 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 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 | - + - + - + - + - + - + | 300 -83 233 -150 150 -150 c 24 67 -150 0 -83 0 0 c 24 EndSplineSet Validated: 1 EndChar StartChar: uniE101 |
| ︙ | |||
1487 1488 1489 1490 1491 1492 1493 | 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 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 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 | - + - + - + - + - + | 0 560 l 1 0 680 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniE1F7 |
| ︙ | |||
1592 1593 1594 1595 1596 1597 1598 | 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 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 1711 1712 1713 1714 | - + - + - + - + | 160 933 180 916 180 890 c 0 180 847 149 810 80 810 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE200 |
| ︙ | |||
1673 1674 1675 1676 1677 1678 1679 | 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 | - + | 291 -485 292 -479 292 -472 c 4 292 -278 101 -171 30 -171 c 5 EndSplineSet Validated: 1 EndChar StartChar: uniE243 |
| ︙ | |||
1698 1699 1700 1701 1702 1703 1704 | 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 | - + | 292 479 291 484 291 491 c 1 226 365 56 278 30 171 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniE244 |
| ︙ | |||
1731 1732 1733 1734 1735 1736 1737 | 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 | - + | 292 -135 105 -28 32 -28 c 0 31 -28 31 -28 30 -28 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniE245 |
| ︙ | |||
1762 1763 1764 1765 1766 1767 1768 | 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 | - + | 292 480 291 486 291 493 c 1 226 367 56 280 30 171 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniE246 |
| ︙ | |||
1799 1800 1801 1802 1803 1804 1805 | 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 | - + | 291 -145 292 -139 292 -132 c 0 292 62 101 169 30 169 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniE247 |
| ︙ | |||
1836 1837 1838 1839 1840 1841 1842 | 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 | - + | 292 450 291 457 291 464 c 1 226 338 56 251 30 142 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniE248 |
| ︙ | |||
1879 1880 1881 1882 1883 1884 1885 | 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 | - + | 291 45 292 51 292 58 c 0 292 252 101 359 30 359 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniE249 |
| ︙ | |||
1922 1923 1924 1925 1926 1927 1928 | 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 | - + | 292 411 291 418 291 425 c 1 226 299 56 213 30 103 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniE260 |
| ︙ | |||
1947 1948 1949 1950 1951 1952 1953 | 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 | - + | 40 108 l 1 63 142 93 160 133 160 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE261 |
| ︙ | |||
1973 1974 1975 1976 1977 1978 1979 | 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 | - + | 1 377 l 1 28 378 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniE262 |
| ︙ | |||
2018 2019 2020 2021 2022 2023 2024 | 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 | - + | 83 -189 l 5 83 -360 l 5 EndSplineSet Validated: 1 EndChar StartChar: uniE263 |
| ︙ | |||
2054 2055 2056 2057 2058 2059 2060 | 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 | - + | 267 -124 l 1 195 -124 l 9 EndSplineSet Validated: 1 EndChar StartChar: uniE264 |
| ︙ | |||
2101 2102 2103 2104 2105 2106 2107 | 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 | - + - + - + | 219 113 l 1 235 143 256 163 291 163 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE26a |
| ︙ | |||
2162 2163 2164 2165 2166 2167 2168 | 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 | - + | 76 -20 50 28 50 75 c 0 50 124 97 160 141 160 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE281 |
| ︙ | |||
2209 2210 2211 2212 2213 2214 2215 | 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 | - + | 219 113 l 1 235 143 256 163 291 163 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE282 |
| ︙ | |||
2241 2242 2243 2244 2245 2246 2247 | 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 | - + | 68 152 l 1 68 320 l 8 EndSplineSet Validated: 1 EndChar StartChar: uniE283 |
| ︙ | |||
2299 2300 2301 2302 2303 2304 2305 | 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 | - + | 233 101 l 1 172 83 l 9 EndSplineSet Validated: 1 EndChar StartChar: uniE4A0 |
| ︙ | |||
2326 2327 2328 2329 2330 2331 2332 | 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 | - + - + - + - + - + | 319 109 314 101 305 98 c 1 18 1 l 0 EndSplineSet Validated: 1 EndChar StartChar: uniE4A2 |
| ︙ | |||
2417 2418 2419 2420 2421 2422 2423 | 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + | 332 120 359 92 359 60 c 3 359 27 333 0 299 0 c 3 EndSplineSet Validated: 1 EndChar StartChar: uniE4CE |
| ︙ | |||
2527 2528 2529 2530 2531 2532 2533 | 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 | - + | 122 193 l 1 41 391 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniE4E6 |
| ︙ | |||
2551 2552 2553 2554 2555 2556 2557 | 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 | - + | 58 -227 l 1 171 60 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniE4E7 |
| ︙ | |||
2580 2581 2582 2583 2584 2585 2586 | 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 | - + | 86 -488 l 1 171 -196 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniE4E8 |
| ︙ | |||
2616 2617 2618 2619 2620 2621 2622 | 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 | - + | 158 -176 182 -160 188 -142 c 1 246 60 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniE4E9 |
| ︙ | |||
2659 2660 2661 2662 2663 2664 2665 | 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 | - + | 86 -744 l 1 171 -452 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniE4EA |
| ︙ | |||
2708 2709 2710 2711 2712 2713 2714 | 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 | - - - - - - - - - - - - - - - - - - - - - - - - - - - + | 210 -138 205 -157 187 -178 c 1 233 -178 257 -162 263 -144 c 1 319 52 l 1 EndSplineSet Validated: 1 EndChar |
| ︙ | |||
2761 2762 2763 2764 2765 2766 2767 | 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 | - + | 109 -250 l 1 -16 -250 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniE501 |
| ︙ | |||
2794 2795 2796 2797 2798 2799 2800 | 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 | - + | 334 -250 l 5 212 -250 l 5 EndSplineSet Validated: 1 EndChar StartChar: uniE520 |
| ︙ | |||
2832 2833 2834 2835 2836 2837 2838 | 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 | - + | 341 280 380 248 380 180 c 0 380 87 319 0 220 0 c 4 EndSplineSet Validated: 1 EndChar StartChar: uniE521 |
| ︙ | |||
2880 2881 2882 2883 2884 2885 2886 | 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 | - + | 170 213 153 206 148 193 c 4 80 21 l 4 EndSplineSet Validated: 1 EndChar StartChar: uniE522 |
| ︙ | |||
2916 2917 2918 2919 2920 2921 2922 | 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 | - + | 233 230 229 230 196 230 c 1 153 -26 80 -160 -50 -160 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE523 |
| ︙ | |||
2945 2946 2947 2948 2949 2950 2951 | 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 | - + | 212 165 190 182 190 200 c 0 190 216 196 224 208 231 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE524 |
| ︙ | |||
2975 2976 2977 2978 2979 2980 2981 | 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 | - + | 186 137 200 115 200 85 c 0 200 26 156 0 80 0 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE525 |
| ︙ | |||
3011 3012 3013 3014 3015 3016 3017 | 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 | - + | 56 2 50 23 31 23 c 0 19 23 6 15 -10 3 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE529 |
| ︙ | |||
3127 3128 3129 3130 3131 3132 3133 | 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 | - + | 835.665333312 135.693575703 831.068143327 108.945807045 831.068143327 87.1471403297 c 0 831.068143327 62.5417301443 836.925393958 44.2419393862 847 40 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE52A |
| ︙ | |||
3219 3220 3221 3222 3223 3224 3225 | 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 | - + | 185.665333312 135.693575703 181.068143327 108.945807045 181.068143327 87.1471403297 c 0 181.068143327 62.5417301443 186.925393958 44.2419393862 197 40 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE52B |
| ︙ | |||
3283 3284 3285 3286 3287 3288 3289 | 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 | - + | 510.665333312 135.693575703 506.068143327 108.945807045 506.068143327 87.1471403297 c 0 506.068143327 62.5417301443 511.925393958 44.2419393862 522 40 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE52C |
| ︙ | |||
3355 3356 3357 3358 3359 3360 3361 | 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 | - + | 616.665333312 135.693575703 612.068143327 108.945807045 612.068143327 87.1471403297 c 0 612.068143327 62.5417301443 617.925393958 44.2419393862 628 40 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE52D |
| ︙ | |||
3428 3429 3430 3431 3432 3433 3434 | 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 | - + | 676 230 672 230 639 230 c 1 596 -26 523 -160 393 -160 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE52F |
| ︙ | |||
3482 3483 3484 3485 3486 3487 3488 | 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 | - + | 192 -120 202 -124 217 -124 c 0 280 -124 284 -35 351 230 c 9 EndSplineSet Validated: 1 EndChar StartChar: uniE530 |
| ︙ | |||
3554 3555 3556 3557 3558 3559 3560 | 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 | - + | 295 400 285 404 270 404 c 0 228 404 217 332 204 270 c 9 EndSplineSet Validated: 1 EndChar StartChar: uniE531 |
| ︙ | |||
3644 3645 3646 3647 3648 3649 3650 | 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 | - + | 562 400 552 404 537 404 c 0 495 404 485 332 472 271 c 9 EndSplineSet Validated: 1 EndChar StartChar: uniE539 |
| ︙ | |||
3722 3723 3724 3725 3726 3727 3728 | 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 | - + | 465 230 461 230 428 230 c 1 385 -26 312 -160 182 -160 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE566 |
| ︙ | |||
3762 3763 3764 3765 3766 3767 3768 | 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 | - + | 230 0 l 1 242 40 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniE567 |
| ︙ | |||
3799 3800 3801 3802 3803 3804 3805 | 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 | - + | 323 68 l 1 342 55 353 49 368 49 c 0x5c EndSplineSet Validated: 1 EndChar StartChar: uniE569 |
| ︙ | |||
3841 3842 3843 3844 3845 3846 3847 | 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 | - + | 92 61 102 51 102 32 c 0 102 11 93 -1 77 -3 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE56C |
| ︙ | |||
3866 3867 3868 3869 3870 3871 3872 | 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 | - + | 109 124 l 5 34 46 l 13 EndSplineSet Validated: 1 EndChar StartChar: uniE56D |
| ︙ | |||
3900 3901 3902 3903 3904 3905 3906 | 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 | - + | 278 -53 l 25 278 70 l 1xa0 EndSplineSet Validated: 1 EndChar StartChar: uniE582 |
| ︙ | |||
3924 3925 3926 3927 3928 3929 3930 | 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 | - + - + | 157 0 l 25 123 0 l 25 EndSplineSet Validated: 1 EndChar StartChar: uniE5D0 |
| ︙ | |||
3964 3965 3966 3967 3968 3969 3970 | 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 | - + - + - + - + - + | 55 96 32 79 17 61 c 0 10 53 -2 61 1 70 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE610 |
| ︙ | |||
4066 4067 4068 4069 4070 4071 4072 | 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 | - + | 108 0 l 25 72 0 l 25 EndSplineSet Validated: 1 EndChar StartChar: uniE630 |
| ︙ | |||
4097 4098 4099 4100 4101 4102 4103 | 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 | - + | 116 127 l 1 116 126 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniE650 |
| ︙ | |||
4176 4177 4178 4179 4180 4181 4182 | 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 | - + | 758 262 735 202 735 117 c 0 735 73 753 50 797 40 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniE655 |
| ︙ | |||
4249 4250 4251 4252 4253 4254 4255 | 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 | - + | 173 186 179 196 179 204 c 0 179 219 166 230 141 230 c 0xcb40 EndSplineSet Validated: 1 EndChar StartChar: uniE910 |
| ︙ | |||
4275 4276 4277 4278 4279 4280 4281 | 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 | - + - + | 283 60 310 33 310 0 c 7 310 -33 283 -60 250 -60 c 7 EndSplineSet Validated: 1 EndChar StartChar: uniE911 |
| ︙ | |||
4326 4327 4328 4329 4330 4331 4332 | 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 | - + | 455 105 375 193 273 204 c 5 273 -204 l 5 EndSplineSet Validated: 1 EndChar StartChar: uniE914 |
| ︙ | |||
4359 4360 4361 4362 4363 4364 4365 | 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 | - + | 283 60 310 33 310 0 c 3 310 -33 283 -60 250 -60 c 3 EndSplineSet Validated: 1 EndChar StartChar: uniE915 |
| ︙ | |||
4387 4388 4389 4390 4391 4392 4393 | 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 | - + | 0 139 111 250 250 250 c 0 344 250 420 210 463 130 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniE918 |
| ︙ | |||
4424 4425 4426 4427 4428 4429 4430 | 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 | - + - + - + | 125 193 45 106 45 0 c 0 45 -106 125 -193 228 -204 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniE920 |
| ︙ | |||
4485 4486 4487 4488 4489 4490 4491 | 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 | - + | 0 -190 l 25 0 190 l 25 EndSplineSet Validated: 1 EndChar StartChar: uniEA02 |
| ︙ | |||
4509 4510 4511 4512 4513 4514 4515 | 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 | - + | 32 41 l 25 0 65 l 25 EndSplineSet Validated: 1 EndChar StartChar: uniEAA4 |
| ︙ | |||
4533 4534 4535 4536 4537 4538 4539 | 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 | - + - + | -17 226 -24 227 -24 234 c 0 -24 241 -17 253 0 270 c 0 EndSplineSet Validated: 1 EndChar StartChar: uniECA2 |
| ︙ | |||
4581 4582 4583 4584 4585 4586 4587 | 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 | - + - + | 237 148 273 134 298 103 c 1 299 680 l 1 EndSplineSet Validated: 1 EndChar StartChar: uniECA5 |
| ︙ | |||
4624 4625 4626 4627 4628 4629 4630 | 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 | - + | 485 57 490 104 490 148 c 0 490 258 462 396 320 441 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniECA9 |
| ︙ | |||
4654 4655 4656 4657 4658 4659 4660 | 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 | - + | 494 242 495 248 495 255 c 0 495 388 391 509 320 509 c 1 EndSplineSet Validated: 1 EndChar StartChar: uniECB7 |
| ︙ |
Changes to modules/MIDI.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | // MIDI.js - module to handle the %%MIDI parameters // |
| ︙ | |||
162 163 164 165 166 167 168 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | - - |
// // M:6/8 fzcfzc
// // M:9/8 fzcfzcfzc
// break
case "gchordon": // %%MIDI gchordon
case "gchordoff": // %%MIDI gchordoff
if (!cfmt.chord)
cfmt.chord = {}
|
| ︙ | |||
196 197 198 199 200 201 202 | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - - + - - - - - - + + + + + + + + + + | // channel 10 is bank 128 abc2svg.MIDI.do_midi.call(abc, "MIDI control 0 1") // MSB bank abc2svg.MIDI.do_midi.call(abc, "MIDI control 32 0") // LSB bank break case "drummap": //fixme: should have a 'MIDIdrum' per voice? |
| ︙ |
Changes to modules/ambitus.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + + + + + + + + + + + + + + + + | // ambitus.js - module to insert an ambitus at start of a voice // |
| ︙ |
Changes to modules/break.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + + + + + + + + + + + + + + + + | // break.js - module to handle the %%break command // |
| ︙ |
Changes to modules/capo.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + + + + + + + + + + + + + + + + | // capo.js - module to add a capo chord line // |
| ︙ |
Changes to modules/chordnames.js.
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 | - + + + + + + + + + + + + + + + + - - - + + + + + + + + - + - - + - - - + + - - - + - + + + - - - - - + + + + + + + + + + + + + + + + | // abc2svg - chordnames.js - change the names of the chord symbols // // Copyright (C) 2020-2021 Jean-Francois Moine |
| ︙ |
Changes to modules/clair.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + + + + + + + + + + + + + + + + | // clair.js - module to output Clairnote sheets (https:clairnote.org) // |
| ︙ | |||
294 295 296 297 298 299 300 301 302 303 304 305 306 307 | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | + + |
}
of()
},
// set a format parameter
set_fmt: function(of, cmd, param) {
if (cmd == "clairnote") {
if (!this.get_bool(param))
return
this.set_v_param("clair", true);
this.set_v_param("stafflines", "|-|---|-|")
this.set_v_param("staffscale", .8)
return
}
of(cmd, param)
},
|
| ︙ |
Changes to modules/clip.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + + + + + + + + + + + + + + + + | // clip.js - module to handle the %%clip command // |
| ︙ |
Changes to modules/combine.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + + + + + + + + + + + + + + + + - + - - + - + + | // combine.js - module to add a combine chord line // |
| ︙ | |||
82 83 84 85 86 87 88 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | + - + + + + + + + - - - + + + + - - - - - - - - - - - - - - - - - - - - - + + + - - - - - |
s.notes[nhd].tie_ty = C.SL_ABOVE | (type & C.SL_DOTTED)
} // combine_notes()
// combine 2 voices
function do_combine(s) {
var s2, nhd, nhd2, type
s2 = s.ts_next
|
| ︙ | |||
195 196 197 198 199 200 201 | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | - - - - - - |
if (s2.beam_end)
break
do {
s2 = s2.next
} while (s2.type != C.NOTE && s2.type != C.REST)
}
}
|
| ︙ |
Changes to modules/diag.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 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 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | - + + + + + + + + + + + + + + + + - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + - - + + - - - - - - + - + - - - - - - + + - - + - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + + - - + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + | // diag.js - module to insert guitar chord diagrams // |
| ︙ |
Changes to modules/equalbars.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + + + + + + + + + + + + + + + + | // equalbars.js - module to set equal spaced measure bars // |
| ︙ |
Changes to modules/gamelan.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + + + + + + + + + + + + + + + + | // gamelan.js - module to output Gamelan (indonesian) music sheets // |
| ︙ | |||
83 84 85 86 87 88 89 90 91 92 93 94 95 96 | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | + |
s.beam_on = true
while (--n >= 0) {
s2 = {
type: C.REST,
v: s.v,
p_v: s.p_v,
st: s.st,
fmt: s.fmt,
dur: d,
dur_orig: d_orig,
stem: 1,
multi: 0,
nhd: 0,
notes: [{
pit: s.notes[0].pit,
|
| ︙ | |||
146 147 148 149 150 151 152 | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | - + |
}
s.notes[0].jn = 8
s.notes[0].jo = 2
} // do_tie()
function set_sym(p_v) {
var s, s2, note, pit, nn, p, a, m, i,
|
| ︙ | |||
224 225 226 227 228 229 230 | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | - + |
// change the dots and the long notes
slice(s)
// replace the staccato dot
if (s.a_dd) {
for (i = 0; i < s.a_dd.length; i++) {
if (s.a_dd[i].glyph == "stc") {
|
| ︙ | |||
367 368 369 370 371 372 373 374 375 376 377 378 379 380 | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | + + |
}, // draw_symbols()
// set some parameters
set_fmt: function(of, cmd, param) {
if (cmd == "gamelan") {
var cfmt = this.cfmt()
if (!this.get_bool(param))
return
cfmt.gamelan = true
cfmt.staffsep = 20
cfmt.sysstaffsep = 14
this.set_v_param("stafflines", "...")
cfmt.tuplets = [0, 1, 0, 1] // [auto, slur, number, above]
return
}
|
| ︙ | |||
397 398 399 400 401 402 403 404 405 406 407 408 409 410 | 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | + |
case C.NOTE:
s.ymx = 20 * s.nhd + (s.nflags > 0 ? 30 : 24)
if (s.notes[s.nhd].jo > 2) {
s.ymx += 3
if (s.notes[s.nhd].jo > 3)
s.ymx += 2
}
s.ys = s.ymx // (for tuplets)
break
}
}
}, // set_pitch()
// set the width of some symbols
set_width: function(of, s) {
|
| ︙ |
Changes to modules/grid.js.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + - + + + + + + + + + + + + + + + + - + + - - + + + + + + |
|
| ︙ | |||
114 115 116 117 118 119 120 | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | - + + + + + |
set_chords()
// build the content of the cells
if (!grid.ls) {
cells = chords
} else { // with list of mesure numbers
bar = bars;
|
| ︙ | |||
158 159 160 161 162 163 164 165 166 167 168 169 170 171 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | + |
y = -1 + font.size * .6
nr = 0
x0 = (x0 / cfmt.scale - w) / 2
for (i = 0; i < cells.length; i++) {
if (i == 0
|| (grid.repbrk
&& (bars[i].slice(-1) == ':' || bars[i][0] == ':'))
|| parts[i]
|| k >= nc) {
y -= hr // new row
yl -= hr
x = x0 + wmx / 2
k = 0
nr++
}
|
| ︙ | |||
188 189 190 191 192 193 194 | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | - + - + + + + + + + + + |
abc.out_svg('M')
abc.out_sxsy(x, ' ', -1)
abc.out_svg('v' + (hr * nr).toFixed(1) + '\n')
x += wmx
}
abc.out_svg('"/>\n')
|
| ︙ | |||
247 248 249 250 251 252 253 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | - + - + |
if (font.style)
f2.style = font.style
f2.class = font.class
abc.add_style("\n.mid {text-anchor:middle}")
// create the grid
abc.blk_flush()
|
| ︙ | |||
276 277 278 279 280 281 282 283 284 285 286 287 | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 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 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | + - + + - + + + - + - - + + + + + - - + + - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - + - + + + - - - + + + - + + |
} // get_beat()
// build the arrays of chords and bars
function build_chords(sb) { // block 'grid'
var s, i, w, bt, rep,
bars = [],
chords = [],
parts = [],
chord = [],
beat = get_beat(voice_tb[0].meter),
wm = voice_tb[0].meter.wmeasure,
cur_beat = 0,
beat_i = 0,
|
| ︙ | |||
405 406 407 408 409 410 411 412 413 | 469 470 471 472 473 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 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | + - + + + - + | s.next = p_v.sym s.ts_next = tsfirst tsfirst.ts_prev = s this.set_tsfirst(s) p_v.sym.prev = s p_v.sym = s } s.fmt = s.prev ? s.prev.fmt : fmt } of() |
Changes to modules/grid2.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - + + + + + + + + + + + + + + + + | // grid2.js - module to replace a voice in the music by a chord grid // |
| ︙ |
Changes to modules/grid3.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | - + + + + + + + + + + + + + + + + - + | // grid3.js - module to insert a manual chords // |
| ︙ | |||
263 264 265 266 267 268 269 270 271 272 273 274 275 276 | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | + |
}
return "\u266d"
})
if (opt.indexOf("chord-define") >= 0)
this.cfmt().csdef = txt
if (opt.indexOf("noprint") < 0) {
type += "3"
if (this.parse.state >= 2) {
s = this.new_block(type)
s.text = txt
} else {
abc2svg.grid3.block_gen.call(this, null, {
subtype: type,
text: txt
|
| ︙ | |||
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | + - + + |
fname: ss.fname,
istart: ss.istart,
iend: ss.iend,
v: p_vc.v,
p_v: p_vc,
time: ntim,
st: 0,
fmt: ss.fmt,
dur: 0,
dur_orig: 0,
invis: true,
seqst: true,
nhd: 0,
notes: [{
pit: 18,
dur: 0
}]
}
if (ch != '.' && ch != '-') {
abc.set_a_gch(s, [{ // define the chord symbol
type: 'g',
text: ch,
otext: ch,
istart: ss.istart,
iend: ss.iend,
|
| ︙ | |||
416 417 418 419 420 421 422 423 424 425 426 427 428 429 | 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | + |
next: s,
ts_next: s,
prev: s.prev,
ts_prev: s.ts_prev
}
if (!s)
break
ss.fmt = s.fmt
if (s.seqst) {
ss.seqst = true
delete s.seqst
}
ss.prev.next =
ss.ts_prev.ts_next =
s.prev =
|
| ︙ |
Changes to modules/jazzchord.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + - - - + + + - - - + + + + - + - - - - - - - - - - - + + - - - - - - - - - - - + + + + - - + - - - - - - + + + + + + - + + - + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + + - | // abc2svg - jazzchord.js - Adds jazz chord styling to chord symbols // |
| ︙ |
Changes to modules/jianpu.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - + + + + + + + + + + + + + + + + + + + + + + + + | // jianpu.js - module to output jiănpŭ (简谱) music sheets // |
| ︙ | |||
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | + + - + - - + + |
// output the key and time signatures
function set_head() {
var tsfirst = abc.get_tsfirst(),
p_v = voice_tb[0],
mt = p_v.meter.a_meter[0],
sk = p_v.key,
s2 = voice_tb[0].sym,
s = {
type: C.BLOCK,
subtype: "text",
dur: 0,
v: 0,
p_v: p_v,
st: 0,
fmt: s2.fmt,
seqst: true,
text: (sk.k_mode + 1) + "=" +
(abc2svg.jianpu.k_tb[sk.k_sf + 7 +
|
| ︙ | |||
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | + + + |
if (s.dur >= C.BLEN)
n = 3
else if (s.dur == C.BLEN / 2)
n = 1
else
n = 2
s.dur = s.dur_orig = C.BLEN / 4
delete s.fmr
while (--n >= 0) {
s2 = {
type: C.REST,
v: s.v,
p_v: s.p_v,
st: s.st,
dur: C.BLEN / 4,
dur_orig: C.BLEN / 4,
fmt: s.fmt,
stem: 0,
multi: 0,
nhd: 0,
notes: [{
pit: s.notes[0].pit,
jn: 8
}],
|
| ︙ | |||
125 126 127 128 129 130 131 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | - - + + - + + + + + | s2.ts_prev = s3 if (s2.ts_next) s2.ts_next.ts_prev = s2 s3.ts_next = s2 break } } |
| ︙ | |||
221 222 223 224 225 226 227 | 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | - + |
if (s.dur >= C.BLEN / 2)
slice(s)
// replace the staccato dot
if (s.a_dd) {
for (i = 0; i < s.a_dd.length; i++) {
if (s.a_dd[i].glyph == "stc") {
|
| ︙ | |||
287 288 289 290 291 292 293 | 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | - + - + |
}
} // draw_dur()
function out_mus(x, y, p) {
out_svg('<text x="')
out_sxsy(x, '" y="', y)
out_svg('">' + p + '</text>\n')
|
| ︙ | |||
315 316 317 318 319 320 321 322 323 324 325 326 327 328 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | + + + + |
out_mus(x - 1, y + 22, dot)
}
} else if (note.jo < 2) {
ym = y + 4
if (m == 0 && s.nflags > 0)
ym -= 2.5 * s.nflags
out_mus(x - 1, ym, dot)
if (note.jo < 1) {
ym -= 3
out_mus(x - 1, ym, dot)
}
}
y += 20
}
} // draw_hd()
// -- draw_symbols --
|
| ︙ | |||
338 339 340 341 342 343 344 345 346 347 348 349 350 351 | 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | + + |
x = s.x
y = staff_tb[s.st].y
draw_hd(s, x, y)
if (s.nflags >= 0 && s.dots)
out_mus(x + 8, y + 13, dot)
if (s.nflags > 0) {
if (s.time == p_voice.sym.time)
s.beam_st = 1 // beam continuation
//fixme: ko with rests because no beam_st /_end
if (s.beam_st || s.type == C.REST) {
nl = s.nflags
s2 = s
while (1) {
if (s2.nflags && s2.nflags > nl)
nl = s2.nflags
|
| ︙ | |||
366 367 368 369 370 371 372 373 374 375 376 377 378 379 | 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | + + |
}, // draw_symbols()
// set some parameters
set_fmt: function(of, cmd, param) {
if (cmd == "jianpu") {
var cfmt = this.cfmt()
if (!this.get_bool(param))
return
cfmt.jianpu = true
cfmt.staffsep = 20
cfmt.sysstaffsep = 14
this.set_v_param("stafflines", "...")
cfmt.tuplets = [0, 1, 0, 1] // [auto, slur, number, above]
return
}
|
| ︙ | |||
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 | 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 501 | + - + |
s.wl = 14
}
break
}
}, // set_width()
set_hooks: function(abc) {
abc.calculate_beam = abc2svg.jianpu.calc_beam.bind(abc, abc.calculate_beam)
abc.do_pscom = abc2svg.jianpu.do_pscom.bind(abc, abc.do_pscom)
abc.draw_symbols = abc2svg.jianpu.draw_symbols.bind(abc, abc.draw_symbols)
abc.output_music = abc2svg.jianpu.output_music.bind(abc, abc.output_music)
abc.set_format = abc2svg.jianpu.set_fmt.bind(abc, abc.set_format)
abc.set_pitch = abc2svg.jianpu.set_pitch.bind(abc, abc.set_pitch)
abc.set_width = abc2svg.jianpu.set_width.bind(abc, abc.set_width)
// big staccato dot
abc.get_glyphs().gstc = '<circle id="gstc" cx="0" cy="-3" r="2"/>'
abc.get_decos().gstc = "0 gstc 5 1 1"
|
Changes to modules/mdnn.js.
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + + + + + + + + + + + + + + + + | // mdnn.js - module to output Modernised Diatonic Numerical Notation // (https://medium.com/@info_70544/the-case-for-numerical-music-notation-part-1-introduction-and-history-5f1543ca8a95) // |
| ︙ | |||
183 184 185 186 187 188 189 | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | - - - + - + - - + - - - - + - - + - - - + - - - - + - + | } note = s.notes[0] // note head p = note.pit pit = p + delta nn = ((pit + 77) % 7) + 1 // note number |
| ︙ |
Added modules/nns.js.