# Tag Info

0

Thank you so much for getting back to me. Very interesting and relevant post! If i understand correctly, there will always be a beat in a signal, but whether we see it as a strong beat or not depends on the application. If so, i guess i will have to determine myself how much beat effect to allow. For those interested: I am doing a time-series prediction ...

0

The FFT is equivalent to a bank of FIR band pass filters, in python you can compute the fft using numpy.fft.fft, and the central normalized (with respect to sampling rate) frequency of each filter is obtained with numpy.fft.fftfreq For real signals you can use numpy.fft.rfft and numpy.fft.rfftfreq If you want implementation guidance in stack overflow, give ...

1

The output of an FIR filter is $$y(n) = \sum_{i=0}^{N-1}w_i(n)x(n-i)$$ Say the weight vector $\mathbf{w}(n)$ has a length of $N$, i.e., $$\mathbf{w}(n) = [w_0(n), w_1(n), \ldots, w_{N-1}(n)]^T$$ and the input vector $\mathbf{x}(n)$ should have the same length as $\mathbf{w}(n)$: $$\mathbf{x}(n) = [x(n), x(n-1), \ldots, x(n-N+1)]^T$$ Therefore the output $y(... 2 @bjornhartmann. The material at the following web page explains, and demonstrates using MATLAB, how beat notes are generated when we sum two sine wave sequences: dsprelated.com/showarticle/189.php 2 If you add two cosines you simply get the product of the sum and difference frequencies. $$cos(x) + cos(y) = 2\cdot cos \left( \frac{x+y}{2} \right) \cdot cos \left( \frac{x-y}{2} \right)$$ If the frequencies are very close together, than the difference frequency is close to zero and that's what creates the "beat". The exact definition of what ... 1 What you're seeing is correct. When mixing two chirps as you're doing, you will get a doubling of the frequency. Consider two chirps with a bandwidth$B$and pulse length$\tau$. We'll use the complex form to simplify the math $$x_1(t) = e^{j{\pi}\frac{\beta}{\tau}t^2}$$ $$x_2(t) = e^{j({\pi}\frac{\beta}{\tau} + \phi)}$$ We introduced the arbitrary phase ... 0 Having had the same problem and without success to find a tool to sync the start of video/audio recordings automatically, I decided to make syncstart (github). The basic code is this: import numpy as np from scipy import fft from scipy.io import wavfile r1,s1 = wavfile.read(in1) r2,s2 = wavfile.read(in2) assert r1==r2, "syncstart normalizes using ffmpeg&... 1 Wouldn't mixing them give you a sum and difference frequency and you have to lowpass filter to get the difference frequency only? Also your chirps are the same frequency, just out of phase? So the difference would be zero and the sum would be double. So: Actually create a chirp that is a different frequency from the original, not just out of phase. After ... 0 This should be doable with ssqueezepy's extract_ridges; try varying penalty and bw (see their docstrings). As last resort, feeding a cropped image that excludes region without ridges may work better, as the algorithm assumes the ridge spans the entire frame. You can automate this by finding indices at which column energies fall below a set threshold, e.g. np.... 0 You have got exactly what you requested in your code. DTW is a similarity measure between time series. By default, tslearn uses squared Euclidean distance as the base metric (I am citing the documentation). Another ground metric can be used, when specified in the code. You use a default, i.e., Euclidean-distance metric, your sequences (time series),$s1$... 0 You could easily use OpenCV (https://opencv.org/) to do that. Check out the solvePnP functionality. Here is a demo on head pose estimation. 0 If you're using scipy.signal and processing signals offline, then you can just use decimate which handles the filtering for you. It also does zero-phase filtering by default, which you probably want for an EEG signal to avoid shifting the shape of the waveforms? (I know that's desirable for EKG, not sure about EEG.) 1 Anti-aliasing filtering is applied just as any other LTI filtering: If your input data is$x[n]$, and the impulse response is$h[n]$, then your output will be $$y[n] = x[n] \star h[n]$$ where$\star$is the convolution operation, a.k.a. the anti-aliasing filtering in this context. Your impulse response$h[n]\$, ideally, corresponds to a lowpass brickwall ...

0

I computed and compared the minimum phase HRIR and the original one. This is my final code: def min_phase_coversion(HRIR): ''' :param HRIR: the desired HRIR impulse response to convert into minimum phase :return: the minimum phase version of the original HRIR ''' HRIR_fft = fft(HRIR,44100) #computing magnitude, tested with sinusoid,...

0

In the end I used the Hilbert transform to compute the minimum-phase phase of my FIR. I have used the following formula: Where H is the spectrum of the desired filter. Which has been used in: Individualisation d’indices acoustiques pour la synthèse binaurale Phase Unwrapping for Spherical Interpolation of Head-Related Transfer Functions Transformation ...

0

Python has a soundfile package. There's also scipy.io.wavfile

1

In MATLAB you can create a .wav file waveFileName.wav from a waveform y with sampling frequency Fs using MATLAB's audiowrite as follows: filename = 'waveFileName.wav'; audiowrite(filename,y,Fs); You can also read and output a waveform y and its sampling frequency Fs from the .wav file waveFileName.wav using MATLAB's audioread as follows. [y,Fs] = audioread('...

0

This is not relevant to the question, but you will get more musically useful results doing spectrograms with a logarithmic frequency axis, not a linear one. The latter fills half of the graph with the top octave, the next quarter with the second-to-top, and all the useful human auditory information is crushed into the bottom cm of the graphic, while a log ...

Top 50 recent answers are included