You can use min / max for each data block to subexpress the signal.
The window size should be determined based on how accurately you want to display your signal and / or how large the window is compared to the signal length.
Code example:
from scipy.io import wavfile import matplotlib.pyplot as plt def value_for_window_min_max(data, start, stop): min = data[start] max = data[start] for i in range(start,stop): if data[i] < min: min = data[i] if data[i] > max: max = data[i] if abs(min) > abs(max): return min else: return max
Conclusion: 
source share