0
$\begingroup$

I want to create a real-time sampler for woodwind instruments.
Because it is possible to slide from one note to another without stopping the sound I decided to do it as a synthesizer. I want to analyze the sample in the frequency domain (time-domain sample as the sum of sinus waves). This part can be heavy to compute, so I will only take the parts of the sound that are necessary for the sound (e.g. basic note and overtones).

When I do an FFT on a signal for testing that was originally created by a sum of 3 sinus waves, sometimes I get a sharp peak on some frequencies with the correct amplitude. On other frequencies however I get a more distributed peak. The maximum is correct but too low. When I look into more Spectral points around that peak and sum up the amplitudes of these, the sum is more than it should be by the original sine wave.

Can anyone explain me, how I can look at a frequency-band in the discrete frequency domain and estimate the amplitude and phase of a sine signal in that band?

$\endgroup$
3
  • 1
    $\begingroup$ Google "spectral leakage" or look it up here in the forum $\endgroup$
    – Hilmar
    Oct 5, 2022 at 13:12
  • $\begingroup$ I never saw this post before. I realize it's a bit stale. Is what you want to do is extract or estimate the additive synthesis data which is the amplitude, phase, and frequency parameters for each partial (harmonic or overtone) in a sampled woodwind note? Maybe even a note that is transitioning to another note by sliding the pitch? $\endgroup$ Jul 3 at 4:52
  • $\begingroup$ Yes it's stale but I'm still open for suggestions. Yes to every of your questions. The more exactly the better $\endgroup$ Jul 4 at 6:43

1 Answer 1

0
$\begingroup$

The DFT/FFT can be used directly for estimating phase/magnitude of a waveform of harmonic series if it is applied synchronously. I.e. the FFT window is centered exactly at one period (or several) of the fundamental frequency.

In general, that is often hard to do. More so for an acoustic instrument where pitch may not be perfectly stable, and overtones may in some cases not be perfect multiples of the fundamental. There are excellent sources on sine parameter estimation and spectral estimation here and at the Julius Orion Smith website, and FFTs may be used with some extra effort (zero padding, windowing).

May I ask if you motivation is primarly the end result (synthesizing instrument sounds) or is this an exercise to gain insight? For simply making simple sounds with pitch bend, I would think that traditional looped samples with variable playback speed would be decent and very little effort

$\endgroup$
3
  • $\begingroup$ The motivation is indeed to synthesizing the instrument sound. Looped samples do not work in my case. I want to synthesize a bagpipe so i must make a transition from one sample to another without stopping the sound (either a fast or even a slow slide from one note to another) Also in between the notes I have some characteristics I want to catch $\endgroup$ Oct 5, 2022 at 11:42
  • $\begingroup$ For synthesis: use oscillators instead of an FFT. That's much easier, cheaper and more flexible. You can also apply a few formant filter to capture the acoustic/mechanical resonances of the instrument. $\endgroup$
    – Hilmar
    Oct 5, 2022 at 13:15
  • $\begingroup$ I want to use oscillators. What I'm trying to do is get the configuration of the oscillators from a sample. Is there a better way than analyzing the signal in the frequency domain? $\endgroup$ Oct 5, 2022 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.