# Tag Info

2

I'd consider why you really want to do this - I personally can't think of a reason why I'd want to downsample to a specific sample number but I don't know your project Floating an alternate idea, you could downsample until you're near around that level of decimation and then truncate? It won't be 100 samples exactly but it might be easier in the long run to ...

2

In practice, this does not matter much. All serious work normalizes audio levels. In our code base, there's even some code that runs a nightly check to verify our algorithms are gain-independent. We recognize that the external format is typically 16 bits, but this does not need to match the internal formats used in transforms. Internally, extra precision ...

2

The semantics for a sampled audio signal is very simple. Each sample represents an amplitude, each sample is done at a specific time. If you create a signal using a microphone, the amplitude is related to the pressure as measured by the microphone diaphragm. The sampling process will introduce time in the equation. In the question, there are two sets of ...

2

I don't know much about this semantics? of WAV files but their numerical format is the following. (assuming mono) Given a recording with 8-bit per sample precision, then those samples are unsigned integers taking values between $0$ and $255$. Due to being unsigned, to represent negative values, there is a bias of $128$, and the sample values are actually ...

1

As a simple example, consider the discrete-time signal $$x[n]=a^nu[n],\qquad |a|<1\tag{1}$$ where $u[n]$ is the unit step function. The discrete-time Fourier transform (DTFT) of $x[n]$ is given by $$X(e^{j\omega})=\frac{1}{1-ae^{-j\omega t}}\tag{2}$$ Note that $\omega$ is a normalized angular frequency: $$\omega=2\pi f/f_s\tag{3}$$ where $f_s$ is ...

1

Zero pad your FFT (append zeros) such that you get more samples of the Discrete Time Fourier Transform (DTFT). The DTFT would give you the sidelobes and roll-off that you want to see (specifically for your diagram you would zero pad an input that is all ones, or an input that is any constant value).

1

A high pass filter (ideally) only lets through the higher frequencies. The low frequencies are what determine the local average of the signal. A high pass filter will remove those and set the local average to $0$.

1

The correct answer to this question has been provided by: Stanley Pawlukiewicz but has since been removed. Your filter attenuates the high frequencies of the total timeseries, signal and noise. Your results are expected. You really can’t perfectly remove just the noise. When the noise and signal overlap in time and frequency, you have to ...

1

Big thanks to @user753642 for spotting my mistakes over on the stackoverflow network: I was computing the $c_n$ coefficients from $n=0 \dots m$, where m is the number of wave functions in the sum. But by definitions the coefficients look like: c_m = \frac{1}{2L}\sum_{n = -\infty}^{\infty}c_n\delta_{n,m}\int_{-L}^Ldx = \frac{1}{2L}\int_{-L}^L f(x) \exp(\...

1

First, all of these routines act on an input array. Your comment "values beyond the boundary of the signal are NOT zeros" implies that you want to process a continuous signal, or at least one that is longer than a single call and array. If you want to use these routines, you’ll need some buffer management of your signal. Second, for converting 611 to 100, ...

1

What you see as a spike at the beginning of the filter output is the impulse response of the bandpass filter itself. This would happen as a transient effect and it will be more pronounced if the filtered signal is sinusoidal + dc in nature. If it were a pure zero mean noise than the spike would be somewhat obscured. You can either use a group delay shift ...

1

filtfilt() is a technique to achieve zero-phase filtering by applying the same filter twice to the data; with the output of the first stage reversed and filtered again in the second stage. Zero phase filtering is a desired property in image processing. NaN means "not a number" and indicates those indeterminate conditions like $0/0$, $\infty/\infty$, \$\infty ...

1

What I resorted to was using the pypi package, which is advertised here: http://www.cs.tut.fi/~foi/GCF-BM3D/index.html#ref_software . I digged a bit in the source code, and found that I could perform BM3D, in the following fashion: import bm3d denoised_image = bm3d.bm3d(image_noisy + 0.5, sigma_psd=30/255, stage_arg=bm3d.BM3DStages.HARD_THRESHOLDING) I ...

1

For this specific waveform as described, the following would demodulate the signal from the Frequency Shift Modulated Input into a square wave output: This works given the duration of the "0" symbol is 12 samples by using a "delay and multiply" frequency discriminator. The multiply will have a strong double frequency component that needs to be filtered out (...

1

What is the shape of your data? It's probably empty. Try print(data.shape) if it's a Numpy array. Another remark, lfilter interprets the b and a as the coefficients of a discrete-time transfer function, so you cannot use it with your analog Butterworth filter coefficients. You only need to worry about the axis parameter if your input data is ...

1

The answer is that it depends. The wave file format is a RIFF file which is broken up into chunks. One chunk, "fmt ", is the format chunk describing the format. Within that chunk, the 16-bit word at index 8 within that chunk specifies the format. The only one that I know of that is defined is 1, which is a Linear PCM format. In this mode, specifies the ...

1

librosa does one thing, scipy does another Actually you are only using scipy.io.wavfile to read in the int16 values. The difference in results comes from the next step y.astype(float32) where y is a NumPy array, a general purpose numeric container, unaware of the fact that audio data is conventionally in the [-1,1] range in floating point format.

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