python,numpy,matplotlib,signal-processing,convolution

When you convolute discrete signals, you need to scale appropriately to keep the signal's energy (integral over |x(t)|²) constant: import numpy as np import matplotlib.pyplot as plt n = 1000 t = np.linspace(0, 8, n) T = t[1] - t[0] # sampling width x1 = np.where(t<=4, 1, 0) # build...

c#,audio,signal-processing,fft

I ended up using this example which works really well. I wrapped it a bit nicer and ended up with: /// <summary> /// Returns a low-pass filter of the data /// </summary> /// <param name="data">Data to filter</param> /// <param name="cutoff_freq">The frequency below which data will be preserved</param> private float[] lowPassFilter(ref...

c++,audio,casting,signal-processing

The method is going to vary depending on whether you're 24-bit data is packed or is just 24-bits stored in a 32-bit word. I'm going to assume it is not packed and is left justified within the integer because that is most common. The technique is to simply shift the...

You have two things wrong: You should not use abs in the maximization. 0.7*3.14 is the true phase lag, not the true time lag. The true time lag is -0.7 (note also the minus sign). Let me elaborate these two points. You need to use [~,I] = max(acor) that is,...

signal-processing,dft,windowing,kissfft

Frequency domain output clarifications In the frequency domain, the rectangular and Hamming windows look like: As you may be aware, multiplication in the time domain by a window corresponds to a convolution in the frequency domain, which essentially spreads the energy of the signal over multiple frequency bins in what...

matlab,audio,signal-processing,fft

That's because you're not plotting the magnitude. What you are plotting are the coefficients, but these are complex valued. Because of that, the horizontal axis is the real component and the vertical axis is the imaginary component. Also, when you use sound by itself, the default sampling frequency is 8...

c++,filtering,signal-processing

It can be easily found (in Debian or Ubuntu): $ aptitude search ~dbutterworth | grep lib Which gives you answer immediately: p librtfilter-dev - realtime digital filtering library (dev) p librtfilter1 - realtime digital filtering library p librtfilter1-dbg - realtime digital filtering library (dbg) So you need library called rtfilter....

matlab,filter,signal-processing,noise

For your first question: Why did i need to pass the noise signal to a low pass filter in the first place? Supposing that the noise you have in your signal is high frequency (higher than the useful signal itself) this is the job of a low-pass filter. From Wikipedia:...

Now with pulstran. A short documentation on pulstran. The syntax is: y = pulstran(t, d, function_handle, p1, p2, ..) and t are time steps for calculating the pulses (also the total time and dimensions of output), d are the pulse centers (shifting deltas) and p1, p2, .. are additional parameters...

audio,signal-processing,normalization

You can't plot the signal directly, as it always varying positive and negative. Therefore you need to average out the strength of the signal every so many samples. Say you're sampling at 44.1kHz, perhaps you might choose 4410 samples so you're updating your display 10 times per second. So you...

y = cconv(a,b,5) the 3rd argument is 5 not 4 for what the paper describes...

image,image-processing,numpy,filter,signal-processing

You probably see overflow. If you cast 257 to np.uint8, you will get 1. According to a google search, avi files contain images with a color depth of 15 - 24 bit. When you cast this depth to np.uint8, you will see white regions getting darkened and (if a normalization...

algorithm,machine-learning,signal-processing,classification,svm

The key to evaluating your heuristic is to develop a model of the behaviour of the system. For example, what is the model of the physical process you are monitoring? Do you expect your samples, for example, to be correlated in time? What is the model for the sensor output?...

Just to be clear, the definition of signal energy and power are given in this slide: As you can see, signal energy is just the total area under the squared signal, so the formula you used E = sum(abs(x).^2) is correct. Since signals that are periodic will have non-zero values...

python,signal-processing,voice-recognition,phoneme

Accurate phoneme recognition is not easy to archive because phonemes itself are pretty loosely defined. Even in good audio the best possible systems today have about 18% phoneme error rate (you can check LSTM-RNN results on TIMIT published by Alex Graves). In CMUSphinx phoneme recognition in Python is done like...

Firstly, I would like to refer you to Paul R's wonderful post on the FFT with regards to what each bin means with respect to the frequency content of your signal - How do I obtain the frequencies of each value in a FFT? Essentially, it doesn't matter how long...

I'm guessing your signals aren't actually the same length. If you're thresholding them independently, your thresh_start value won't be the same, so: onesec = x[thresh_start-1:one_sec] will give you different-length arrays for the two files. You can either calculate the threshold value separately and then provide that number to this module...

android,matlab,usb,signal-processing,sensor

As I teach (to my students) in such cases: "Google is your friend.", but I don't remember ever this lesson for me. In the Matlab File Exchange (http://www.mathworks.com/matlabcentral/fileexchange/40876) there is a free toolbox for analyzing output data. Of course, in the smartphone must be installed an application: SensorUdp (https://play.google.com/store/apps/details?id=jp.ac.ehime_u.cite.sasaki.SensorUdp). Matlab...

May be you can use mlpy.wavelet and try this one: >>> import numpy as np >>> import mlpy.wavelet as wave >>> X = np.array([ 5.65685425, 3.41458985, 0.29185347, -0.29185347, -0.28310081, ... -0.07045258, 0.28310081, 0.07045258]) >>> wave.idwt(X=X, wf='d', k=6) array([ 1.00000000e+00, 2.00000000e+00, 3.00000000e+00, 4.00000000e+00, 3.00000000e+00, 2.00000000e+00, 1.00000000e+00, -3.53954610e-09]) For detail explanation you...

math,signal-processing,vhdl,fpga,lookup-tables

Subtract 62710 (not 62720, to make the first range the same size as the others.). Notice that 20=5*4 so divide by 4 (omit the two LSBs). You now have a much smaller range to fit into the LUT. Also subtract 3072 from each LUT entry. (You only need to set...

matlab,signal-processing,fft,wavelet,haar-wavelet

Idea: get the axis the was used to plot the spectrogram and set its properties accordingly. For example, supposing you'd want to restrict the x range to [0, 0.5] and y to [100, 200], then: %'old code here' %' . . . ' spectrogram(x4,128,50,NFFT); %'new code here' axis(get(gcf,'children'), [0, 0.5,...

objective-c,signal-processing,fft,accelerate-framework

This loop is wrong: for(int i = 0;i<fftLength * 2;i++){ fft[i] = fftData.realp[i]; fft[i+1] = fftData.imagp[i]; } Assuming you want interleaved real/complex output data then it should be: for(int i = 0; i < fftLength; i++) { fft[i * 2] = fftData.realp[i]; fft[i * 2 + 1] = fftData.imagp[i]; }...

matlab,signal-processing,software-defined-radio

Take a look at this: http://www.mathworks.com/help/comm/ref/comm.rectangularqamdemodulator-class.html hMod = comm.RectangularQAMModulator('ModulationOrder',16); dataIn = randi([0 15],10000,1); txSig = step(hMod,dataIn); You can also use: TxS = (randi(4,N,1)*2-5)+i*(randi(4,N,1)*2-5) ...

image,matlab,image-processing,filtering,signal-processing

For one thing, there is no such command called ifftshow. Secondly, you aren't filtering anything. All you're doing is visualizing the spectrum of the image. In terms of visualizing the spectrum, how you're doing it right now is very dangerous. For one thing, you are visualizing the coefficients at each...

%euclidean distance index=zeros(1,10); Distance=zeros(10,10); for m =1:10 MinDistance=10000; for n=1:10 Distance(m,n)= norm(test{m}-temp{n},2); if (Distance < MinDistance) index(m,n)=n; MinDistance=Distance; end end end TimeDiff=zeros(10,10); euclidean =zeros(10,10); for l=1:10 for i=1:10 [c,lag]=xcorr(test{l},temp{i}); [~,I]= max(abs(c)); shifted= circshift(test{1},I); euclidean(l,k)=norm(temp{l}-shifted,2); end end %................................................. Index=0; for i=1:10 Min=1000000; for j=1:10 if( euclidean(i,j)<Min...

matlab,signal-processing,fft,frequency,continuous-fourier

I can't get your pictures to load over my proxy, but the spectrum of a FFT will be have a bigger "gap" in the middle at a higher sampling rate. A fundamental property of sampling is that it introduces copies of your original spectrum; you may have learned this if...

matlab,signals,processing,signal-processing,digital

The easiest way of getting rid of those harmonics is to simply to a low-pass filter...which will get rid of ALL frequency content above your cutoff. This is no longer a notch filter, like you showed, but it will certainly get rid of tall of those harmonics: %% lowpass IIR...

matlab,signal-processing,wavelet,wavelet-transform,continuous-fourier

Because we are dealing with digitized signals. You can not plot an infinite amount of samples of your signal. That is why you need to specify some parameters prior to working with digitized signals, such as the sampling frequency. The sampling frequency gives you a relationship between your samples indices...

Two things. You are using the c'tor for mapping a matrix: Map ( PointerArgType dataPtr, Index nbRows, Index nbCols, const StrideType & a_stride = StrideType() ) Constructor in the dynamic-size matrix case. Parameters dataPtr pointer to the array to map nbRows the number of rows of the matrix expression nbCols...

signals,signal-processing,vhdl,modelsim

You have a name collision. You have two primary units in the same (working) library with the same name. library IEEE; use IEEE.STD_LOGIC_1164.ALL; -- use IEEE.std_logic_arith.all; package Convolution_pkg IS TYPE real_vector is ARRAY(integer RANGE <>) OF real; end; use work.Convolution_pkg.ALL; ... Change the name of one or the other. (This...

javascript,signal-processing,web-audio

Until Audio Workers come online to add thread(s) to Web Audio, the single threaded nature of browser javascript strictly limits any real time heavy lifting - I experienced this when I tasked the browser to render using Web Audio while negotiating Web Socket traffic with a Node.js server to provide...

matlab,image-processing,3d,signal-processing,gaussian

The logic behind findpeaks for 1D arrays / vectors is that it looks at local 3 element neighbourhoods and sees whether the centre of the window is the maximum element. If it is, this could potentially be a peak. You would also need to apply a threshold to ensure that...

matlab,filter,filtering,signal-processing

The Kaiser window filter designer does not support automatically solving for that sort of constraint. Looking through the source for kaiserord it looks like it supports low- and high-pass, bandpass, bandstop, and mulitple band pass/stop as long as the pass/stop bands are all of the same amplitude. The simplest solution...

c#,matlab,signal-processing,fft

abs(fft(x)) is not the same as abs(real(fft(x))). You aren't properly combining the real and imaginary parts. Assuming this is the documentation: Compute the forward or inverse Fourier Transform of data, with data containing real valued data only. The output is complex valued after the first two entries, stored in alternating...

matlab,scipy,signal-processing

(I also posted the following on the scipy mailing list.) When you design a Butterworth filter with buttord, there aren't enough degrees of freedom to meet all the design constraints exactly. So there is a choice of which end of the transition region hits the constraints and which end is...

signal-processing,fft,software-defined-radio

Frequency domain entropy, also known as a (Power) Spectral Entropy calculation is done in following steps: Calculate the FFT of your signal. Calculate the PSD of your signal by simply squaring the amplitude spectrum and scaling it by number of frequency bins. Normalize the calculated PSD by dividing it by...

python,numpy,scipy,signal-processing,astronomy

It would appear you have the same problem described here. Basically you are not testing the frequency of interest and did not take into account that the frequencies passed to lombscargle are angular frequencies. If you change your list of tested frequencies, you'll see there's a peak near the angular...

Basically, your problem reduces to ignoring the fundamental rules of matrix multiplication (e.g.: A:1xM * B:Mx1 = C:1x1, i.e. a scalar, versus B:Mx1 * A:1xN = C:MxN, i.e. a full matrix with the dimensions MxN, versus A:1xM elementwise multiplied with B:1xM is C:1xM). Your resulting picture is composed of a...

matlab,signal-processing,matlab-figure

I managed to get a much simpler solution than the one mentioned by Dave Durbin by quantizing the signal into 40 levels and then comparing it with its shifted region. The code is attached for reference: function TD=TimeDelay(val,fs) n=40; jump=( max(val) + abs(min(val)))/40; level=zeros(n,1); level(1)=min(val) + jump; for i=2:n level(i)=level(i-1)+jump;...

Harmonics are unrelated in amplitude. Instead, a harmonic is a wave that has N=2,3,4... times the frequency. Mixing the different waves is just a matter of adding the components. Thus, for two harmonics the code is: audio[0] = short(m_amplitude[0] * sin(time * 2 * M_PI * m_freq1)) + short(m_amplitude[1] *...

python,optimization,numpy,scipy,signal-processing

Assuming a pandas dataframe like so: Value 0 0 1 3 2 2 3 2 4 1 5 2 6 3 7 0 8 1 9 3 10 0 11 0 12 0 13 1 14 0 15 3 16 2 17 3 18 1 19 0 You can get...

signal-processing,fft,wavelet,haar-wavelet,wavelet-transform

note that, the width of the winow function is constant throughout the entire STFT process. and the time (t) in the function g(t-t') indicate sthat, t: is the current time on the time axis and it is variable each time the window is moved/shifted to the righ to overlap the...

You can do it by file or by code. By file (I did not test it so it may not work): create a text file with electrode names - one electrode per line, the order should be the same as in your file. Load the file through edit -> channel...

python,numpy,matplotlib,signal-processing,fft

Actually, the opposite. All the other frequencies in a full complex FFT result of strictly real data are split into 2 result bins and mirrored as complex conjugated, thus half a pure sinusoids amplitude when scaled by 1/N, except the DC component and N/2 cosine component, which are not split...

Your problem seems to be that your time-grid is not evenly-spaced: In [83]: d = np.diff(data[:,0]) In [84]: d Out[84]: array([ 0.0006144 , 0.0006144 , 0.00049152, ..., 0.0006144 , 0.0006144 , 0.00049152]) If I interpolate the values to a constant-spacing in time: data = np.loadtxt('3.dat', comments="#") t = data[:, 0]...

python,numpy,signal-processing

Some tricks to do that: from numpy import * from matplotlib.pyplot import * from scipy.signal import convolve2d from scipy.ndimage.filters import minimum_filter as mini a=random.rand(100,100) neighbours = ones((3,3)) threshold=0.2 u=convolve2d(a<threshold,neighbours,'same') mins=((u>=6)*(a<threshold)) minis=mini(choose(mins,(1,a)),size=(3,3))==a subplot(121);imshow(mins,cmap=cm.gray_r,interpolation='none') subplot(122);imshow(minis,cmap=cm.gray_r,interpolation='none') this script produce: On the left figure those who have 5...

python,python-2.7,filter,scipy,signal-processing

It is normal for a discrete time Butterworth filter to have ringing transients, and these can overshoot the bounds of the input. Take a look at the step response of your filter (as opposed to the frequency response, which is a steady state calculation). For example, the following code In...

findpeaks is most likely giving you a different number of detected peaks and locations for each invocation that is made to the function. Because you're trying to slice into a matrix which is not ragged (MATLAB does not support ragged matrices), you will get a dimension mismatch. A solution would...

matlab,signal-processing,spectrogram

A simple way to do it would be to use xlim: xlim([1 1.5]); to plot the [1 1.5] second window, or xlim(T([900 920])); if you prefer to specify indexes in your time vector....

performance,matlab,optimization,gpu,signal-processing

Solution Code This seems to be pretty efficient as benchmark runtimes in the next section might convince us - %// Select the portion of FT to be processed and %// send copy to GPU for calculating everything gFT = gpuArray(FT(:,1:n/2 + 1)); %// Perform non-smoothed Periodogram, thus removing the first...

ios,c,audio,signal-processing,dft

I think one problem is with these lines: float *data=(float*)inCompleteAQBuffer->mAudioData; int nn = sizeof(data)/sizeof(float); which I believe is intended to tell you the number of samples. I don't have the information or resources to reproduce your code, but can reproduce the bug with this: #include <stdio.h> #include <stdlib.h> int main(void)...

python,unit-testing,matplotlib,signal-processing,acoustics

Magnetude is just the absolute value of the frequency spectrum. As you have labelled in Process 1 "Energy" is a good way to think about it. Both Process 1 and Process 2 are in the same units. The only difference is that the values in Process 2 has been divided...

python,numpy,matplotlib,scipy,signal-processing

You can implement the periodic (a.k.a. circular) cross correlation using the FFT: from numpy.fft import fft, ifft def periodic_corr(x, y): """Periodic correlation, implemented using the FFT. x and y must be real sequences with the same length. """ return ifft(fft(x) * fft(y).conj()).real You can also implement it using np.correlate, if...

matlab,filtering,signal-processing,fft

You're trying to do Deconvolution process by assuming the Filter Model is Gaussian Blur. Few notes for doing Deconvolution: Since your data is real (Not synthetic) data it includes some kind of Noise. Hence it is better to use the Wiener Filter (Even with the assumption of low variance noise)....

python,arrays,numpy,multidimensional-array,signal-processing

I would collect the file data in a list - a list of lists - and then worry about repackaging it as an array after. Appending to a list is cheap. e.g. all_files = [] for i in range(len(files)): all_files.append(read_data(files[i])) Now you can get information like the number of files,...

Hmm I don't really know about signal processing either but maybe this works: from scipy.signal import argrelmax f = xf[scipy.signal.argrelmax(yf[0:N/2])] Af = np.abs(yf[argrelmax(yf[0:N/2])]) ...

logic,signal-processing,circuit,flip-flop,circuit-diagram

Strictly, this does belong on EE. The other questions you've found are likely to be old - before EE was established. You should look at the 1-to-0 transitions of the clock. When that occurs and only when that occurs, the value currently on S is transferred to Q. The Race...

android,audio,signal-processing,avconv,tarsosdsp

The PipeDecoder is indeed platform specific. It only works on a machine (UNIX, Windows) with the avconv executable present. It works by calling this executable with e.g. an MP3 sampled at 44.1kHz and it returns, via a pipe, decoded PCM samples at the requested sample rate. ´avconv´ can be replaced...

python,numpy,scipy,signal-processing

Welch's method just computes the periodogram for multiple overlapping segments of the signal, then takes the average across segments. This effectively trades resolution for noise reduction in the frequency domain. However, performing lots of separate FFTs for each small segment will be more expensive than computing fewer FFTs for larger...

windows-phone-8,signal-processing,frequency-analysis,goertzel-algorithm

If you know the set of frequencies and the durations, then a set of sliding Goertzel filters is a good start to building a simple demodulator. Comparing and scanning for for a peak difference between these filters is a better decision criteria than just checking for a certain magnitude output.

audio,signal-processing,pcm,fmod

16-bit audio is, by convention, usually signed. Think about what PCM audio is: each measure is how far along its axis the speaker should physically rest at that moment in time. Therefore perfect silence is absolutely any repeating value — that represents the speaker not moving. 0 is then the...

I am assuming that when you do for n=1:N-m you want to do for n=1:N-max(m) (or for n=N-m(end)). If you do the first one N-m returns an array, not a single value, as m is an array!...

You can use logical indexing: a = randn(1,1000); fs=10; ydft = fft(a); ydft = ydft(1:length(a)/2+1); freq = 0:fs/length(a):fs/2; lowestFrequencyToPlot = 2; idxHigherFrequencies = freq >= lowestFrequencyToPlot; plot(freq(idxHigherFrequencies),abs(ydft(idxHigherFrequencies))); only the highest frequency can be plotted with end. Edit: The array freq will consist of the frequencies like: [1,2,3,4,5]. If you compare...

Find the P wave (s). Find the QRS complex(es). Pair up a QRS complex and its preceding P wave. Make sure to avoid cases where there is a PVC or other abnormal beat in between. Subtract the time of the P wave from the time of the R peak...

matlab,signal-processing,quantization

You can certainly compute this in real number space, but you risk hitting precision problems (depending on starting point). If you're interested in studying orbits, you may prefer to work in a rational fraction representation. There are more efficient ways to do this, but the following code illustrates one way...

c,matlab,optimization,signal-processing,porting

You will need both MATLAB Coder and Embedded Coder to customize and optimize the generated for the embedded target. I suggest you have a look for example at MATLAB to C Code Generation with Embedded MATLAB or other videos/webinars on the subject to get a better idea of what's involved.

c#,.net,signal-processing,mathnet

The ProcessSamples method doesn't appear to modify the input array, instead returning a new, filtered array. You need: postProcessedData = bandPass.ProcessSamples(preProcessedData); (Here's the documentation.) Incidentally, this line from your code: postProcessedData = preProcessedData; probably doesn't do what you're thinking. It doesn't make a copy of the data; it merely points...

python,pandas,expression,signal-processing

It's hard to tell from the question but I think you just want to classify each entry in indicators with according to some set of conditions for that column. First I would initialise signals: signals = pd.Series(index=indicators.index) This will be a series of nans. For a give indicator name (ADR...

matlab,signal-processing,phase

There are several ways that you can measure the phase shift between signals. Between your response, the comments below your response, and the other answers, you've gotten most of the options. The specific choice of technique is usually based on issues such as: Noisy or Clean: Is there noise in...

Katie's answer was spot on: A very simple and efficient way to filter two frequencies is using Goertzel's algorithm, with plenty of implementations available out there: http://en.wikipedia.org/wiki/Goertzel_algorithm...

matlab,signal-processing,fft,wavelet

You can not see what you expected because the value of NFFT is 1 means when you write NFFT/2+1 as an index of Y it will not be an integer value so MATLAB warns you. You can calculate NFFT like this: NFFT = 2^nextpow2(length(t)) instead of writing NFFT = 2^nextpow2(StopTime)...

c,algorithm,signal-processing,fft,ifft

I strongly recommend to read this: http://stackoverflow.com/a/26355569/2521214 Now from the first look the offset and delta is used to: make the butterfly shuffle permutation you start with step 1 and half of the interval and by recursion you will get to log2(N) step and interval of 1 item ... +/-...

If you have DSP System toolbox, there is a "Cumulative Sum" block which should be able to replace your toeplitz, traiangular matrix and matrix sum. http://www.mathworks.com/help/dsp/ref/cumulativesum.html If you do not have DSP System toolbox, I suggest coding this in MATLAB Function block where it should be a one liner. y...

python,scipy,signal-processing

Looking at your graphs shows that the signal filtered with filtfilt has a peak magnitude of 4.43x107 in the frequency domain compared with 4.56x107 for the signal filtered with lfilter. In other words, the signal filtered with filtfilt has an peak magnitude that is 0.97 that when filtering with Now...

matlab,signal-processing,octave

DC isolation is basically low-pass filtering. You want to remove all the high-frequency components, while preserving the low. There are tons of approaches to this problem, but it looks like you're looking for something quick and simple. One of the simplest forms of low-pass filter is the moving average. It's...

java,audio,signals,signal-processing,wav

I have already solved this problem: I have a white noise generated as an array of doubles: public static double[] whiteNoise(int length) { double[] out = new double[length]; for (int i = 0; i < length; i++) { out[i] = (Math.random() * 2 - 1.0)/2.0; } return out; } I...

c++,filtering,signal-processing

Unfortunately, it is not as simple as "just get some library and it will do all the work for you"; digital filters is a quite complicated subject. It is easy to apply digital filter to your data only if your measurements come at fixed time intervals (known as "sample rate"...

matlab,signal-processing,fft,wavelet

Replace the last four lines by hold on %// this prevents each subsequent `plot` from removing the previous graph plot(t1,x1,'r'); %// use appropriate "t" vector: `t1` in this case plot(t2,x2,'g'); plot(t3,x3,'b'); plot(t4,x4,'black'); ...

c#,signal-processing,naudio,resampling

NAudio includes several different resamplers - one that uses ACM (WaveFormatConversionStream), one that uses Media Foundation (MediaFoundationResampler) and one written entirely in managed code (WdlResamplingSampleProvider). I discuss each of these in this post. For your case, you want to do "input driven" resampling, where you know how many input samples...

The numpy FFT procedures actually and in contrast to other software do adjust for the sequence length, so that you get nf.ifft(nf.fft(gx)) == gx up to some floating point error. If your dx and dk are computed the usual way, then dk*dx=(2*pi)/N which only works for unadjusted FFT routines. You...

matlab,signal-processing,fft,ifft

Well, as the error suggests you have "too many output arguments". By looking at your code I believe that the problem is that audiowrite does not return any output arguments (have a look at http://www.mathworks.com/help/matlab/ref/audiowrite.html). You should use audiowrite(filename,audio_r,44100); instead. In any case, you should learn how to use the...

Why reinvent the wheel? Academic purposes You have time to waste, see 1. You are a code wizard and you know your code is superior in all ways. Why not reinvent the wheel? Speed of development: writing everything from scratch is just not doable Accuracy of result: you are bound...

matlab,signal-processing,convolution

You almost have it correct. There are two things slightly wrong with your understanding: You chose valid as the convolution flag. This means that the output returned from the convolution has its size so that when you are using the kernel to sweep over the matrix, it has to fit...

javascript,audio,signal-processing,web-audio,transfer-function

The WaveShaper node does not enable generic transfer functions, per se - but you can use it to do that. To answer your question - x is the offset into the array, with a little preprocessing. The curve you give to the waveshaper is like a lookup table for x...

You can use OffsetSampleProvider to do this, and set the Take duration: var trimmed = new OffsetSampleProvider(signalGenerator); trimmed.Take = TimeSpan.FromSeconds(10); waveOut.Init(trimmed); waveOut.Play(); ...

The main problem is likely to be how you declared fft_input. Based on your previous question, you are allocating fft_input as an array of kiss_fft_cpx. The function kiss_fftr on the other hand expect an array of scalar. By casting the input array into a kiss_fft_scalar with: kiss_fftr(fftConfig, (kiss_fft_scalar * )fft_input,...

python,audio,signal-processing

First, what is the datatype of audiodata? I assume it's some fixed-width integer format and you therefore get overflow. If you convert it to a floating point format before processing, it will work fine: audiodata = audiodata.astype(float) Second, don't write your Python code element by element; vectorize it: d =...

signal-processing,wavelet,haar-wavelet,wavelet-transform

the raw signal what ever it is measuring it is a function of time "time-domain" which means if we plotted the "time-domain" we will get one axes for the time (t), which is independent, and another axes for the Amplitude (x(t)) which is dependent variable on the time. Note that:...

java,signal-processing,fft,audio-fingerprinting,windowing

At first, I think you should consider having your FFT length fixed. If I understand your code correctly, you are now using some kind of minimum buffer size also as the FFT length. FFT length has huge effect on the performance and resolution of your calculation. Your link to WindowFunction.java...

c,arrays,recursion,signal-processing,interpolation

You can get rid of memory allocation completely. Here is a simplified version of the imf function: void imf(long double *hilbert, long double *upper, long double *lower) { for (int i = 0; i < ARRAYSIZE; i++) { hilbert[i] -= (upper[i] + lower[i]) / 2.0; } sift can be simplified...

Any of those choices qualifies as a sinusoid. Note that cos(2*pi*fs*t) is the same as sin(2*pi*fs*t + pi/2) In general, sin(2*pi*fs*t + phi) is a sinusoid for any choice of phi (as would be cos(2*pi*fs*t + phi)) . phi is the initial phase (or simply phase) of the sinusoid. To...

numpy,signal-processing,fft,ifft

The FFT of a real-valued input signal will produce a conjugate symmetric result. (That's just the way the math works best.) So, for FFT result magnitudes only of real data, the negative frequencies are just mirrored duplicates of the positive frequencies, and can thus be ignored when analyzing the result....

matlab,filtering,signal-processing,simulink

Basically you are asking for a filter that has time varying parameters. The Butterworth filter block does not allow for this, and cannot be modified to do so, so you are going to have to roll your own. This can be achieved in several ways: Determining the difference equations that...

matlab,signal-processing,phase

The FT is just a correlation of your signal with a cosine and sine wave, and the results give you phase and magnitude. Instead of doing a FT of the whole signal, just calculate the coefficient at your frequency of interest. As for the accuracy - the longer your signal,...