adjust waveform (fix normalization)

This commit is contained in:
2025-03-13 21:15:05 +01:00
parent d95a69ddc6
commit 0ed934efe1
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -73,8 +73,8 @@ def generate():
# Slice the array like numpy would
out = shapedSamples[offset-l*count:offset+l*count]
out = [i/(max(sf)+0.1) for i in out]
if max(out) > 1 or min(out) < -1: print("clipped")
out = [i/(max(out)) for i in out]
if max(out) > 1 or min(out) < -1: raise Exception("Clipped")
if PLOT:
# Plot the waveform