To determine the richness of a sound, I would like to determine the number of harmonics in a sample of music. For that, I'm using Processing with the Minim library which gives me a full spectrum with a FFT. I'm wondering how to count all the peaks in the spectrum produced by the FFT, I'm not even interested in the fundamental frequency.
Harmonics count in a music sample
389 Views Asked by LaurentC At
1
There are 1 best solutions below
Related Questions in AUDIO
- Play multiple audio files in a slider
- Unity3d AudioSource not creatable
- JavaFX can't play mp3 files
- iPhone simultaneous sound output
- Phonegap Build App - Play Audio
- HTML5 Audio pause not working
- Java boolean play button issue (play over and over again with each click)
- import a sound externally or from the library? AS3
- Set audio source
- Saving a sound bite as a ringtone
- Using OnAudioFilterRead with playOnAwake
- Audio recorded with Samsung does not play on iOS
- fftw of 16bit Audio :: peak appearing wrong at 2f
- How to Export an audio file with effect in iOS
- Tried multiple solutions onsite, none worked: Play <audio> on Konami code
Related Questions in SIGNAL-PROCESSING
- Calculate energy for each frequency band around frequency F of interest in Python
- convert sound to list of phonemes in python
- Why is there a difference in magnitude response between scipy.filtfilt and scipy.lfilter?
- Image 2x downsampling with Lanczos filter
- Simple Python Median Filter for time series
- FFT Fundamental frequency calculation from LomontFFT
- Daubechies orthogonal wavelet in python
- fftw slight peak inaccuracy/drifting
- Zoom in on np.fft2 result
- How can I find process noise and measurement noise in a Kalman filter if I have a set of RSSI readings?
- Giving large no of samples to KissFFT
- FFT coefficients using python
- SignalGenerator class at naudio library - duration time play
- Extract binary data stream from audio signal
- FFT: find and cut noisy 50Hz in signal
Related Questions in PROCESSING
- Processing Live Coding. Emulating Ruby Processing watch with Sublime Text build system
- .jpg out of .cgi with java (IP Webcam)
- How to print an ArrayList in processing and how to update the background
- Mouse press event called twice
- Processing in Java Serial object Null Pointer Exception
- How to acces previous element in an ArrayList using "this"
- How to adjust the position of an .OBJ model in processing(python)
- Processing - Shutdown a computer
- Java Atan2() Sort violates general contract?
- Disable close button in Processing
- Processing sketch not working on web
- analyze the subtracted histogram of two images using matlab to find the difference at each point in amplitude
- Instantiating a SoundFile object within a class in Processing
- Creating an object's movement based on velocity in processing.js
- camera-projector calibration for processing
Related Questions in SPECTRUM
- Use "lines" command with a vector of objects in R
- IFFT Synthesis from an empty spectrum
- android changing color of image from left to right smoothly
- Signal Spectrum MATLAB Syntax
- jQuery Colorpicker add multiple color pallettes in one div
- SpectrumJS, dragger and slider position issue with display: none container
- Waterfall diagram color calculation
- Access to audio buffer in MediaPlayer
- Matlab power spectrum density(PSD) implement equation
- obtain the low pass signal and its magnitude spectrum also to plot the inphase and quadrature components of x(t) and the envelope of x(t)[MATLAB]
- MATLAB script to determine the frequency that has the greatest power
- Spectrum Analysis of 1D Signal (FFT etc.)
- Converting NMR ascii file to peak list
- Matlab HRV frequency domain analysis using pburg and pwelch function
- Firefox unaccesible spectrum cause sound object crash
Related Questions in MINIM
- How can I access the audio output coming from a movie playing in processing?
- Create a self updating string based on files in a folder in Processing
- processing Minim: remove signal when it's amplitude is 0
- Songs not shuffling for button - Processing
- Audio Loop Processing.org (Java/Minim sound Library)
- Processing minim null pointer
- Processing - Overwrite audio
- How can I use Minim in Processing for computing FFT of UDP-streamed samples?
- Don't understand isRange(int low, int high, int threshold) of Minim Library
- Harmonics count in a music sample
- Processing Minim Library execution of Jar file
- Usage of Minim library causing OutOfMemoryError
- How does one produce Double Speed sound...programmatically?
- Using serial information from arduino to play audio in Processing
- Inconsistent Access to JavaSound SourceDataLine Through Minim
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There are many ways of accomplishing this depending on your needs.
If you want to count every peak then you should iterate through all the frequencies in the spectrum remembering whether intensity has been increasing or decreasing. Every time you notice the change in direction from increase to decrease you increment the peak counter. Note however that this will include very faint peaks as well which may or may not be what you need. You can put a minimum limit on how much of an increase and decrease has to happen for a peak to be registered.
Alternatively, you can find a baseline for your signal's intensity (using average in the simplest case) and then count the number of positive outliers (with some configurable minimum deviation from the baseline). You probably will get better results if you modify this approach to use frequency-dependent baseline and minimum to account for gradual drop in intensity at higher frequencies (again, it depends on your particular signal and needs whether this would be useful). One simple way of doing this is to divide your spectrum into bands (small enough to be able to assume more or less flat energy distribution throughout each band) and use different baseline and minimum for each band.