abc2svg
Diff
Not logged in

Differences From Artifact [0826ffbc78]:

To Artifact [0666d3dd85]:


1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356

// transpose the current key of the voice (called on K: or V:)
function key_trans() {
    var	i, n, a_acc, b40,
	s = curvoice.ckey,			// current key
	ti = s.time || 0

	if (s.k_bagpipe || s.k_drum
	 || s.k_none)				// no key
		return

	// set the score transposition
	n = (curvoice.score | 0)		// new transposition
		+ (curvoice.shift | 0)
		+ (cfmt.transp | 0)
	if ((curvoice.tr_sco | 0) == n)







|
<







1341
1342
1343
1344
1345
1346
1347
1348

1349
1350
1351
1352
1353
1354
1355

// transpose the current key of the voice (called on K: or V:)
function key_trans() {
    var	i, n, a_acc, b40,
	s = curvoice.ckey,			// current key
	ti = s.time || 0

	if (s.k_bagpipe || s.k_drum)

		return

	// set the score transposition
	n = (curvoice.score | 0)		// new transposition
		+ (curvoice.shift | 0)
		+ (cfmt.transp | 0)
	if ((curvoice.tr_sco | 0) == n)
1378
1379
1380
1381
1382
1383
1384

1385
1386
1387
1388
1389
1390
1391
	if (i) {				// no chord here
		curvoice.tr_sco += i		// set an enharmonic one
		b40 += i
	}

	s.orig = clone(s)			// keep the original K: definition
	s.k_b40 = b40

	s.k_sf = abc2svg.b40sf[b40]

	// transpose the accidental list
	if (!s.k_a_acc)
		return
	a_acc = []
	for (i = 0; i < s.k_a_acc.length; i++) {







>







1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
	if (i) {				// no chord here
		curvoice.tr_sco += i		// set an enharmonic one
		b40 += i
	}

	s.orig = clone(s)			// keep the original K: definition
	s.k_b40 = b40
    if (!s.k_none)				// if some key
	s.k_sf = abc2svg.b40sf[b40]

	// transpose the accidental list
	if (!s.k_a_acc)
		return
	a_acc = []
	for (i = 0; i < s.k_a_acc.length; i++) {