Ignore zero frequency notes (rests)

This commit is contained in:
Anthony Wang 2023-03-21 17:19:28 -04:00
parent b253cb7a2a
commit 838cdb1487
Signed by: a
GPG key ID: 42A5B952E6DD8D38

2
yue.py
View file

@ -55,7 +55,7 @@ def at(t):
ret = 0
for j in range(max(i - 32, 0), i):
m = music[j]
if m[1] > t:
if m[1] > t and m[2] > 0:
ret += m[4] * m[5](freq(m[2], m[3]), t - m[0])
return int(2**28 * ret)