Skip to content

Commit

Permalink
Release FXD - Vertical FX list v0.8.1 (#1236)
Browse files Browse the repository at this point in the history
- Fix master track panes height maximized when master track is hidden in TCP and shown in MCP
-Fix top alignment.
-Fix incorrect install path for functions and images
  • Loading branch information
BryanChi authored Sep 5, 2023
1 parent fcb44cb commit 63c3fe1
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 74 deletions.
42 changes: 22 additions & 20 deletions Tracks Properties/bryanchi_FXD - Vertical FX list.lua
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
-- @description FXD - Vertical FX list
-- @author Bryan Chi
-- @version 0.8
-- @changelog first release
-- @version 0.8.1
-- @changelog
-- - Fix master track panes height maximized when master track is hidden in TCP and shown in MCP
-- -Fix top alignment.
-- -Fix incorrect install path for functions and images
-- @provides
-- bryanchi_FXD - Vertical FX list/starHollow.png
-- bryanchi_FXD - Vertical FX list/star.png
-- bryanchi_FXD - Vertical FX list/send.png
-- bryanchi_FXD - Vertical FX list/receive.png
-- bryanchi_FXD - Vertical FX list/show.png
-- bryanchi_FXD - Vertical FX list/hide.png
-- bryanchi_FXD - Vertical FX list/link.png
-- bryanchi_FXD - Vertical FX list/General Functions.Lua
-- bryanchi_FXD - Vertical FX list/FX Adder.Lua
-- bryanchi_FXD - Vertical FX list/Images/starHollow.png
-- bryanchi_FXD - Vertical FX list/Images/star.png
-- bryanchi_FXD - Vertical FX list/Images/send.png
-- bryanchi_FXD - Vertical FX list/Images/receive.png
-- bryanchi_FXD - Vertical FX list/Images/show.png
-- bryanchi_FXD - Vertical FX list/Images/hide.png
-- bryanchi_FXD - Vertical FX list/Images/link.png
-- bryanchi_FXD - Vertical FX list/Functions/General Functions.Lua
-- bryanchi_FXD - Vertical FX list/Functions/FX Adder.Lua
-- @about
-- See forum post for details :
-- https://forum.cockos.com/showthread.php?t=282282
Expand All @@ -24,10 +27,11 @@ local FunctionFolder = r.GetResourcePath() ..
dofile(FunctionFolder .. 'General functions.lua')
dofile(FunctionFolder .. 'FX Adder.lua')

--[[ arrange_hwnd = reaper.JS_Window_FindChildByID(reaper.GetMainHwnd(), 0x3E8) -- client position
_, Top_Arrang = reaper.JS_Window_ClientToScreen(arrange_hwnd, 0, 0) -- convert to screen position (where clients x,y is actually on the screen)
]]

Top_Arrang = tonumber(select(2, r.BR_Win32_GetPrivateProfileString("REAPER", "toppane", "", r.get_ini_file()))) +
5
WetDryKnobSz = 6
SpaceBtwnFXs = 1
ShowFXNum = true
Expand Down Expand Up @@ -585,6 +589,8 @@ end

----------====================================================================================================
function loop()
Top_Arrang = tonumber(select(2, r.BR_Win32_GetPrivateProfileString("REAPER", "toppane", "", r.get_ini_file()))) + 5

visible, open = r.ImGui_Begin(ctx, 'My window', true,
r.ImGui_WindowFlags_NoScrollWithMouse() + r.ImGui_WindowFlags_NoScrollbar() + r.ImGui_WindowFlags_MenuBar())

Expand All @@ -599,11 +605,6 @@ function loop()
end







VP.vp = r.ImGui_GetWindowViewport(ctx)
VP.w, VP.h = r.ImGui_Viewport_GetSize(VP.vp)
LBtnDC = r.ImGui_IsMouseDoubleClicked(ctx, 0)
Expand Down Expand Up @@ -687,12 +688,13 @@ function loop()
TrkID = r.GetTrackGUID(Track)
Trk[TrkID] = Trk[TrkID] or {}

local hide
local hide = 0

if t == -1 then
Trk[t].PosY, Trk[t].H = getTrackPosAndHeight(Track)
r.ImGui_SetCursorPosY(ctx, Top_Arrang + Trk[t].PosY)
hide = r.GetMasterTrackVisibility()
local masterVisibility = r.GetMasterTrackVisibility()
if masterVisibility == 2 or masterVisibility == 0 then hide = 0 else hide = 1 end
else
hide = r.GetMediaTrackInfo_Value(Track, 'B_SHOWINTCP')
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,68 +9,70 @@ local MAX_FX_SIZE = 0

function FX_NAME(str, i)
local vst_name
if str:find('=<.+>') then -- if it's AU
local maker = str:sub(0, str:find(':%s') - 1)
local ActualName = str:sub(str:find(':%s') + 2, str:find('=<.+>') - 1)
--vst_name = 'AU:'.. ActualName..' ('.. maker..')'
vst_name = 'AU:' .. str:gsub('=<.+>', '')
--[[ elseif str:find('.vst=') or str:find('.vst<') then
local nm = str
vst_name= 'VST:'..nm:sub( 0, (nm:find('%.vst=') or nm:find('%.vst<')) +3 )
vst_name= vst_name:gsub('_', ' ')
Manufacturer = (nm:sub(nm:find('%(') or 0, nm:find('/n')) or 0) ]]
elseif str:find('.vst=') or str:find('.vst<') then
local comma = 1

for i = 1, 2 do -- Since there are 2 comma's in each line
comma = string.find(str, ",", (comma or 0) + 1) -- find 'next' comma
end
if str then
if str:find('=<.+>') then -- if it's AU
local maker = str:sub(0, str:find(':%s') - 1)
local ActualName = str:sub(str:find(':%s') + 2, str:find('=<.+>') - 1)
--vst_name = 'AU:'.. ActualName..' ('.. maker..')'
vst_name = 'AU:' .. str:gsub('=<.+>', '')
--[[ elseif str:find('.vst=') or str:find('.vst<') then
local nm = str
vst_name= 'VST:'..nm:sub( 0, (nm:find('%.vst=') or nm:find('%.vst<')) +3 )
vst_name= vst_name:gsub('_', ' ')
Manufacturer = (nm:sub(nm:find('%(') or 0, nm:find('/n')) or 0) ]]
elseif str:find('.vst=') or str:find('.vst<') then
local comma = 1

for i = 1, 2 do -- Since there are 2 comma's in each line
comma = string.find(str, ",", (comma or 0) + 1) -- find 'next' comma
end

if comma then
vst_name = "VST:" .. str:sub(comma + 1, str:find('\n'))
end
--[[ for nm in str:gmatch('[^%,]+') do --- Split Line into segments spearated by comma
vst_name = nm:match("(%S+ .-%))") and "VST:" .. (nm:match("(%S+ .-%))") or '')
Manufacturer = (nm:sub(nm:find('%(') or 0, nm:find('/n')) or 0)
if comma then
vst_name = "VST:" .. str:sub(comma + 1, str:find('\n'))
end
--[[ for nm in str:gmatch('[^%,]+') do --- Split Line into segments spearated by comma
vst_name = nm:match("(%S+ .-%))") and "VST:" .. (nm:match("(%S+ .-%))") or '')
Manufacturer = (nm:sub(nm:find('%(') or 0, nm:find('/n')) or 0)
end ]]
elseif str:find('.vst3=') or str:find('.vst3<') then
local comma = 1
end ]]
elseif str:find('.vst3=') or str:find('.vst3<') then
local comma = 1

for i = 1, 2 do -- Since there are 2 comma's in each line
comma = string.find(str, ",", (comma or 0) + 1) -- find 'next' comma
end
for i = 1, 2 do -- Since there are 2 comma's in each line
comma = string.find(str, ",", (comma or 0) + 1) -- find 'next' comma
end

if comma then
vst_name = "VST3:" .. str:sub(comma + 1, str:find('\n'))
end
else
for name_segment in str:gmatch('[^%,]+') do --- Split Line into segments spearated by comma
if name_segment:match("(%S+) ") then -- if segment has space in it
if name_segment:match('"(JS: .-)"') then
vst_name = name_segment:match('"JS: (.-)"') and "JS:" .. name_segment:match('"JS: (.-)"') or nil
--[[ elseif name_segment:find('=<.+>') then -- AU Plugins
vst_name = 'AU:'.. name_segment:gsub('=<.+>', '') ]]
else
vst_name = name_segment:match("(%S+ .-%))") and "VST:" .. name_segment:match("(%S+ .-%))") or nil
if comma then
vst_name = "VST3:" .. str:sub(comma + 1, str:find('\n'))
end
else
for name_segment in str:gmatch('[^%,]+') do --- Split Line into segments spearated by comma
if name_segment:match("(%S+) ") then -- if segment has space in it
if name_segment:match('"(JS: .-)"') then
vst_name = name_segment:match('"JS: (.-)"') and "JS:" .. name_segment:match('"JS: (.-)"') or nil
--[[ elseif name_segment:find('=<.+>') then -- AU Plugins
vst_name = 'AU:'.. name_segment:gsub('=<.+>', '') ]]
else
vst_name = name_segment:match("(%S+ .-%))") and "VST:" .. name_segment:match("(%S+ .-%))") or nil
end
elseif name_segment:find('%.vst=') then -- if it's vst
local nm = name_segment
vst_name = 'VST:' .. nm:sub(0, nm:find('%.vst=') - 1)
vst_name = vst_name:gsub('_', ' ')
elseif name_segment:find('%.vst3=') then -- if it's vst3
local nm = name_segment
vst_name = 'VST3:' .. nm:sub(0, nm:find('%.vst3=') - 1)
vst_name = vst_name:gsub('_', ' ')
elseif name_segment:find('%.vst.dylib=') then
local nm = name_segment -- Reaper Native plugins
vst_name = 'VST:' .. nm:sub(0, nm:find('%.vst.dylib=') - 1)
end
elseif name_segment:find('%.vst=') then -- if it's vst
local nm = name_segment
vst_name = 'VST:' .. nm:sub(0, nm:find('%.vst=') - 1)
vst_name = vst_name:gsub('_', ' ')
elseif name_segment:find('%.vst3=') then -- if it's vst3
local nm = name_segment
vst_name = 'VST3:' .. nm:sub(0, nm:find('%.vst3=') - 1)
vst_name = vst_name:gsub('_', ' ')
elseif name_segment:find('%.vst.dylib=') then
local nm = name_segment -- Reaper Native plugins
vst_name = 'VST:' .. nm:sub(0, nm:find('%.vst.dylib=') - 1)
end
end
if vst_name then vst_name = vst_name:gsub('!!!VSTi', '') end
if vst_name == 'VST:<SHELL>' or vst_name == 'VST3:<SHELL>' then vst_name = nil end
if vst_name then return vst_name end
end
if vst_name then vst_name = vst_name:gsub('!!!VSTi', '') end
if vst_name == 'VST:<SHELL>' or vst_name == 'VST3:<SHELL>' then vst_name = nil end
if vst_name then return vst_name end
end

function GetFileContext(fp)
Expand Down

0 comments on commit 63c3fe1

Please sign in to comment.