<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?action=history&amp;feed=atom&amp;title=Programmer_Guide%2FSPU_Reference%2FF0HGRID</id>
	<title>Programmer Guide/SPU Reference/F0HGRID - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?action=history&amp;feed=atom&amp;title=Programmer_Guide%2FSPU_Reference%2FF0HGRID"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/F0HGRID&amp;action=history"/>
	<updated>2026-05-06T09:10:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/F0HGRID&amp;diff=4430&amp;oldid=prev</id>
		<title>Toni: moved Programmer Guide/SPU Reference/F0HGRID - f0 extraction with harmonic grid to Programmer Guide/SPU Reference/F0HGRID</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/F0HGRID&amp;diff=4430&amp;oldid=prev"/>
		<updated>2011-04-28T09:58:39Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/stx/docs/wiki/index.php/Programmer_Guide/SPU_Reference/F0HGRID_-_f0_extraction_with_harmonic_grid&quot; class=&quot;mw-redirect&quot; title=&quot;Programmer Guide/SPU Reference/F0HGRID - f0 extraction with harmonic grid&quot;&gt;Programmer Guide/SPU Reference/F0HGRID - f0 extraction with harmonic grid&lt;/a&gt; to &lt;a href=&quot;/stx/docs/wiki/index.php/Programmer_Guide/SPU_Reference/F0HGRID&quot; title=&quot;Programmer Guide/SPU Reference/F0HGRID&quot;&gt;Programmer Guide/SPU Reference/F0HGRID&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:58, 28 April 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/F0HGRID&amp;diff=1796&amp;oldid=prev</id>
		<title>Admin: 1 revision:&amp;#32;Initial import</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/F0HGRID&amp;diff=1796&amp;oldid=prev"/>
		<updated>2010-11-18T16:31:53Z</updated>

		<summary type="html">&lt;p&gt;1 revision: Initial import&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:31, 18 November 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/F0HGRID&amp;diff=1795&amp;oldid=prev</id>
		<title>193.171.195.8: initial import</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/F0HGRID&amp;diff=1795&amp;oldid=prev"/>
		<updated>2010-05-17T13:05:27Z</updated>

		<summary type="html">&lt;p&gt;initial import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
====F0HGRID - f0 extraction with harmonic grid====&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;F0HGRID &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;A&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;M&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;DF&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;FMIN&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;FMAX&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;TABLE&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;COL&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;WIN&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;FFT&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;F0&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Inputs:=====&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|F&lt;br /&gt;
|component frequencies in Hz&lt;br /&gt;
|-&lt;br /&gt;
|A&lt;br /&gt;
|component amplitudes in dB&lt;br /&gt;
|-&lt;br /&gt;
|M&lt;br /&gt;
|number of valid components&lt;br /&gt;
|-&lt;br /&gt;
|DF&lt;br /&gt;
|frequency resolution in Hz&lt;br /&gt;
|-&lt;br /&gt;
|FMIN&lt;br /&gt;
|minimum f0&lt;br /&gt;
|-&lt;br /&gt;
|FMAX&lt;br /&gt;
|maximum f0&lt;br /&gt;
|-&lt;br /&gt;
|N&lt;br /&gt;
|minimum number of matching components&lt;br /&gt;
|-&lt;br /&gt;
|TABLE&lt;br /&gt;
|name of output shell&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;table&lt;br /&gt;
|-&lt;br /&gt;
|COL&lt;br /&gt;
|index of table column&lt;br /&gt;
|-&lt;br /&gt;
|WIN&lt;br /&gt;
|length of window (only used for RMSh)&lt;br /&gt;
|-&lt;br /&gt;
|FFT&lt;br /&gt;
|FFT length (only used for RMSh)&lt;br /&gt;
|-&lt;br /&gt;
|F0&lt;br /&gt;
|f0 value in Hz or 0 if no f0 was found&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=====Outputs:=====&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;RMSH&amp;lt;/var&amp;gt;&lt;br /&gt;
|harmonic part energy&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=====Function:=====&lt;br /&gt;
&lt;br /&gt;
This method uses a harmonic grid to find/extract the best matching fundamental frequency (f0) for the spectral components (peaks: fi/ai) defined by F (f1..fM) and A (a1..aM). The parameters DF, FMIN, FMAX and N are used to control the matching algorithm and can be changed in each evaluation interval. The input M is the number of components stored in the inputs F and A (0 &amp;lt;= M &amp;lt;= length of vectors F/A).&lt;br /&gt;
&lt;br /&gt;
First the test&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;frequencies for the f0-test T = &amp;lt;t0..tK&amp;gt; are selected. The set of test-frequencies consists of the following values:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*the f0-value extracted in the last cycle (if F0&amp;gt;0)&lt;br /&gt;
&lt;br /&gt;
*all component frequencies in the range FMIN&amp;lt;fi &amp;lt;FMAX&lt;br /&gt;
&lt;br /&gt;
*all difference frequencies di,j=fj-fi (with j &amp;gt; i) in the range FMIN&amp;lt;di,j &amp;lt;FMAX&lt;br /&gt;
&lt;br /&gt;
For all values of the test-frequency set the component frequencies are searched for harmonics. A component fi is a harmonic of tj if the following conditions are true:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*the order o = [fi/tj + ½] is greater than 1&lt;br /&gt;
&lt;br /&gt;
*(fi – DF) / (tj + DF/o) &amp;lt;= o &amp;lt;= (fi + DF) / (tj – DF/o)&lt;br /&gt;
&lt;br /&gt;
For all tj with at least N harmonic components, an f0-candidate is added to the set of candidates. A candidate is defined by the following values:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*the number of harmonic components cn&lt;br /&gt;
&lt;br /&gt;
*the average fundamental frequency cf = (fx + fy + ...) / (ox + oy + ...); f and o are the frequency and order of the harmonic components&lt;br /&gt;
&lt;br /&gt;
*the harmonic error term ce = |cf/tj – 1|&lt;br /&gt;
&lt;br /&gt;
In the last step the best f0 candidate is selected from the set of candidates and stored in the output F0. In the current implementation the best candidate has the highest number of components cn and the minimum error (if more than 1 candidate with max(cn) exists). If no candidate was selected in the first three steps, the output F0 is set to zero.&lt;br /&gt;
&lt;br /&gt;
If the inputs TABLE and COL are connected, all values stored in the F0 output are also stored in the column COL of the table starting at entry 0.&lt;br /&gt;
&lt;br /&gt;
Note: This algorithm works but is still under development. Plans for multiple f0-detection (complex tone analysis) and f0 tracking (over time) are under consideration.&lt;br /&gt;
&lt;br /&gt;
If WIN and FFT are connected, the RMS-value for the harmonic parts, RMSh, is calculated. In this case another column of the table is used.&lt;/div&gt;</summary>
		<author><name>193.171.195.8</name></author>
	</entry>
</feed>