Creating wind instrument breath noise samples via FFT

I'd like to synthesize short samples (1 to 4 seconds) of specially filtered noise. I'll then use them in a wavetable-based Reaktor ensemble to mimic breath noise.
Such noise is basically a comb filter with peaks at the note frequency and its harmonics. But the peaks of the harmonics and the valleys between them are quite varied. I'd rather play a sample than build a complex set of filters.
I have lists, expressed in amplitudes or decibels, for the peaks and valleys. I'm familiar with Python and believe I can use it, and its FFT libraries, to create the samples. But I'm not familiar with the FFT methodologies themselves. At all.
So, I'm looking for some (hopefully) simple concepts to help me proceed. Here's a short sample of a Python program that creates white noise and then filters it using a Python FFT library.
import numpy as np
from scipy.fft import fft, ifft, fftfreq
sample_rate = 44100
duration = 4
signal = np.random.normal(0, 1, sample_rate * duration)
signal = signal / np.max(np.abs(signal))
signal_fft = fft(signal)
frequencies = fftfreq(len(signal), 1/sample_rate)
filter_response = np.ones_like(signal_fft)
filter_response[(frequencies > 60) & (frequencies < 100)] = 0.5
filter_response[(frequencies > 100) & (frequencies < 150)] = 0.2
filtered_signal_fft = signal_fft * filter_response
# Inverse FFT to get the filtered signalfiltered_signal = ifft(filtered_signal_fft)
I need to understand what's going on at the "Design a piecewise linear filter" section. I see frequencies and amplitudes, but how do I translate the ones I have to the ones being used in the code?
Comments
-
🤔Hmm, this looks more like a stairstep curve, f=1..60 →1, 61..99 → 0.5 and 101..149 → 0.2, 150.. →1 again
But I have no Python experience, so maybe I am missing something
For a piecewise linear response I would use something of the form a=a0+(f-f0)/(f1-f0)*(a1-a0) for each piece (with f0,f1 outer frequencies, a0,a1 target amplitudes)
1 -
Thanks for your help. But I don't understand your last paragraph. I think I need to read up and understand more about what FFTs actually are.
0 -
Oh sry, the last paragraph is not really well formulated, it is only supposed to be a formula for a linear function through two points, for a single piece so to speak - it is not FFT related
0 -
i have done something kind of like this with the sitar model i attempted making
basically it amounted to standard white noise (a la from the core library macro) filtered through an fft filter
this is sort of a vague answer but i am more than happy to pull it out from the relevant ensembles if you think it might suit your purposes0 -
Or you can try a dynamic noise band modulation of the pitch. It is in real time, and you can play with the velocity and time for the width of the noise band.
Because this is noise band around the partials/harmonics that you should have in reality. It looks like a noise in a comb filter .
I got a breath noise like sound on the attack of a wind instrument, i an experimentation . It was remember me a little me playing in a real bugle with the breath.
0 -
Hello, are you saying that you modulate the pitch with comb-filtered noise? I've never tried that.
0
Categories
- All Categories
- 18 Welcome
- 1.6K Hangout
- 66 NI News
- 864 Tech Talks
- 4.4K Native Access
- 17.2K Komplete
- 2.1K Komplete General
- 4.7K Komplete Kontrol
- 6.1K Kontakt
- 1.1K Reaktor
- 399 Battery 4
- 896 Guitar Rig & FX
- 457 Massive X & Synths
- 1.4K Other Software & Hardware
- 6.2K Maschine
- 7.9K Traktor
- 7.9K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators