0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-27 04:43:52 +01:00

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

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

View File

@@ -6,5 +6,5 @@
Released under the GNU GPL v3 license.
*/
float waveform_biphase[24] = {0.00461068279303888, -1.1797407833720696e-17, -0.008233362130426566, 5.1112771849830444e-17, 0.017125393231287256, -3.975331531625189e-17, -0.047094831386039954, -2.1301970095005356e-17, 0.28256898831623967, 0.7282050708733819, 0.9889914591068393, 0.7282050708733819, 0.0, -0.7282050708733819, -0.9889914591068393, -0.7282050708733819, -0.28256898831623967, 2.1301970095005356e-17, 0.047094831386039954, 3.975331531625189e-17, -0.017125393231287256, -5.1112771849830444e-17, 0.008233362130426566, 1.1797407833720696e-17};
float waveform_biphase[24] = {0.004662004662004664, -1.192872569837455e-17, -0.008325008325008324, 5.168171209081069e-17, 0.017316017316017313, -4.0195812562580885e-17, -0.04761904761904761, -2.153908398182045e-17, 0.2857142857142856, 0.7363107781851077, 1.0, 0.7363107781851077, 0.0, -0.7363107781851077, -1.0, -0.7363107781851077, -0.2857142857142856, 2.153908398182045e-17, 0.04761904761904761, 4.0195812562580885e-17, -0.017316017316017313, -5.168171209081069e-17, 0.008325008325008324, 1.192872569837455e-17};