Old 12-26-2021, 04:09 PM   #1
Vagelis
Human being with feelings
 
Vagelis's Avatar
 
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,827
Default v6.43+dev1226 - December 26 2021

v6.43+dev1226 - December 26 2021
  • * Includes feature branch: render internals simplification/cleanup
  • * Includes feature branch: user-defined action overhaul
  • * Includes feature branch: media item normalization
  • * Includes feature branch: media explorer toolbar
  • * Includes feature branch: media item fixed lanes
  • * Includes feature branch: JSFX internals overhaul/cleanup/modernization
  • * Includes feature branch: Windows very long pathname support
  • + ReaScript: add NormalizeItems function
  • + ReaScript: do not apply render-config changes when calling GetSetProjectInfo in get mode on rendering configuration [t=261085]
  • + ReaScript: properly support passing binary-safe strings to extension-registered functions [t=261079]
  • + ReaSurroundPan: correct 9.1.4 speaker arrangement, add 9.1.6 [t=261134]
  • + Render: fix files left open when normalization/limiting is interrupted [t=261118]
  • # macOS: add NSActivityUserInitiated for beginActivity bits
This thread is for pre-release features discussion. Use the Feature Requests forum for other requests.

Changelog - Pre-Releases

Generated by X-Raym's REAPER ChangeLog to BBCode
Vagelis is offline   Reply With Quote
Old 12-26-2021, 07:10 PM   #2
Mercado_Negro
Moderator
 
Mercado_Negro's Avatar
 
Join Date: Aug 2007
Location: Caracas, Venezuela
Posts: 8,685
Default

I think the Universal build failed to compile.
__________________
Pressure is what turns coal into diamonds - Michael a.k.a. Runaway
Mercado_Negro is offline   Reply With Quote
Old 12-27-2021, 12:34 AM   #3
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,652
Default

I guess that's now fixed, because there is a reaper643+dev1226a_universal.dmg.
Tale is offline   Reply With Quote
Old 12-27-2021, 03:54 AM   #4
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Location: Berlin
Posts: 2,198
Default

Quote:
Originally Posted by Vagelis View Post
+ ReaScript: add NormalizeItems function
Thank you so much! It is a bit bittersweet though when API functions create undo points... Makes it impossible to use them in defer scripts without potentially spamming the undo history. Any chance this could be avoided?

I've spent a lot of time trying to get peak information on files without creating undo points (with the old action). I'm rather confident there's no way of doing it... And now with access to LUFS and RMS this would probably be even more valuable to scripters.

Here's a code example, if you're willing to look into it.

Code:
local extname = 'undo_test'

function ConcatPath(...) return table.concat({...}, package.config:sub(1, 1)) end

function SaveTrackValue(track, key, value)
    key = 'P_EXT:' .. extname .. '_' .. key
    reaper.GetSetMediaTrackInfo_String(track, key, value, true)
end

function LoadTrackValue(track, key, default)
    key = 'P_EXT:' .. extname .. '_' .. key
    local ret, value = reaper.GetSetMediaTrackInfo_String(track, key, '', false)
    if ret then return tonumber(value) or value end
    return default
end

function GetNormalizedMediaVolume(file, method, target)
    reaper.PreventUIRefresh(1)

    -- Save current item selection
    local sel_items = {}
    for i = reaper.CountSelectedMediaItems() - 1, 0, -1 do
        local item = reaper.GetSelectedMediaItem(0, i)
        sel_items[i + 1] = item
        -- Unselect all items
        reaper.SetMediaItemSelected(item, false)
    end

    -- Create a new item and select it
    local track = reaper.GetTrack(0, 0)
    local new_item = reaper.AddMediaItemToTrack(track)
    reaper.SetMediaItemSelected(new_item, true)

    -- Add a new take and create source from file
    local new_take = reaper.AddTakeToMediaItem(new_item)
    local new_source = reaper.PCM_Source_CreateFromFileEx(file, true)
    if not new_source then return 1 end
    reaper.SetMediaItemTake_Source(new_take, new_source)

    -- Extend item to source length (for normalize)
    local length = reaper.GetMediaSourceLength(new_source)
    if length == 0 then return 1 end
    reaper.SetMediaItemInfo_Value(new_item, 'D_LENGTH', length)

    -- Normalize item
    reaper.NormalizeItems(0, method, target, 0)
    local norm_vol = reaper.GetMediaItemTakeInfo_Value(new_take, 'D_VOL')

    reaper.DeleteTrackMediaItem(track, new_item)

    -- Restore item selection
    for _, item in ipairs(sel_items) do
        reaper.SetMediaItemSelected(item, true)
    end

    reaper.PreventUIRefresh(-1)
    return norm_vol
end


-- Add a track to the project if it has none
local track = reaper.GetTrack(0, 0)
if not track then
  reaper.InsertTrackAtIndex(0, true)
  track = reaper.GetTrack(0, 0)
end

-- Simulate an undo event that has not been included in a block yet
cnt = LoadTrackValue(track, 'myvalue', 0)
SaveTrackValue(track, 'myvalue', cnt);

-- Get a file that exists in any reaper installation
local res_path = reaper.GetResourcePath()
file_path = ConcatPath(res_path, 'Data', 'amp_models', 'Fender Deluxe - Tweed Champ.wav')

-- Try to get normalized volume without creating an undo point
reaper.Undo_BeginBlock()
vol = GetNormalizedMediaVolume(file_path, 3, -14)
reaper.Undo_EndBlock('How can this undo block be avoided?', 0)
__________________
Featured scripts: REAPER Update UtilityLil ChordboxGridbox/Adaptive gridMX TunerRS5K LinkMIDI Editor Magic Donate💝: PayPal|ko-fi
FeedTheCat is online now   Reply With Quote
Old 12-27-2021, 08:27 AM   #5
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,820
Default

Quote:
Originally Posted by Vagelis View Post
[*]+ ReaScript: add NormalizeItems function

could we have stretchItemToTempo(itemGUID,tempo) also? i know i know ! but would be nice!
__________________
🙏🏻
deeb is online now   Reply With Quote
Reply

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 03:29 AM.


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