From 838cdb14879a80199579fbbb7cc828589f391559 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Tue, 21 Mar 2023 17:19:28 -0400 Subject: Ignore zero frequency notes (rests) --- yue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3-70-g09d2