Skip to content

Commit f5b35d9

Browse files
authored
Release Perfect Timing! - Audio Quantizer v0.27 (ReaTeam#1424)
- Fixed graphic issue between mouse position indication vertical line and arrange window trigger lines - Fixed arrange window trigger lines behaviour when tracks disappear in folder
1 parent 474d943 commit f5b35d9

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

Items Editing/80icio_Perfect Timing! - Audio Quantizer.lua

+25-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
-- @description Perfect Timing! - Audio Quantizer
22
-- @author 80icio
3-
-- @version 0.26
3+
-- @version 0.27
44
-- @changelog
5-
-- - Unlocked 1 bar, 1/2 bar Grid and relative triplets Divisions
6-
-- - Changed layout for Visualizer zoom bounds reference on tracks on Main window
5+
-- - Fixed graphic issue between mouse position indication vertical line and arrange window trigger lines
6+
-- - Fixed arrange window trigger lines behaviour when tracks disappear in folder
77
-- @link Forum thread https://forum.cockos.com/showthread.php?t=288964
88
-- @about
99
-- # PERFECT TIMING!
@@ -1789,6 +1789,8 @@ end
17891789

17901790

17911791
function MW_drawlines()
1792+
local mouse_vert_line_on_arrange_window = false
1793+
17921794
if check_itm == true and open and quantize_state == false then
17931795

17941796
local itemsn = r.CountSelectedMediaItems(0)
@@ -1808,24 +1810,42 @@ function MW_drawlines()
18081810
local sel_tr = sel_tracks_table[trck]
18091811

18101812
local media_move_check = r.GetMediaItemInfo_Value(item, "D_LENGTH" ) - r.GetMediaItemInfo_Value(item, "D_POSITION")
1813+
local track_H = r.GetMediaTrackInfo_Value(sel_tr, "I_TCPH")
18111814

18121815
if media_move_check == first_sel_item_length - first_sel_item_start and sel_tr == r.GetMediaItemTrack(item) then
1816+
18131817
local MWzoom = r.GetHZoomLevel()
18141818
local _, scrollpos, pageSize, min, max, trackPos = r.JS_Window_GetScrollInfo( trackview, "h" )
18151819
local _, scrollpos_v = r.JS_Window_GetScrollInfo( trackview, "v" )
18161820
local _, width = r.JS_Window_GetClientSize( trackview )
18171821
local track_y = r.GetMediaTrackInfo_Value(sel_tr, "I_TCPY")
18181822
local track_H = r.GetMediaTrackInfo_Value(sel_tr, "I_TCPH")
1823+
18191824
--local track_FL_n = r.GetMediaTrackInfo_Value(sel_tr, "I_NUMFIXEDLANES")
18201825

1821-
local media_H = r.GetMediaItemInfo_Value(item, "I_LASTH" )
1826+
if r.GetToggleCommandState(43194) then
1827+
local window, _, _ = r.BR_GetMouseCursorContext()
1828+
if window == "arrange" then
1829+
mouse_vert_line_on_arrange_window = true
1830+
else
1831+
mouse_vert_line_on_arrange_window = false
1832+
end
1833+
end
1834+
1835+
local media_H = 0
1836+
1837+
if track_H ~= 0 then
1838+
media_H = r.GetMediaItemInfo_Value(item, "I_LASTH" )
1839+
end
1840+
18221841
local media_Y = r.GetMediaItemInfo_Value(item, "I_LASTY" )
1842+
18231843
--local media_FL_y = r.GetMediaItemInfo_Value(item, "F_FREEMODE_Y")
18241844
-- local media_FL_h = r.GetMediaItemInfo_Value(item, "F_FREEMODE_H")
18251845

18261846
movescreen[trck] =h_zoom_center + zoom_bounds_L + zoom_bounds_Total + r.CSurf_TrackToID( sel_tr, false ) + MWzoom + scrollpos + track_H + media_H + scrollpos_v + itemsn + track_y*2
18271847

1828-
if MW_lines_ON and (Gtolerance_slider or r.GetPlayState() ~= 0 or visualizer_rv or Offset or Detect_rv2 or Detect_rv or Visualizer_mode_rv or
1848+
if MW_lines_ON and (Gtolerance_slider or r.GetPlayState() ~= 0 or mouse_vert_line_on_arrange_window or visualizer_rv or Offset or Detect_rv2 or Detect_rv or Visualizer_mode_rv or
18291849
color_button or Sensitivity_slider or Change_grid or movescreen[trck] ~= movescreen_prev[trck]) then --or set_grid_from_script or get_grid_from_proj
18301850

18311851
if visualizer then

0 commit comments

Comments
 (0)