search for frequencies and volume levels in WAV
I have recorder wild life overnight, and trying to filter out 14 hours audio without listening whole footage.
I am working on ReaScript, but I am guessing it may be already inside the Reaper.
Any suggestions, please?
Best solution would be script that loops through item/track, and finds certain volume levels, and frequencies.
Let's say I know noise is at -60, and I wish to seek anything above say -40.
Even better would be a capability to set certain frequency range - now is reindeer season, and they are somewhere around 100-800Hz
------------------------------
so far I managed following script.
for some unknown reason reaper.GetMediaItemInfo_Value( item, "D_POSITION" ) doesn't work/show current position.
Any suggestion how to loop through the item, and seek certain conditions. I guess it is something like "finding peaks".
-------------------
function Msg(param)
reaper.ShowConsoleMsg(tostring(param) .. "\n")
end
function main()
item = reaper.GetSelectedMediaItem(0, 0)
if not item then
reaper.MB("No item selected", "Oops", 0)
return nil
end
i_pos = reaper.GetMediaItemInfo_Value( item, "D_POSITION" )
i_len = reaper.GetMediaItemInfo_Value( item, "D_LENGTH" )
if i_pos > i_len then
reaper.MB("Cursor outside the item", "Oops", 0)
end
i_vol = reaper.GetMediaItemInfo_Value(item, "D_VOL")
i_vol_db = 20 * (math.log(i_vol, 10 ))
Msg("Position " .. i_pos .. " seconds")
Msg("Lenght " .. i_len .. " seconds")
Msg("Volume " .. i_vol .. " ")
Msg("Volume " .. i_vol_db .. " dB")
end
reaper.ShowConsoleMsg("")
main()
|