def measure_ess(fs, n_meas, n_chan, f_start, f_stop, t_sweep): # calls the ESS Measurement import ess_method, audio_io, numpy, time ir_r_raw = numpy.array([]) ir_l_raw = numpy.array([]) # creating ESS Signal meas_sig = ess_method.generate_ess(fs, f_start, f_stop, t_sweep) # open audio device audio_io.audio_open(fs, n_chan) for i in xrange(n_meas + 1): print("Measurement No.", i) #t_sweep*1000 is half the time to record in ms audio_io.meas_run(fs, n_chan, meas_sig, int(t_sweep * 1000), i) #closing audio device audio_io.audio_close() ir_l_avg, ir_r_avg = average_ir_ess(n_meas, n_chan) return (ir_l_avg, ir_r_avg)
def measure_ess(fs, n_meas, n_chan, f_start, f_stop, t_sweep): # calls the ESS Measurement import ess_method, audio_io, numpy, time ir_r_raw = numpy.array([]) ir_l_raw = numpy.array([]) # creating ESS Signal meas_sig = ess_method.generate_ess(fs, f_start, f_stop, t_sweep) # open audio device audio_io.audio_open(fs, n_chan) for i in xrange(n_meas + 1): print ("Measurement No.", i) # t_sweep*1000 is half the time to record in ms audio_io.meas_run(fs, n_chan, meas_sig, int(t_sweep * 1000), i) # closing audio device audio_io.audio_close() ir_l_avg, ir_r_avg = average_ir_ess(n_meas, n_chan) return (ir_l_avg, ir_r_avg)
def measure_sds(fs, n_chan, f_sine1, f_sine2, t_meas): # calls the SDS Measurement import sds_method, audio_io, numpy # creating ESS Signal meas_sig = sds_method.generate_sds(fs, f_sine1, f_sine2, t_meas) # open audio device audio_io.audio_open(fs, n_chan) #t_sweep*1000 is half the time to record in ms audio_io.meas_run(fs, n_chan, meas_sig, int(t_meas * 1000), 0) #closing audio device audio_io.audio_close() resp_l, resp_r = sds_method.compute_resp(n_chan) return (resp_l, resp_r)
def measure_sds(fs, n_chan, f_sine1, f_sine2, t_meas): # calls the SDS Measurement import sds_method, audio_io, numpy # creating ESS Signal meas_sig = sds_method.generate_sds(fs, f_sine1, f_sine2, t_meas) # open audio device audio_io.audio_open(fs, n_chan) # t_sweep*1000 is half the time to record in ms audio_io.meas_run(fs, n_chan, meas_sig, int(t_meas * 1000), 0) # closing audio device audio_io.audio_close() resp_l, resp_r = sds_method.compute_resp(n_chan) return (resp_l, resp_r)
def measure_mls(fs, rt60, n_meas, n_chan): # calls the MLS Measurement import mls_method, audio_io, numpy, time # creating MLS Signal meas_sig = mls_method.mls_gen(rt60, fs) # open audio device audio_io.audio_open(fs, n_chan) for i in xrange(n_meas + 1): print("Measurement No.", i) audio_io.meas_run(fs, n_chan, meas_sig, rt60, i) #closing audio device audio_io.audio_close() ir_l_avg, ir_r_avg = average_ir_mls(n_meas, n_chan) return (ir_l_avg, ir_r_avg)
def measure_mls(fs, rt60, n_meas, n_chan): # calls the MLS Measurement import mls_method, audio_io, numpy, time # creating MLS Signal meas_sig = mls_method.mls_gen(rt60, fs) # open audio device audio_io.audio_open(fs, n_chan) for i in xrange(n_meas + 1): print ("Measurement No.", i) audio_io.meas_run(fs, n_chan, meas_sig, rt60, i) # closing audio device audio_io.audio_close() ir_l_avg, ir_r_avg = average_ir_mls(n_meas, n_chan) return (ir_l_avg, ir_r_avg)