Skip to content

Commit 8487e82

Browse files
authored
Release MK Slicer (80icio MOD) v1.02 (#729)
- New Grid Tolerance parameters
1 parent fccad45 commit 8487e82

File tree

1 file changed

+48
-17
lines changed

1 file changed

+48
-17
lines changed

Items Editing/MK Slicer (80icio MOD).lua

Lines changed: 48 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
11
-- @description MK Slicer (80icio MOD)
22
-- @author 80icio
3-
-- @version 1.01
4-
-- @changelog - Minimum distance from grid disabled
3+
-- @version 1.02
4+
-- @changelog - New Grid Tolerance parameters
55
-- @link Forum Thread https://forum.cockos.com/showthread.php?p=2436358#post2436358
66
-- @about
77
-- This is a lua script based on MK SLICER 2 by @Cool for quick slicing, quantizing by grid, re-quantizing, triggering or sampling audio.
8-
-- This is an editing monster machine.
8+
--
9+
-- The original script has been modified to make it work with multitrack selection, especially useful for drum editing.
10+
--
11+
-- No more "dummy" exports needed for multitrack editing, the script will sum the multi selection automatically, create peaks and find transients.
12+
--
13+
-- No more selecting grouped items before slicing and quantizing, the script will do it for you with SLICEMODE options.
14+
--
15+
-- Faster editing with Grid related functions, the script only seeks transients related to the grid division you set.
16+
--
17+
-- All awesome MK Slicer 2 features like single track midi triggering and sampling and randomize funtions are still in.
18+
--
19+
--
920
--
1021
-- 80icio MODS
1122
--
23+
-- - Multitrack selection, editing, filtering
24+
-- - Reduce Hit Points by Grid division
1225
-- - Leading PAD
13-
-- - Reduce trig lines by Grid division
14-
-- - multitrack editing
15-
-- - multitrack filtering
16-
-- - Added Mac Osx swipe gestures
17-
-- - Improved GUI
26+
-- - Slicemode
27+
-- - Added Mac Osx trackpad swipe gestures
28+
-- - Improved GUI with better Trig lines and better Grid lines
29+
-- - Grid Tolerance for light editing on large grid division settings
30+
-- - Better FFT filtering with smaller buffer for better transient precision
1831

1932
--[[
2033
@@ -3212,7 +3225,7 @@ function()
32123225
end
32133226
-----------------Swing Slider------------------------ icio
32143227

3215-
local Swing_Sld = O_Slider:new(577,5,130,20, 0.28,0.4,0.7,0.8, "","Arial",16, (Swing_Slider+1)/2 )
3228+
local Swing_Sld = O_Slider:new(590,5,130,20, 0.28,0.4,0.7,0.8, "","Arial",16, (Swing_Slider+1)/2 )
32163229
function Swing_Sld:draw_val()
32173230

32183231
self.form_val = floor((((self.norm_val * 100)-50)*2)+0.5) -- form_val
@@ -3272,6 +3285,8 @@ end
32723285

32733286

32743287

3288+
3289+
32753290
--Leading Pad slider ------------------------------ icio
32763291

32773292
local LPad_Sld = LPAD_Slider:new(532,431+corrY,133,18, 0.28,0.4,0.7,0.8, "LeadingPad","Arial",16, LpadTime*0.02 )
@@ -3482,7 +3497,7 @@ local Velocity = Txt:new(788,384+corrY,55,18, 0.8,0.8,0.8,0.8, "Velocity","Arial
34823497
----------------------------------------
34833498

34843499
local Slider_TB = {HP_Freq,LP_Freq,Fltr_Gain,
3485-
Gate_Thresh,Gate_Sensitivity,Gate_Retrig,Gate_ReducePoints,Offset_Sld,QStrength_Sld,LPad_Sld,Project}
3500+
Gate_Thresh,Gate_Sensitivity,Gate_Retrig,Gate_ReducePoints,Offset_Sld,QStrength_Sld,LPad_Sld,Project}--
34863501

34873502
local Slider_TB_Trigger = {Gate_VeloScale, VeloMode,OutNote, Velocity}
34883503

@@ -4634,7 +4649,7 @@ end
46344649

46354650

46364651

4637-
local ChangeGrid = CheckBox_Show:new(450,5,60,20, 0.28,0.4,0.7,0.8, "Grid: ","Arial",16, Grid_mode ,
4652+
local ChangeGrid = CheckBox_Show:new(450,5,60,20, 0.28,0.4,0.7,0.8, "Grid:","Arial",16, Grid_mode ,
46384653
{"1/1","1/2","1/3","1/4","1/6","1/8","1/12","1/16","1/24","1/32","1/48","1/64"} )
46394654
ChangeGrid.onClick =
46404655
function()
@@ -4653,7 +4668,23 @@ function()
46534668
if ChangeGrid.norm_val == 12 then r.GetSetProjectGrid(0, true, 1/64, swing_mode, swingamt) end
46544669
end
46554670
end
4671+
-------------------------------------------------
4672+
-- Maximum distance from grid Slider ------------
4673+
-------------------------------------------------
4674+
grid_dist = srate*0.1
4675+
4676+
local MDFG = CheckBox_Show:new(325,5,70,20, 0.28,0.4,0.7,0.8, "Grid Tolerance:","Arial",16, 2,{ "tight", "Moderate", "Large", "Disabled" } )
4677+
MDFG.onClick =
4678+
function()
4679+
4680+
if MDFG.norm_val == 1 then grid_dist = srate*0.05 end
4681+
if MDFG.norm_val == 2 then grid_dist = srate*0.1 end
4682+
if MDFG.norm_val == 3 then grid_dist = srate*0.2 end
4683+
if MDFG.norm_val == 4 then grid_dist = huge end
4684+
4685+
Gate_Gl:Apply_toFiltered()
46564686

4687+
end
46574688

46584689

46594690
--------------------------------------------------
@@ -4676,7 +4707,7 @@ end
46764707
-----------------------------------
46774708
--- CheckBox_TB -------------------
46784709
-----------------------------------
4679-
CheckBox_TB = { Guides, EditMode, ChangeGrid }--{ViewMode, Guides, EditMode }
4710+
CheckBox_TB = { Guides, EditMode, ChangeGrid, MDFG }--{ViewMode, Guides, EditMode }
46804711

46814712
-----------------------------
46824713

@@ -4887,11 +4918,11 @@ Grid_blocks_Ruler[0] = 0
48874918
self.grid_Points = {}
48884919
self.grid_Points_temp = {}
48894920

4890-
--local mindist = srate*0.05 ------- minimum distance from grid 50 ms
4921+
--local grid_dist = srate*0.1 ------- minimum distance from grid 50 ms
48914922

48924923

48934924
function getLowest(tbl)
4894-
local low = math.huge
4925+
local low = huge
48954926
local index
48964927
for i, v in pairs(tbl) do
48974928
if v < low then
@@ -4911,10 +4942,10 @@ self.grid_Points_temp = {}
49114942
if self.State_Points[c] < Grid_blocks_Ruler[i] and self.State_Points[c] > (Grid_blocks_Ruler[i-2] or 0) then
49124943
local diff = abs(self.State_Points[c] - Grid_blocks_Ruler[i-1])
49134944

4914-
--if diff <= mindist then
4945+
if diff <= grid_dist then
49154946
self.grid_Points_temp[#self.grid_Points_temp+1] = diff
49164947
idtotal[#idtotal+1] = c
4917-
-- end
4948+
end
49184949
end
49194950
end
49204951

@@ -7700,7 +7731,7 @@ function Init()
77007731
-- Some gfx Wnd Default Values ---------------
77017732
local R,G,B = 45,45,45 -- 0...255 format -- цвет основного окна
77027733
local Wnd_bgd = R + G*256 + B*65536 -- red+green*256+blue*65536
7703-
local Wnd_Title = "MK Slicer (80icio MOD) v1.0"
7734+
local Wnd_Title = "MK Slicer (80icio MOD)"
77047735
local Wnd_Dock, Wnd_X,Wnd_Y = dock_pos, xpos, ypos
77057736
-- Wnd_W,Wnd_H = 1044,490 -- global values(used for define zoom level)
77067737

0 commit comments

Comments
 (0)