Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | play: fix: bad playback of long grace notes - reported by Hudson Lacerda |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | trunk |
Files: | files | file ages | folders |
SHA1: |
cc4e7839767c8d6dee3ef681c6d6c455 |
User & Date: | jef 2024-04-19 09:29:06 |
Context
2024-04-19
| ||
09:29 | play: fix: bad playback of long grace notes - reported by Hudson Lacerda ... (Leaf check-in: cc4e783976 user: jef tags: trunk) | |
2024-04-16
| ||
10:01 | core: fix: some decorations too far from slurs - reported by Hudson Lacerda ... (check-in: 316cf54666 user: jef tags: trunk) | |
Changes
Changes to util/sndgen.js.
︙ | ︙ | |||
215 216 217 218 219 220 221 222 223 224 225 226 227 228 | for (i = 0; i < first.parts.length; i++) { if (first.parts[i] == v) first.p_s[i] = s } } } } // build_parts() // generate the grace notes function gen_grace(s) { var g, i, n, t, d, s2, next = s.next // before beat | > > > > > > > > > > > > > > > > > > > > > > > | 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 | for (i = 0; i < first.parts.length; i++) { if (first.parts[i] == v) first.p_s[i] = s } } } } // build_parts() // update the time linkage when the start time has changed function relink(s, dt) { var tim = s.time + dt, // new time s2 = s.ts_next s.ts_prev.ts_next = s2 // remove from the time linkage s2.ts_prev = s.ts_prev while (!s2.seqst && s2.ts_next) s2 = s2.ts_next if (s2.time < s.time + dt) // don't move after the next time seq. dt = s2.time - s.time s.time += dt // update time and duration s.dur -= dt s.ts_prev = s2.ts_prev // update the time linkage s.ts_prev.ts_next = s s.ts_next = s2 s2.ts_prev = s s.seqst = 1 //true if (s2.time == s.time) s2.seqst = 0 //false } // relink() // generate the grace notes function gen_grace(s) { var g, i, n, t, d, s2, next = s.next // before beat |
︙ | ︙ | |||
237 238 239 240 241 242 243 | d = next.dur / 12 if (!(d & (d - 1))) d = next.dur / 2 // no dot else d = next.dur / 3 if (s.p_v.key.k_bagpipe) d /= 2 | | < | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | d = next.dur / 12 if (!(d & (d - 1))) d = next.dur / 2 // no dot else d = next.dur / 3 if (s.p_v.key.k_bagpipe) d /= 2 relink(next, d) } //fixme: assume the grace notes in the sequence have the same duration n = 0 for (g = s.extra; g; g = g.next) n++ d /= n * play_fac t = p_time |
︙ | ︙ |