diff options
author | Anthony Wang | 2023-03-21 17:19:28 -0400 |
---|---|---|
committer | Anthony Wang | 2023-03-21 17:19:28 -0400 |
commit | 838cdb14879a80199579fbbb7cc828589f391559 (patch) | |
tree | 8783ebb13149d382754db391d7ec0cddf6eb9c11 | |
parent | b253cb7a2a62302fbcaf652bacea64e38d664767 (diff) |
Ignore zero frequency notes (rests)
-rw-r--r-- | yue.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |