Sharpness of the spectrum

Where does it come from that the sharpness of the display decreases when you increase the FFT size? I always thought that the higher the FFT size, the finer the displayable gradations should be.

I just fiddled with FFT size and didnā€™t notice any difference in display sharpness after I raised the FFT value.

FFT is a strange thing. powerfull, certainly. very powerfull. but in ā€˜codeā€™, math, and i am not an expert, i ask developers, how things work, they replyā€¦ and read about itā€¦

FFT window size, it is also explained in the manual, because it is very important (and underlying for each sample there are 4 FFT blocks, or something like that, that overlap, so a lot of info, that represents the audio, and all must be interpreted for the situation, or use);

a bigger window size; as it stated in the manual how more frequence resolution you get, but you will loose time resolution, in the manual it stated -i repeat-, tonal parts are presented better, but transients less.

a smaller window size, better representation of transients (time), lesser representation/resolution for tonal (frequency).

this trade off is inherent to FFT. only experts or very acadamic theorists, perhaps, can solve this. or not.

you must see a different ā€˜sharpness of displayā€™, with each FFT window size, i.e. the size of how many samples FFT uses.

therefore SpectraLayers has Resolution and Refinement. to increase ā€˜sharpnessā€™, again it is a representation, and it depends on your needs and goals, how set these settings.
resolution, if i am right, introduces some ā€˜artefactsā€™, or was it refinement.

i am not very clear, i know. i try to write this, with all i understand, without consulting the docā€™s i have. or infoā€¦

but the bottom line: increasing FFT window size does increase resolution, or sharpness, for tonal/frrequency parts, but it does not look sharpā€¦, and decreasing, decreases resolution for tonal but increases resolution for time/transients.

it is more a ā€˜resolutionā€™ thing, than about sharpness.

resolution, well perhaps @Robin_Lobel can explain it better than me.

some inside of the working of FFT, even if donā€™t understand it all, what is under the hood, helps me to work better with for instance SpectraLayers.

but as stated, in the manual, the info is perhaps enough, to get what you are seeing.

i repeat FFT is very powerfull, i like to read about it, but it is d*mned complicated, even if the basics are understandable, what is going on under the hood, for instance you can choose the ā€˜envelopeā€™ for each bin, in SpectraLayers, blackmann-harris, etc. that also has influence how a shape looks like, and those envelopes, overlap, and you have 4 overlapping FFT thingiesā€¦ and now i am lostā€¦

so basically spectral or FFT (spectral can be done without FFT, there are other ways, but give other results;) it is always a representation, with trade offs.

for instance Serum (donā€™t own it, i have another wavetable synth that suits me, or moreā€¦), to name the most known one, or Vital, also known.
it is known it uses 2048 samples for each single-cycle slot, and has max of 256 slots for a wavetable.
(it can get higher, amount of samples, butā€¦ o well).
if you look at the wavetable editior, you will see half of them, or better 1024 binā€™s, with amplitude, frequency (itā€™s placeā€¦) and phase, a bin is a partial (simply said) and a partial is a sine wave.

FFT breaks down every sound to sine wavesā€¦

and yes you see 2048 samples, which means that you can have a octave range ofā€¦ i donā€™t know out of my head, but in the editor 1024 binā€™s. so there it starts. and what is under the hood, is more complex.

i hope someone can explain it better, because if you know it more inside out, you donā€™t have to remember it all, to reproduce it. you see that i reproduce it quite badlyā€¦
but it gives you more control over what you are doing. in the end. i notice myself.

i shall quote a developer for Voltage Modular, Nekomatic;

" Larger windows ā†’ more resolution in frequency domain but harder to compute so less samples taken time. smaller windows ā†’ worse frequency domain resolution but less to compute so samples can be taken more often

in practice every sample belongs to at least two separate FFT analysis

FFT is usually computed in 50% overlapping blocks, for re-synthesis more likely 75% overlap so each sample belongs to four FFT blocks

by increasing window size w can compute FFT less often so on average the the same amount of computation is necessary"

you see, it is quite a domain. with trade offs, for real time, less for offline, like SpectraLayers, but still FFT is an interpretation, a quite good one, and it can do a lot, but it has limits, limits that you can break through, by using another ā€˜envelopeā€™, strangely it is really called a 'window , FFT size, resolution and refinement. but at some cost, also resolution is a trade off, and refinement?

TL;DR

sorry if my answer is blurredā€¦ i am trying to understand it allā€¦ not to make my own FFT code, but to understand what is going on, what can you do with it.

1 Like

@Humm I suggest you read this chapter of the doc about The Importance of FFT Size.

1 Like

Thank you for the detailed explanations.
I had not been aware of the difference between tonal and transient resolution until now.
I think I have understood it now. Thanks also for the link to the Steinberg explanation. The explanations are in English, but I still understood them to a large extent.

from curtis roadā€™s microsounds:

ā€œAs a preparation for spectrum analysis, the STFT imposes a window upon theinput signal. A window is nothing more than a simple amplitude envelope. Windowing breaks the input signal into a series of segments that are shaped inamplitude by the chosen window function and bounded in time according tothe length of the window function. In audio applications, the duration of thewindow is usually in the range of 1 ms to 100 ms, the window envelope is bell-shaped, and the segments usually overlap. By analyzing the spectrum of eachwindowed segment separately, one obtains a sequence of measurements thatconstitute a time-varying spectrum.ā€ (page 246)

in one thread about pitch shifting vocals;

you also use a resolution setting, is the resolution setting more overlapping segments/windows??
it seems the resolution setting also effects the result??? not mentioned in the manual.

i try to understand it, i can follow what curtis road writes. but to reproduce by heart, i can not.

i think it perhaps important to know more what is under the hood, for a better understanding of what one can do in SpectraLayers, and how to inteprete.

curtis road goes further, with Phase Vocoders, and ends (not really) with Metasynth. a quite different approach or not?

drawing a harmonic, with 5 harmonics on topā€¦ welā€¦ o well not to the point at this momentā€¦

the FFT size; a FFT size of 4096 (for example) means N/2 binā€™s, N is the sample rate, only half of the samples is used, because of Nyquist. so for a FFT size of 4096, 2048 binā€™s are used, with amplitude, frequence and start phase (of the sine). the others are ignored.

curtis road also states that a higher sample rate, does not increase frequency resolution, which now i write, is completely understandable, for me now, tomorrow not.

i am an enthuastic student, and when i know more about how something works under the hood, and even if i understand weakly, or justā€¦ i can incorporate it, and master a program or synth better.

(i found this in microsounds, because of my great interest in granular, and i have a great interest in spectral, there is a chapter about it, i didnā€™t notice it before, because, this book, was out of my league, but i can read it now, still above my paygrade, but more accessible. perhaps i dive to deep, and just must do things. but i do! but deep diving, gives me also results, better resultsā€¦
so maybe not the best book about STFT/FFT/PV etc. or maybe it is a good intro for itā€¦)

o yes, from the quote above:

" A window is nothing more than a simple amplitude envelope.",

the blackman-harris, hanning, etc. options. indeed changes a spectrogram, more visible i feel in a spectroscope, you see different results. but i donā€™t really have worked with different ā€˜windowsā€™, because they are sometimes also called windows. all those therms, or jargonā€¦

the amplitude shape can give different results. visually but also audible??

i hope i more clear nowā€¦

1 Like

This National Instruments article could be useful - Understanding FFTs and Windowing

The language is clear as are the graphics. Thereā€™s a section (p11) that matches window function with various frequency content characteristics.

3 Likes

thanks! great info about windows, and their effects/resultsā€¦ and uses!

Raymondo, this National Instrumentsā€™ article you shared is superb. A great find.
Havenā€™t finished it, but had to come to show my gratitude.

A must read for those like Howl here with whom I share the need to understand better what the tool one uses, does. In his words; ā€œwhen i know more about how something works under the hood, and even if i understand weakly, or justā€¦ i can incorporate it, and master a program or synth better.ā€

It looks like now I understand the process at a level that memorizing is not needed. Particularly in its depiction of ā€œwindowingā€; why is there and how is implemented/*1 and its effects. Now there is a more coherent framework where to relate our practical usage cases.

*1/ Rather funny that the same fade in-fade out method is still being utilized to rapidly work with fractured waves. That has been my exact solution at many practical cases from the early years using SoundForgeā€¦ and even today!
One would expect that a more ā€œintelligentā€ process, even a variable rate one, would look for better wavesā€™ fit, so to avoid out of zero crossings, despite the fact that it would need to keep track of the time alignment/position while doing that.
For sure there already exist better ways to do windowing in waveform analysis (DFT/FFT), one guesses.

2 Likes

i thought i had posted the question here:

FFT size, explained
Windowing, explained

but the Resolution, not;

is the Resolution, the number of overlapping windows? (FFT windows)

@Howl correct, thatā€™s related to overlapping - both in time, and frequency.
FYI a Resolution of x1 correspond to time overlap x4 (75% of overlapping between consecutive windows), and no overlap in frequency (meaning a FFT Size of 4096 corresponds to 2048 frequency pixels).
A Resolution of x2 (default) correspond to time overlap x8 (87.5% of overlapping between consecutive windows), and x2 overlap in frequency (meaning a FFT Size of 4096 corresponds to 4096 frequency pixels).

I should probably add such infos to the doc !

2 Likes

indeed this is usefull info! i remembered this thread, and perhaps in another thread, or in these long posts, i asked what was the resolution. now it hit me. strange, because i already knew this, maybe because, i read about STFT, and again some article or someting.

well thanks for the info!

as i already 12 months before said, knowing more things from under the hood, also technically helps me, to create sounds. perhaps it is me, i am mathematical zero, but stillā€¦ it can incorporate it.

and in SpectraLayers indeed depends on whole the FFT advantages, and ā€˜problemsā€™, thatā€™s why you also have many type of windows.

you also can choose the type of windows; i read an article, is it above? that a window, the envelope also as an ā€˜effectā€™.

o yes, i believe that your answer about Resolution, also means it has an effect on results (or some, like FFT size, procceses as explained in the manual).

o well, i see, in a post, i already asked indeed is Resulution more overlapping segments/windowsā€¦
it hit me twice, or better. well, my memory! ha!

so final questions;

  1. resolution will have an effect, of course. when?
  2. type of window will have an effect, but which, how, and if; when?

and yes, info for the manual. working with SpectraLayers does need this kind of info, my viewā€¦

FFT size, a small one, for example, i already use, when necessary. Resolution, i had again forgotten about itā€¦

EDIT: indeed it is % of overlap, resolution, forā€¦ i must know it, but better left to the proā€™s!

EDIT 2: my workflow in SpectraLayers has improved well, more fun and experimentation! mainly i do sounddesign, unmix levels is greatā€¦ for my own samples, as alwaysā€¦ or recordingsā€¦

i make to long posts;

how does affect the Resolution the processes, which and how. or does it? it mustā€¦

and also; the type of window?

The resolution can give a slight boost of precision to processes and tools, but itā€™s marginal if your Resolution is already x2. Only boost it to x4 for difficult cases.

The Window Type has an influence on the dynamic range of the spectral analysis, it is a compromise between high dynamic range and high frequency precision. However I would recommend to keep it to Blackman Harris unless you really know what youā€™re doing here. Iā€™m sorry that explanation is not very clear, but Iā€™ll try to come up with something better for the manual, possibly with images to illustrate !

Processes affected or not affected by all these spectral parameters are listed here: The Importance of FFT Size

1 Like

thanks for the clear answer, about Resolution!

windowing is indeed quite complex, i read about it, but for the spectral domain i havenā€™t really used it, to learn it better. EDIT: and i had forgotten what kind of influences it hadā€¦ you explain it well in one sentence!

but this kind of info about FFT, Resolution (overlapping), windowing would be great if would explained more clear Ć”nd deeper in the manual, because these are -well- how make SpectraLayers work, of courseā€¦

under the hood information, indeed with imagesā€¦ will give more insight, and more control over the results.

so i hope you can make a section about it, that explains all, and the relationships.

thanks!