jojek
Moderator
  • Member for 7 years, 10 months
  • Last seen this week
Matlab - Constructing a Cosine wave with IFFT
Accepted answer
4 votes

You must keep in mind that for a real-valued signal, second half of your spectrum is a complex conjugate of all values below the Nyquist frequency. In your case: X(2) = -32 X(N) = 32 as you can see ...

View answer
What does MATLAB display when plotting a sound signal?
Accepted answer
4 votes

What you are observing is the digital representation of the voltage, which in fact represents the acoustic pressure. Workflow would be something like: Vibrating larynx is producing Acoustic Pressure [...

View answer
PSD scaling due to the windowing
4 votes

The shortest answer to that question is to divide your PSD by the squared sum of window values $w_i$: $$PSD(n) = \dfrac{2|X(n)|^2}{S^2} $$ where: $n=0\ldots N/2 $ $S = \sum_{i=0}^{N-1}w_i$ You ...

View answer
Don't understand coefficients in MATLAB "butter" low pass result
Accepted answer
4 votes

You are using wrong syntax. You should call freqz function as: freqz(b,a) You do not divide any coefficients. In case of non-recursive filters (FIR) you use only coefficients stored in b vector. ...

View answer
FFT Result - which bins are useful
Accepted answer
4 votes

I believe you should use the Nyquist bin every time. By having it, you can always recreate the full DFT of your real-valued signal from the first half of spectrum. Whereas if you discard this value ...

View answer
Problems calculating 8-point FFT of an 8-point sine wave by hand
Accepted answer
4 votes

I will start from very beginning. So having signal: $ x[n] = [0; \ 0.7071; \ 1; \ 0.7071; \ 0; \ -0.7071; \ -1; \ -0.7071] $ and given exponent: $ w[n] = [1; \ 0.7071 - 0.7071i; \ -i; \ -0.7071 - 0....

View answer
Visualizing aliasing in Matlab
4 votes

I think you should plot something like: t = [0:0.05:1]; %20Hz sampling a = sin(2*pi*2*t); %2Hz sine wave b = sin(2*pi*18*t); %18Hz sine wave plot(t, a, 'bo'); hold on; plot(t, b, 'ro'); T = [...

View answer
Measuring frequency response range of piezoelectric disc
Accepted answer
4 votes

I am afraid that it is rather impossible without a proper hardware. Sweep sine is ok as a general method, but you would either need: Reference transducer with known (preferably) linear frequency ...

View answer
Difference between $\tt freqz()$ and $\tt plot(abs(fft()))$ in MATLAB
Accepted answer
4 votes

You calculating FFT only from two samples. You need to pad your impulse response with zeros to get a valid result. So in MATLAB that would be: N = 1024; % Number of points to evaluate at % Create the ...

View answer
How to convert filter into frequency domain to do filtering?
Accepted answer
4 votes

Your filter is an FIR filter, therefore its coefficients are simply the impulse response $h[n]$. Your signal $x[n]$ can be filtered in time domain by convolving with impulse response: $$y[n]=x[n]\star ...

View answer
Verifying Channel Response Identity
Accepted answer
4 votes

Just change the code to the following: x = randn(1,1000); h = [1 2 3 4 5]; y = conv(x,h); plot((abs(fft(h,1024))).*(abs(fft(x,1024)))); % It's |H(w)||X(w)| hold on plot(abs(fft(y,1024)),'--r') By ...

View answer
Plotting Real Amplitude of Sine Wave in FFT
Accepted answer
4 votes

Judging from your post, you have over 5 hours of data, your are using to calculate the spectrum. This is a lot of data points to process with FFT. Let's focus on your code and modify it a little bit ...

View answer
The reasons for filter explosion
Accepted answer
4 votes

Basically you never want to use the Transfer Function representation (with b and a) and rather use the Zeros-Poles-Gain (z,p,k). This will allow you to avoid the numerical errors. In your case you ...

View answer
In framing of audio samples', what is need of frame shift while giving frame size??
Accepted answer
4 votes

By performing the windowing with overlap we are artificially increasing our time resolution (larger granularity of features in time). This is especially useful when frame duration is long (bad time ...

View answer
Structure of function that describes sine signal
Accepted answer
4 votes

I think you posted similar question 3 days ago, regarding your teacher claiming that $\sin 2x$ is not a sinusoidal function. Nevertheless this function is definitely sinusoidal. Otherwise how come we ...

View answer
Properties of Spectral Transformations - Allocation (decomposition into even and odd part)
Accepted answer
4 votes

Let's say that your signal is composed of two parts: even and odd: $$s(t)=s_e(t)+s_o(t)$$ We also know following properties of this type of functions: Even: $f(-x)=f(x)$ Odd: $f(-x)=-f(x)$ Let's ...

View answer
MATLAB rand and C++ rand()
Accepted answer
4 votes

It is a programming question, not a signal processing question - keep that in mind, and next time use the StackOverflow. MATLAB rand function returns uniformly distributed variable on interval $[0,1]$...

View answer
Fourier Transform Form: two sin components & a phase shift & a magnitude for only one term
4 votes

Fourier Transform is a linear one, so you can make use of superposition principle: $$ \mathscr{F} [\alpha x(t) + \beta y(t)] = \alpha \mathscr{F}[x(t)] + \beta \mathscr{F}[y(t)] $$ So for the first ...

View answer
Cepstrum, peak picking
4 votes

Cepstrum argument is called quefreency, which is in fact a time domain. So for example if you are looking for the fundamental frequency then you are searching for a peak in a specific range. In your ...

View answer
What is the Use of the Opening Operator
4 votes

Opening is the morphological operation used for example in removal of small particles or some noise in binary image. Additionally it is widely used in hand-writing recognition where you want only the '...

View answer
Does Increasing Resolution Lead to Have a Poor Resolution?
Accepted answer
4 votes

Indeed, that's the Heisenberg Uncertainty Principle - you can't have both very good frequency and time resolution. You always have to sacrifice something. In case of Short Time Fourier Transform it's ...

View answer
How to compute the impulse response from a transfer function
4 votes

Your filter is the all-poles IIR, this simplifies things a bit. Normally you can write transfer function in following form: $H(z)=\dfrac{\sum_{i=0}^{P}b_{i}z^{-i}}{\sum_{j=0}^{Q}a_{j}z^{-j}} $ Going ...

View answer
Convolution : Anechoic Speech signal and Impulse response
Accepted answer
3 votes

I have no access to your audio files so I've downloaded: IR from here (mono/r1_omni.wav) - it's a really long one Anechoic recording from here (operatic-voice/mono/singing.wav) Resampled voice ...

View answer
Audio classification without deep learning
3 votes

From what you've mentioned it looks like the task is for environmental sound event detection. I think that the best starting point for you is to check the DCASE challenge (Detection and Classification ...

View answer
How do I get the volume levels from an audio file?
Accepted answer
3 votes

I can give you a quick and hacky solution with sox that can be easily installed on any Linux distribution. sox in.wav -n trim 0 0.1 stats : newfile : restart 2>&1 | grep 'RMS lev dB' | awk '{ ...

View answer
FFT filter to remove cd scratch
Accepted answer
3 votes

This approach with notch filter with not work. All clicks are impulse-like sounds and we know that an impulse has frequency content at almost every frequency. What you are trying to do, by applying ...

View answer
Converting mel spectrogram to spectrogram
3 votes

Nowadays the easiest thing would be to use librosa for this task. It has the mel_to_stft function which does exactly what you want. As others have mentioned, this reconstruction is lossy and only ...

View answer
The Technology Behind Animoji by Apple
3 votes

It's more like a soft answer (I am happy to update it later), but Alex Acero explained the technology behind aniomoji on this years ICASSP 2018. Here is the link. Basically, they are using so-called ...

View answer
How to implement a filter associated to a specific wavelet
3 votes

You've mentioned Butterworth filters for doing the wavelet analysis using bior6.8. If you want to perform the Discrete Wavelet Transform using some specific wavelet, then you must use its Perfect ...

View answer
Are there any open source libraries for Adaptive noise cancellation?
3 votes

If you are working on chat application (presumably web), then I suggest to take a look at WebRTC. It offers a noise suppressor that works ok for speech. Another option would be to use part of the ...

View answer
1 2
3
4 5
8