signal-processing

Extracting beats out of MP3 music with Python

☆樱花仙子☆ 提交于 2019-12-05 05:26:42
What kind of solutions are there to analyze beats out of MP3 music in Python? The purpose of this would be to use rhythm information to time the keyframes of generated animation, export animation as video file and and mix the video and audio together. Check this: The Echo Nest Remix API # You can manipulate the beats in a song as a native python list beats = audio_file.analysis.beats beats.reverse() 来源: https://stackoverflow.com/questions/6203007/extracting-beats-out-of-mp3-music-with-python

Calculate Coefficients of 2nd Order Butterworth Low Pass Filter

你离开我真会死。 提交于 2019-12-05 05:16:52
With the, Sampling Freq: 10kHz Cut-off Freq: 1kHz How do I actually calculate the coefficients for the difference equation below? I know the difference equation will be in this form, but do not know how to actually work out and come up with the numbers for the coefficients b0, b1, b2, a1, a2 y(n) = b0.x(n) + b1.x(n-1) + b2.x(n-2) + a1.y(n-1) + a2.y(n-2) I will eventually be implementing this LPF in C++ but I need to know how to actually calculate the coefficients first before I can get anywhere with it Here you go. ff is the frequency ratio, 0.1 in your case: const double ita =1.0/ tan(M_PI*ff

Trilateration of a signal using Time Difference of Arrival

懵懂的女人 提交于 2019-12-05 04:58:42
I am having some trouble to find or implement an algorithm to find a signal source. The objective of my work is to find the sound emitter position. To accomplish this I am using three microfones. The technique that I am using is multilateration that is based on the time difference of arrival . The time difference of arrival between each microfones are found using Cross Correlation of the received signals. I already implemented the algorithm to find the time difference of arrival , but my problem is more on how multilateration works, it's unclear for me based on my reference, and I couldn't

iPhone: CPU power to do DSP/Fourier transform/frequency domain?

眉间皱痕 提交于 2019-12-05 04:29:45
I want to analyze MIC audio on an ongoing basis (not just a snipper or prerecorded sample), and display frequency graph and filter out certain aspects of the audio. Is the iPhone powerful enough for that? I suspect the answer is a yes, given the Google and iPhone voice recognition, Shazaam and other music recognition apps, and guitar tuner apps out there. However, I don't know what limitations I'll have to deal with. Anyone play around with this area? Apple's sample code aurioTouch has a FFT implementation. The apps that I've seen do some sort of music/voice recognition need an internet

Adding Accents to Speech Generation

眉间皱痕 提交于 2019-12-05 03:23:31
The first part of this question is now its own, here: Analyzing Text for Accents Question: How could accents be added to generated speech? What I've come up with: I do not mean just accent marks, or inflection, or anything singular like that. I mean something like a full British accent, or a Scottish accent, or Russian, etc. I would think that this could be done outside of the language as well. Ex : something in Russian could be generated with a British accent, or something in Mandarin could have a Russian accent. I think the basic process would be this: Analyze the text Compare with a

How to change pyplot.specgram x and y axis scaling?

和自甴很熟 提交于 2019-12-05 02:03:46
问题 I have never worked with audio signals before and little do I know about signal processing. Nevertheless, I need to represent and audio signal using pyplot.specgram function from matplotlib library. Here is how I do it. import matplotlib.pyplot as plt import scipy.io.wavfile as wavfile rate, frames = wavfile.read("song.wav") plt.specgram(frames) The result I am getting is this nice spectrogram below: When I look at x-axis and y-axis which I suppose are frequency and time domains I can't get

FFT normalization

99封情书 提交于 2019-12-05 01:03:12
问题 I know this question has been asked ad nauseam but somehow I can't make it work properly. I created a single, sine wave of 440 Hz having a unit amplitude. Now, after the FFT, the bin at 440 Hz has a distinct peak but the value just isn't right. I'd expect to see 0 dB since I'm dealing with a unit amplitude sine wave. Instead, the power calculated is well above 0 dB. The formula I'm using is simply for (int i = 0; i < N/2; i++) { mag = sqrt((Real[i]*Real[i] + Img[i]*Img[i])/(N*0.54)); //0.54

Using RNN to recover sine wave from noisy signal

走远了吗. 提交于 2019-12-05 01:01:54
问题 I am involved with an application that needs to estimate the state of a certain system in real time by measuring a set of (non-linearly) dependent parameters. Up until now the application was using an extended Kalman filter, but it was found to be underperforming in certain circumstances, which is likely caused by the fact that the differences between the real system and its model used in the filter are too significant to be modeled as white noise. We cannot use a more precise model for a

Change phase of a signal in frequency domain (MatLab)

假如想象 提交于 2019-12-04 22:55:55
I posted this question on dsp.stackexchange, and was informed that it was more relevant for stackoverflow as it is primarily a programming question: I am attempting to write a code which allows me to change the phase of a signal in the frequency domain. However, my output isn't exactly correct, so something must be wrong. For a simple example assume that we have the function y = sin(2*pi*t) and want to implement a phase shift of -pi/2. My code looks as follows: clear all close all N = 64; %number of samples fs = 10; %sampling frequency ts = 1/fs; %sample interval tmax = (N-1)*ts; t = 0:ts:tmax

Unable to get correct frequency value on iphone

∥☆過路亽.° 提交于 2019-12-04 21:22:33
I'm trying to analyze frequency detection algorithms on iOS platform. So I found several implementations using FFT and CoreAudio ( example 1 and example 2 ). But in both cases there is some imprecision in frequency exists: (1) For A4 (440Hz) shows 441.430664 Hz. (1) For C6 (1046.5 Hz) shows 1518.09082 Hz. (2) For A4 (440Hz) shows 440.72 Hz. (2) For C6 (1046.5 Hz) shows 1042.396606 Hz. Why this happens and how to avoid this problem and detect frequency in more accurate way? Resolution in the frequency domain is inversely related to number of FFT bins. You need to either: increase the size of