Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-01-2024, 10:08 AM   #1
Human being with feelings
daniellumertz's Avatar
Join Date: Dec 2017
Location: Brazil
Posts: 2,024
Default Calculate Loudness of Selected Items

Maybe I am missing something but the action Calculate loudness of selected items via dry run render, 42468 seems to display a smaller area of the selected item than it should. Also the area is divergent than the action : Calculate loudness of selected items, including take and track FX and settings, via dry run render 42437
The values between these actions seems fine tho, just the display of 42468 seems cutted.

Also on that note the function CalculateNormalization seems to retrieve different values of the calculate loudness actions ? Or maybe I am using it wrong?

local proj, selitem = 0, 0
local item = reaper.GetSelectedMediaItem(proj, selitem)
local take = reaper.GetActiveTake(item)
local source = reaper.GetMediaItemTake_Source( take )
-- Item bounds
local offset = reaper.GetMediaItemTakeInfo_Value(take, 'D_STARTOFFS')
local len = reaper.GetMediaItemInfo_Value(item, 'D_LENGTH')
local rate = reaper.GetMediaItemTakeInfo_Value(take, 'D_PLAYRATE')
-- configs
local normalizeTarget = 0
local normalizeTo = 0 -- 0=LUFS-I, 1=RMS-I, 2=peak, 3=true peak, 4=LUFS-M max, 5=LUFS-S max 
local norm = reaper.CalculateNormalization( source, normalizeTo, normalizeTarget, offset, offset+(len*rate))
reaper.ShowConsoleMsg('Normalize value: '..norm..'\n')
daniellumertz is online now   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 10:16 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.