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
|
nv = voice_tb.length,
vtb = [],
vn = [], // voice indexed by range
sy = cur_sy // first staff system
// check if different bars at the same time
function b_chk() {
var bt, s, s2, v, tim,
ir = 0
while (1) {
v = vn[ir++]
if (v == undefined)
break
s = vtb[v]
if (!s || !s.bar_type || s.invis)
continue
if (!bt) {
bt = s.bar_type
tim = s.time
continue
}
if (s.time == tim
&& s.bar_type != bt)
break
}
// if the previous symbol is a grace note at the same offset as the bar
// remove the grace notes from the previous time sequence
if (!fl) {
while (prev.type == C.GRACE) {
vtb[prev.v] = prev
prev = prev.ts_prev
}
fl = 1 //true
}
if (v == undefined)
return // no problem
if (bt == "::" || bt == ":|") {
ir = 0
|
|
|
>
<
<
|
|
>
<
|
>
|
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
|
nv = voice_tb.length,
vtb = [],
vn = [], // voice indexed by range
sy = cur_sy // first staff system
// check if different bars at the same time
function b_chk() {
var bt, s, s2, v,
ir = 0
while (1) {
v = vn[ir++]
if (v == undefined)
break
s = vtb[v]
if (!s || !s.bar_type || s.invis
|| s.time != time)
continue
if (!bt) {
bt = s.bar_type
continue
}
if (s.bar_type != bt)
break
}
// if the previous symbol is a grace note at the same offset as the bar
// remove the grace notes from the previous time sequence
if (!fl) {
while (prev.type == C.GRACE
&& vtb[prev.v] && !vtb[prev.v].bar_type) {
vtb[prev.v] = prev
prev = prev.ts_prev
fl = 1 //true
}
}
if (v == undefined)
return // no problem
if (bt == "::" || bt == ":|") {
ir = 0
|