Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/w/a/waveform-analyzer-HEAD/wave_analyzer.py   waveform-analyzer(Download)
from numpy import mean, absolute, array_equal
from scikits.audiolab import Sndfile
from A_weighting import A_weight
from common import rms_flat, dB
 
 
    # Apply the A-weighting filter to the signal
    weighted = A_weight(signal, sample_rate)
    weighted_level = rms_flat(weighted)
 

src/w/a/waveform-analyzer-HEAD/thd_analyzer.py   waveform-analyzer(Download)
from numpy import argmax, mean, log10, log, ceil, concatenate, zeros
from common import analyze_channels, rms_flat, parabolic
from A_weighting import A_weight
 
def THDN(signal, sample_rate):
    # Apply A-weighting to residual noise (Not normally used for distortion, 
    # but used to measure dynamic range with -60 dBFS signal, for instance)
    weighted = A_weight(noise, sample_rate)
    THDNA = rms_flat(weighted) / total_rms