aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2023-03-11 22:23:30 -0500
committerAnthony Wang2023-03-11 22:23:30 -0500
commit902286833b2ed018454eea8bec425e1a7d24f2ff (patch)
treefc2c01c88233f7e98a8cf343ab7103abf067efa8
parent8688b02dd5687739df056bfbdab554278fa2102f (diff)
Enable blending
-rw-r--r--example.oggbin422298 -> 422704 bytes
-rw-r--r--music.py6
2 files changed, 3 insertions, 3 deletions
diff --git a/example.ogg b/example.ogg
index a7481d7..b89a0d8 100644
--- a/example.ogg
+++ b/example.ogg
Binary files differ
diff --git a/music.py b/music.py
index 2d2af25..85c7918 100644
--- a/music.py
+++ b/music.py
@@ -318,10 +318,10 @@ def at(t):
# This is actually pretty efficient ngl
# Because people usually don't have that many overlapping notes
ret = 0
- for j in range(max(i - 20, 0), i):
+ for j in range(max(i - 30, 0), i):
m = music[j]
- if m[0] + m[1] >= t:
- ret += m[4] * tone(freq(m[2], m[3]), t - m[0])
+ # if m[0] + m[1] > t:
+ ret += m[4] * tone(freq(m[2], m[3]), t - m[0])
return int(2**12 * ret)