aboutsummaryrefslogtreecommitdiff
path: root/yue.py
diff options
context:
space:
mode:
authorAnthony Wang2023-03-21 17:19:28 -0400
committerAnthony Wang2023-03-21 17:19:28 -0400
commit838cdb14879a80199579fbbb7cc828589f391559 (patch)
tree8783ebb13149d382754db391d7ec0cddf6eb9c11 /yue.py
parentb253cb7a2a62302fbcaf652bacea64e38d664767 (diff)
Ignore zero frequency notes (rests)
Diffstat (limited to 'yue.py')
-rw-r--r--yue.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yue.py b/yue.py
index 1cb3885..5ded276 100644
--- a/yue.py
+++ b/yue.py
@@ -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)