We’re rewarding the question askers & reputations are being recalculated! Read more.
19

Sampling at a higher frequency will give you more effective number of bits (ENOB), up to the limits of the spurious free dynamic range of the Analog to Digital Converter (ADC) you are using (as well as other factors such as the analog input bandwidth of the ADC). However there are some important aspects to understand when doing this that I will detail ...


10

about a decade ago i did this for an unnamed music synthesizer company who had R&D not too far from my condo in Waltham MA. (can't imagine who they are.) i don't have the coefficients. but try this: $$\begin{align} f(x) &\approx \sin\left(\tfrac{\pi}{2} x \right) \qquad \qquad \text{for }-1 \le x \le +1 \\ \\ &= \tfrac{\pi}{2} x (a_0 + ...


9

What is usually done is an approximation minimizing some norm of the error, often the $L_{\infty}$-norm (where the maximum error is minimized), or the $L_2$-norm (where the mean squared error is minimized). $L_{\infty}$-approximation is done by using the Remez exchange algorithm. I'm sure you can find some open source code implementing that algorithm. ...


7

What is described in the question is very near the Discrete Wavelet Transform (DWT) with the use of the Haar Wavelet. The DWT decomposes a signal into a sum of dilated and translated orthogonal functions that do not necessarily have to be trigonometric. The DWT does not transform a signal from the time domain to a frequency domain but to a scale space where ...


7

Start with an otherwise general, odd-symmetry 5th-order parameterized polynomial: $$\begin{align} f(x) &= a_0 x^1 + a_1 x^3 + a_2 x^5 \\ &= x\big( a_0 + a_1 x^2 + a_2 x^4 \big) \\ &= x\bigg( a_0 + x^2 \Big(a_1 + a_2 x^2\Big) \bigg) \\ \end{align}$$ Now we place some constraints on this function. Amplitude should be 1 at the peaks, ...


5

Consider a linear time-invariant system that maps a given signal to another signal space. If the system produces a scaled version of the input signal $\phi$, say $\lambda \phi$, then we can view $\lambda$ and $\phi$ as eigenvalue and eigenvector respectively ($λ$ gives us the gain or attenuation of the eigen-signal). Now suppose the impulse response of ...


5

If you sample at a higher sample rate, you need to analyze (e.g. feed to your CNN) a proportionately longer sample vector to get about the same frequency resolution (or other characteristics of any vibrations, etc.) Or if the input size of your CNN is limited, you can filter and downsample the data to the previous length (and thus lower sample rate) ...


5

Are you asking this for theoretical reasons or a practical application? Usually, when you have an expensive to compute function over a finite range the best answer is a set of lookup tables. One approach is to use best fit parabolas: n = floor( x * N + .5 ); d = x * N - n; i = n + N/2; y = L_0 + L_1[i] * d + L_2[i] * d * d; By finding the parabola at ...


4

The standard method to remove stationary noise is spectral subtraction, where the magnitudes of the short-time Fourier transform of the noisy signal are modified based on an SNR estimate in the respective frequency bin. The algorithm by Ephraim and Malah (see this paper) and its variants are used a lot. Note that the basic principle of spectral subtraction ...


4

What a weird typographical error. It's a minus. Get a working copy of the PDF from http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.44.87.


4

If your square wave has a mean of zero (this is important!), then a simple accumulator can do the job. Its operation is described by $$y[n]=x[n]+y[n-1]$$ where $x[n]$ is the input (square wave) and $y[n]$ is the output (triangular wave). This is a simple Matlab/Octave script showing how it works: sq = [1,-1,1,-1,1,-1,1,-1]'*ones(1,5); sq = sq'(:); ...


4

An FFT possesses linear features. Let us use a linear analogy. If one tells you that the sum of two numbers is $a+b=3$, what can you say about these numbers? Not much. More generally, $n$ linear equations on $m$ variables is underdetermined when $n<m$: you do not have enough information to retrieve the variables without more conditions. This can be ...


4

Looks like you need a general explanation of the discrete wavelet transform (DWT). DWT breaks a signal down into subbands distributed evenly in a logarithmic frequency scale, each subband sampled at a rate proportional to the frequencies in that band. The traditional Fourier transformation has no time domain resolution at all, or when done using many short ...


4

This is actually due to the characteristics of the actual signal, rather than noise. You might have heard of pink noise and its spectral characteristics $$S(f)\propto \frac{1}{f^\alpha}$$ Now forget about the term "noise" in here, and imagine a stochastic process whose spectral density vanishes following a $\frac{1}{f^\alpha}$ law, in which $\alpha$ is a ...


3

Assuming you used a 512 point rectangular window on your 2000 original points of data, you need to know something additional about the other 1488 points and how they are related or correlated to the 512 points that were analyzed by your 512 point FFT if you want to do any "mapping". Otherwise, those 1488 points could be completely independent and of any ...


3

DC, by definition, is the non-varying part of the signal. To find the DC component you simply average the entire signal. How can I extract the varying DC wave from the signal? This sounds more like you want to extract the low frequency part of the signal. The most basic filter for this is a moving average filter. However, I would recommend a smoother ...


3

You can take a look at Photosounder. The idea behind is simple: Take an image as if it were an spectrogram and compute its IFFT, the result is always interesting at least! It tends to work better with abstract images and geometric shapes, a great example is the video on the upper-right corner, "The sound of fractals". I would never try to replicate a real ...


3

You need to make sure that the phase of continuous. The easiest way would be something like this. x(n) = cos(phase); phase = phase + 2*pi*current_frequency*sample_time; current_frequency= update_frequency(n); n = n + 1; Note, that this is very inefficient code and only for illustrative purposes.


2

This is a wierd thing you are trying to do. What i the purpose behind this signal generation? What particular application needs this? I think of two ways, but maybe one is not correct. 1 - Generate Uniform White noise, and then filter it to your desired bandwith of interest. But that will surely affect the probability distribution of the amplitudes and ...


2

There is a sensor for each string which individually records the string vibration. This signal is converted to digital, analyzed for estimating its fundamental frequency and its amplitude (envelope detector). Whenever a sharp increase in amplitude is detected, a MIDI note on message is sent, at the detected frequency. Whenever the amplitude falls below a ...


2

Real strings don't have a perfect integer overtone series. Responsible for this is the stiffness of the string that gives higher frequencies (i.e. shorter wavelength) a greater force towards the equilibrium position and increases the frequency of the higher order modes. This small inharmonicity is responsible for the general shape of your cepstrum. Our ...


2

IIRC, Karplus-Strong is usually a single linear harmonic waveguide. Plucking a stringed instrument starts several things in vibration other that the string (sound board, air in cavity, etc.), many of them producing inharmonic overtones due to material stiffness, thickness and non-uniformity, some of which exchange energy and/of change in a non-linear ...


2

Easiest way is to scale energy of noise. Nevertheless you must understand that for some files it is not that simple. Let's say that you have the recording of crying baby in silence. What is then your point of reference? Are you going to add white noise based on ratio between it's energy and average energy across the whole recording (silence+baby)? Or maybe ...


2

First, note that the behaviour in which high-pitched notes disappear faster than low-pitched notes is found in many musical instruments. You might better not totally compensate for that. One way I got the behaviour I wanted out of Karplus-Strong was the following: I add an additional exponential decay for the lowest notes - a "loss" factor so that x[n] = ...


2

the main idea behind BLIT is that these analog synth waveforms that we are trying to generate digitally can be thought of as the integral (over $t$) of impulse trains. a sawtooth can be thought of as the integral of the sum of a little bit of DC and an impulse train. a square wave is the integral of impulses of alternating signs. the triangle wave is the ...


2

Does the above make any sense or where did I go wrong? Yes. Is this idea of separating excitation from filtering widely used in sound synthesis? (I believe there is some audio compression algorithm, which uses LPC) Yes it does. For decades it was the strongest approach for speech - and by extension singing voice - synthesis. As for musical applications,...


2

if you have MATLAB, check this out and see if you can hear a difference: % % sawtooth_phase.m % % a test to see if we can really hear phase changes % in the harmonics of a Nyquist limited sawtooth wave. % % (c) 2004 rbj@audioimagination.com % if ~exist('Fs') Fs = 44100 % sample rate, Hz end if ~exist('f0') f0 = 110.25 ...


2

Have you normalized the waveforms differently? The lowest point of the phase-shifted saw should be at amplitude -2 ln(2) / pi = -0.44 if the amplitude of the saw is normalized to -1 .. 1. The positive peak of the phase-shifted saw approaches infinity as you increase the bandwidth. So you could also have a clipping problem. Nonlinearities of the physical ...


2

Lookup tables are incredibly useful. In audio, when you're doing a chorus or flange effect, or a synthesizer with a modulating envelope, you want to be able to cycle through a sine wave in a lookup table and not just keep track of some infinitely growing index n. You'll want to use some mathematical program like MATLAB, Octave, or Mathematica to generate ...


2

The Fourier series of the square wave tells us that the input signal has harmonics at odd multiples of the fundamental frequency $f_1=349\,\text{Hz}$: $$f_k=kf_1,\,\text{$k$ odd}$$ with amplitudes $$A_k=\frac{4A}{k\pi}.$$ The triangular wave, on the other hand, has harmonics at the same frequencies, but their amplitudes are $$B_k=\frac{4A}{k^2\pi^2}.$$ In ...


Only top voted, non community-wiki answers of a minimum length are eligible