From 70798871d8eab68a6acbc402413bccbfd3fce9d5 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 17 Oct 2013 14:46:47 +0200 Subject: [PATCH] demos/demo_waveform_plot.py: add downsample parameter --- python/demos/demo_waveform_plot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/demos/demo_waveform_plot.py b/python/demos/demo_waveform_plot.py index 0f1f02a1..91c6eda2 100755 --- a/python/demos/demo_waveform_plot.py +++ b/python/demos/demo_waveform_plot.py @@ -4,7 +4,7 @@ import sys from aubio import pvoc, source from numpy import zeros, hstack -def get_waveform_plot(filename, samplerate = 0, block_size = 4096, ax = None): +def get_waveform_plot(filename, samplerate = 0, block_size = 4096, ax = None, downsample = 2**4): import matplotlib.pyplot as plt if not ax: fig = plt.figure() @@ -12,7 +12,7 @@ def get_waveform_plot(filename, samplerate = 0, block_size = 4096, ax = None): hop_s = block_size allsamples_max = zeros(0,) - downsample = 2**4 # to plot n samples / hop_s + downsample = downsample # to plot n samples / hop_s a = source(filename, samplerate, hop_s) # source file if samplerate == 0: samplerate = a.samplerate -- 2.11.0