Fundamental Frequency Detection
Compute the fundamental frequency of a recording.
In[1]:=
a = ExampleData[{"Audio", "PianoScale"}, "Audio"]
In[2]:=
f0 = AudioLocalMeasurements[a, "FundamentalFrequency"];
ListLinePlot[f0, ImageSize -> Medium]
Out[2]=
Use the result as a ColorFunction for AudioPlot.
In[3]:=
f0 = Rescale[TimeSeries[DeleteMissing[f0 // Normal, 1, 2]]]; Quiet@
AudioPlot[a,
ColorFunction -> Function[{x, y}, ColorData["SolarColors"][f0[x]]],
ImageSize -> Medium]
Out[3]=