You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Items Editing/amagalma_Split item at mouse cursor position ( use defined crossfade and selection settings )/amagalma_Split item at mouse cursor position ( Define crossfade and selection settings ).lua
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ end
13
13
14
14
localchosen_selection=tonumber(reaper.GetExtState("amagalma_Split at mouse cursor position", "selection")) or3
15
15
localxfadeposition=tonumber(reaper.GetExtState("amagalma_Split at mouse cursor position", "xfadeposition")) or1
16
-
16
+
localsnaptogrid=tonumber(reaper.GetExtState("amagalma_Split at mouse cursor position", "snaptogrid")) or0
17
17
18
18
localt= {
19
19
{"#Selection after split:"},
@@ -24,7 +24,9 @@ local t = {
24
24
{"#Auto crossfade position:"},
25
25
{"on the left side", 1},
26
26
{"centered at mouse cursor position", 0.5},
27
-
{"on the right side", 0}
27
+
{"on the right side", 0},
28
+
{"|#Respect snap setting:"},
29
+
{"snap to grid respected", snaptogrid}
28
30
}
29
31
30
32
@@ -35,6 +37,8 @@ for i = 1, #t do
35
37
ifchosen_selection==i-1thencheck="!" end
36
38
elseifi>6andi<10then
37
39
ifxfadeposition==t[i][2] thencheck="!" end
40
+
elseifi==11then
41
+
ifsnaptogrid==1thencheck="!" end
38
42
end
39
43
menu=menu..check..t[i][1] .."|"
40
44
end
@@ -53,6 +57,9 @@ gfx.quit()
53
57
54
58
ifselection>2andselection<=5then
55
59
reaper.SetExtState("amagalma_Split at mouse cursor position", "selection", t[selection-1][2], true)
56
-
elseifselection>6then
60
+
elseifselection>6andselection<10then
57
61
reaper.SetExtState("amagalma_Split at mouse cursor position", "xfadeposition", t[selection][2], true)
62
+
elseifselection==11then
63
+
reaper.SetExtState("amagalma_Split at mouse cursor position", "snaptogrid", 1-snaptogrid, true)
0 commit comments