| ︙ | | |
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
|
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
|
-
+
|
for (i = 0; i <= s.nhd; i++)
note_transp(s, sk, s.notes[i])
if (s.a_gch)
gch_transp(s, sk)
continue
case C.KEY:
if (sk)
s.k_sf = sk.k_sf
s.k_old_sf = sk.k_sf
key_transp(s)
if (!s.k_transp) // end of transposition
break
sk = s
default:
continue
}
|
| ︙ | | |
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
|
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
|
-
|
else
sk.k_transp -= d
n_b40 += d
}
sk.k_b40 = n_b40
var sf = abc2svg.b40sf[n_b40]
sk.k_old_sf = sk.k_sf
sk.k_sf = sf
sk.k_map = abc2svg.keys[sf + 7] // map of the notes with accidentals
}
/*
* for transpose purpose, check if a pitch is already in the measure or
* if it is tied from a previous note, and return the associated accidental
|
| ︙ | | |
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
|
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
|
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
|
}
goto_tune()
parse.state = 3 // in tune body
}
set_kv_parm(a)
if (!curvoice.ckey.k_bagpipe && !curvoice.ckey.k_drum
&& (cfmt.transp != undefined
|| curvoice.transp != undefined
|| curvoice.shift != undefined))
transp = (cfmt.transp || 0) +
(curvoice.transp || 0) +
(curvoice.shift || 0)
if (curvoice.sndtran != undefined
|| curvoice.sndsh != undefined)
sndtran = (curvoice.sndtran || 0) +
(curvoice.sndsh || 0)
if (!curvoice.ckey.k_bagpipe && !curvoice.ckey.k_drum) {
if (cfmt.transp != undefined
|| curvoice.transp != undefined
|| curvoice.shift != undefined)
transp = (cfmt.transp || 0) +
(curvoice.transp || 0) +
(curvoice.shift || 0)
if (curvoice.sndtran != undefined
|| curvoice.sndsh != undefined)
sndtran = (curvoice.sndtran || 0) +
(curvoice.sndsh || 0)
}
if (s_key.k_sf == undefined) {
if (!s_key.k_a_acc
&& transp == undefined) {
if (sndtran == undefined)
return // not a key signature
s_key.invis = true // play only
|
| ︙ | | |
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
|
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
|
+
+
+
+
-
|
bol: parse.iend
}
if (parse.file[curvoice.clone.bol - 1] != ']')
curvoice.clone.bol++ // start of new line
}
set_kv_parm(a)
if (curvoice.new_transp || curvoice.new) {
set_transp()
curvoice.new_transp = 0
}
v = curvoice.v
if (curvoice.new) { // if new voice
delete curvoice.new
if (staves_found < 0) { // if no %%score/%%staves
curvoice.st = curvoice.cst = ++nstaff;
par_sy.nstaff = nstaff;
par_sy.voices[v] = {
st: nstaff,
range: v
}
par_sy.staves[nstaff] = {
stafflines: curvoice.stafflines || "|||||",
staffscale: 1
}
} else if (!par_sy.voices[v]) {
curvoice.ignore = 1 // voice not declared in %%staves
return
}
set_transp()
}
if (!curvoice.filtered
&& par_sy.voices[v]
&& (parse.voice_opts
|| parse.tune_v_opts)) {
curvoice.filtered = true;
|
| ︙ | | |