time-frequency

Infinite looping consumes 100% CPU

给你一囗甜甜゛ 提交于 2020-01-03 21:14:32
问题 I am stuck in a situation where I need to generate a defined frequency of some Hz. I have tried multimedia timers and all other stuff available on the internet but so far an infinite loop with some if-else conditions gave me the best results. But the problem in this approach is that it consumes almost all of the cpu leaving no space for other applications to work properly. I need an algorithm with either generates frequency of some Hz to KHz. I am using windows plateform with C#. 回答1: You can

To scale values from Wigner-Ville Distribution to real range in Matlab

放肆的年华 提交于 2019-12-30 14:21:10
问题 I run by using the function tfrwv.m in Time-Frequency Toolbox [B,T,F] = tfrwv(data, 1:length(data), length(data), 1); B(1:130, :) = 0; % remove the duplicate part of the distribution imagesc(T, F, abs(B)); colormap(hot); xlabel('t [s]'); ylabel('f [Hz]'); I get The frequency should be within [0,180] Hz and time [0,2.5s]. How can you scale time and frequency to the real values? The manuals says %TFRWV Wigner-Ville time-frequency distribution. % [TFR,T,F]=TFRWV(X,T,N,TRACE) computes the Wigner

PANDAS - Loop over two datetime indexes with different sizes to compare days and values

筅森魡賤 提交于 2019-12-24 03:23:47
问题 Looking for a more efficient way to loop over and compare datetimeindex values in two Series objects with different frequencies. Setup Imagine two Pandas series, each with a datetime index covering the same year span yet with different frequencies for each index. One has a frequency of days, the other a frequency of hours. range1 = pd.date_range('2016-01-01','2016-12-31', freq='D') range2 = pd.date_range('2016-01-01','2016-12-31', freq='H') I'm trying to loop over these series using their

How to downsample Fourier complex values?

可紊 提交于 2019-12-24 01:38:28
问题 Disclaimer: I'm not a signal processing expert. I'm writing a function that takes a 1D array and performs Fast Fourier Transform on it. Here's how it works: If the array's size is not a power of two, pad it with 0s at the end so that its size becomes a power of two. Perform FFT on the padded array and store the results in an array x . Downsample the complex array x to match the length of the original non-padded array. Return x . I'm having trouble with step 3 . If I omit step 3 and perform

Time/frequency color map in python

不打扰是莪最后的温柔 提交于 2019-12-13 09:16:51
问题 Is there in native Python 3.X library or in scipy/numpy/matplolib libraries a function or their short set which could help me to draw a plot similar to this one(?): What would be an efficient way to achieve something like this? Thank you in advance. 回答1: The bottom plot is the result of Continuous Wavelet Transform. There is a function called cwt() in Scipy. Check it out here. http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.cwt.html 来源: https://stackoverflow.com/questions

Count Parallel port input frequency - C#

可紊 提交于 2019-12-12 04:08:36
问题 I have to count the input frequency of the parallel port at Pin no.13, comming from a 555 timer IC, the real frequency should be around 3-4 Hz (ON Pulse). I have tried several codes, several times but every time those are giving different values. I have tried the following code: [DllImport("inpout32.dll", EntryPoint = "Inp32")] public static extern int Input(int adress); private void button1_Click(object sender, EventArgs e) { int currentState = Input(889); int LastState; while (true) { int

Filter design and frequency extraction in Python

家住魔仙堡 提交于 2019-12-10 13:26:26
问题 I'm working on a project to find the instantaneous frequency of a multicomponent audio signal in Python. I am currently using a Butterworth bandpass filter combined with scipy.signal.lfilter to extract around my desired frequency region. I then use the analytic signal (from scipy.signal.hilbert ) to get the instantaneous phase, which can be unwrapped to give frequency. As a relative novice to signal processing, I have two main questions: I have read that in many applications, it is preferable

Continuous Wavelet Transform with Scipy.signal (Python): what is parameter “widths” in cwt() function? (time-frequency)

我的未来我决定 提交于 2019-12-05 02:29:25
问题 I search to draw a time-frequency signal with a discrete temporal signal (sampling step = 0.001sec). I use Python and the library Scipy.signal. I use the function cwt(data, wavelet, widths), which returns a matrix, to do a continuous wavelet transform, with the complex morlet wavelet (or gabor wavelet). Unfortunately, there is not a lot of documentations of this use. The best which I found are: - this for Matlab (I try to find the same scale-time result) but I have naturally not access to the

Note Synthesis, Harmonics (Violin, Piano, Guitar, Bass), Frequencies, MIDI [closed]

不羁岁月 提交于 2019-12-04 21:25:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 11 months ago . I want to find, how notes were built. Example for a Instrument (Violin or Piano), The Note LA4 (A4) has main (or central) frequency FC at 440Hz with a Specific Amplitude AC, but also it must has other frequencies (harmonics?) FH with other amplitudes AH. The Harmonics have other frequencies that are dependant

Note Synthesis, Harmonics (Violin, Piano, Guitar, Bass), Frequencies, MIDI [closed]

*爱你&永不变心* 提交于 2019-12-03 14:53:58
I want to find, how notes were built. Example for a Instrument (Violin or Piano), The Note LA4 (A4) has main (or central) frequency FC at 440Hz with a Specific Amplitude AC, but also it must has other frequencies (harmonics?) FH with other amplitudes AH. The Harmonics have other frequencies that are dependant of Main Frequency with amplitudes (almost) less than the amplitude of Main Frequency. Forming (building) Notes I want to know how is formed (established) the notes (No time is considered). Example: A4 = AC(FC) + AH1(FH1)+ AH2(FH2) + AH3(FH3) + AH4(FH4)....AHn(FHn) Maybe, FH1 = 2*FC, FH2 =