On Monday 07 August 2017 01:49:06 Fred van Stappen wrote: > > There is a buffer of float filled by the input of a sound card, or/and by a > decoded audio file, or/and by a custom sine wave, etc... > > I would like to analyse that buffer (array of float = the samples). > > Can mse fft analyse other sources than from mse audio ? (huh, like for > example from uos...) > You can use a "tfft" from component palette tab "Math" which has no MSEsignal interface. An example is here: https://gitlab.com/mseide-msegui/mseuniverse/tree/master/samples/math/fft

## Advertising

> Concretely, how to analyze the array of float (the samples) to get the > frequencies that produce that array, what is the 1, 2, 3, 4 trick ? > What do you mean with "1, 2, 3, 4 trick"? FFT means "Fast Fourier Transform": https://en.wikipedia.org/wiki/Fast_Fourier_transform an efficient special case of DFT: https://en.wikipedia.org/wiki/Discrete_Fourier_transform which is a sampled form of the continuous Fourier-transform: https://en.wikipedia.org/wiki/Fourier_transform > Let's begin with something simple: a unique sine wave of 440 htz produced > by a math function. > > If a array[0..1023] of float was filled, with samplerate 44100, by a > sine-wave of 440 htz, if you do not know the freq of the sine wave (only > the sample rate), how a fft can retreive the frequency of the signal ? How > many array[0..1023] of float are needed to give a good result ? > > And to continue with something more complicated, if the buffer was filled > by the input of a sound card (mic or aux, here a string of guitar), how to > get/note the main frequency (for tuning if needed) ? > > I would like, for each guitar string, design the "ideal" sine wave (440 htz > for la) in green, and design the live-sine wave of the guitar in red. > While tuning the string, when both green and red waves are equal, then it > is tuned. But a [ +/- the note ] like classic tuners do is good too. > I don't know if it is possible to do precision tuning measurement with FFT. I fear not. > And a spectrum/peak 16 bands for audio files/input mic would be very > welcome too. I can do it with uos but I am courious how you propose to do > it with mse-fft (and how fast it is). > The fft component of MSEgui uses the FFTW library as backend: http://www.fftw.org/ For realtime applications probably there are better solutions. For an audio spectrum display a filterbank probably is better suited because an FFT has a linear frequency scale and for audio one needs a logarithmic scale. > OK, back to mse noisegen demo. > What is scrollbar "crest" ? It is visible in white noise mode. With crest factor 1 the sample values are in range -1..1, crest 2 -> -2..2 and so on. > What king of average is done with checkbox "average" ? > It averages the spectrum values in order to show the "db/octave" characteristic of the noise. Martin ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk