<div dir="ltr">Hi Joćo,<div><br></div><div>A measure that would give something near 1.0 for white noise and near 0 for a sine wave would be &quot;spectral flatness&quot;, which is in the timbreID library. But if you&#39;re looking to see how well a spectrum&#39;s partials line up harmonically, you won&#39;t find that in timbreID yet. One quick option would be to use sigmund~ to get the current pitch, then search the spectrum for the amount of energy in bin ranges related to the expected set of harmonics. Compare that with energy in non-harmonic bins. But then, for things like gongs that sound &quot;pitchy&quot; but have inharmonic spectra, that won&#39;t be much help. Depends a lot on what you&#39;re trying to do.</div>
<div><br></div><div>You *might* find specSpread~ useful, which measures how widely or tightly energy is concentrated around the spectrum&#39;s center of gravity. It&#39;s in units of Hz though.</div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Jan 2, 2014 at 12:38 PM, Joćo Pais <span dir="ltr">&lt;<a href="mailto:jmmmpais@googlemail.com" target="_blank">jmmmpais@googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I wanted to ask if there are any suggestions for spectral &quot;weight&quot; analysis.<br>
With &quot;weight&quot; I mean a factor which would measure the harmonicity of a sound - e.g. white noise being 1, and a sinus/silence 0. Surely it exists a propper word for this already, but I don&#39;t know one.<br>
<br>
Is there any external or patch around that does something similar?<br>
<br>
Thanks,<br>
<br>
jmmmp<br>
<br>
______________________________<u></u>_________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>William Brent<br><a href="http://www.williambrent.com">www.williambrent.com</a><br><br>“Great minds flock together”<br>Conflations: conversational idiom for the 21st century<br>
<br><a href="http://www.conflations.com">www.conflations.com</a>
</div>