Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 50 additions & 2 deletions Various/rxfx_ReaPad.eel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @description ReaPad
// @author Rek's Effeks
// @version 1.5.6
// @changelog Time selection copy and empty controls, save button, remove "reset midi controllers"
// @version 1.5.71
// @changelog fix Turing-Complete FX display after project load
// @about
// Hotplug-enabled gamepad controller script for Reaper. Requires SWS extension.
//
Expand Down Expand Up @@ -105,6 +105,7 @@ effect = #effect;
param = #param;
razordel = #delete;
razorcpy = #copy;
turingfx = #turingfx;
newaxis = 0;
oldaxis = 50;
newpov = 100;
Expand Down Expand Up @@ -523,6 +524,45 @@ function nudge_vol(amt)
);
);

function tcfx()
( // turing-complete - update track FX
count = CountTracks(0);
strcpy(#turingfx,"");
temp = #temp;
temp2 = #temp2;
i = 0;
loop(count,
track = GetTrack(0, i);
fxn = TrackFX_GetCount(track) - FXOffset;
fxc = TrackFX_GetCount(track);
fxc ? (
TrackFX_GetFXName(track, fxn-1, #temp);
match("+?: %{temp2}S",#temp);
#turingfx += str(fxn);
#turingfx += "/";
#turingfx += str(fxc);
#turingfx += ": ";
#turingfx += #temp2;
#turingfx += ",";
):(
#turingfx += "No FX,";
);
i += 1;
);
SetExtState("Fanciest","TrackFX",#turingfx,0);
);

function tcsl()
( // turing-complete - update track selection
n("_RS9f79e20ed4fb38201ca57ed8cbec8d2176d4288b");
CountTracks(0) ? (
GetExtState(#temp, "Fanciest", "TrackFX");
match("rerun",#temp) ? (
tcfx();
);
);
);

function reverse_fx_lookup(fxname)
(
i = 0;
Expand Down Expand Up @@ -591,6 +631,7 @@ function fx_show()
fxn = TrackFX_GetCount(track)-1-FXOffset;
TrackFX_Show(track, fxn, 1);
);
tcfx();
);

function fx_cycle(direction) // swap out fx on selected tracks
Expand Down Expand Up @@ -817,6 +858,7 @@ function setup()
xbox = joystick_create(#guid);
joystick_getinfo(xbox, numaxis, numpov);
reload(xbox, 1);
tcfx();
defer("main_loop()");
);
);
Expand Down Expand Up @@ -890,6 +932,7 @@ function main_loop()
):(
b(BUTTON_SELECT) ? (
r(40702); // new track at end of tcp
tcsl(); // turing update track sel display
):(
b(BUTTON_START) ? (
Undo_BeginBlock();
Expand Down Expand Up @@ -944,6 +987,7 @@ function main_loop()
);
):(
r(40030); // redo
tcsl(); // turing update track sel display
);
);
);
Expand Down Expand Up @@ -1010,6 +1054,7 @@ function main_loop()
i += 1;
);
r(40005); // delete track
tcsl(); // turing update track sel display
):(
b(BUTTON_START) ? (
Undo_BeginBlock();
Expand Down Expand Up @@ -1042,6 +1087,7 @@ function main_loop()
MarkerSelActive = 0; // cancel
):(
r(40029); // undo
tcsl(); // turing update track sel display
);
);
);
Expand Down Expand Up @@ -1292,6 +1338,7 @@ function main_loop()
):(
r(40286); // go to prev track
);
tcsl(); // turing update track sel display
);
);
value > 0 ? ( // right
Expand All @@ -1318,6 +1365,7 @@ function main_loop()
):(
r(40285); // go to next track
);
tcsl(); // turing update track sel display
);
);
);
Expand Down
5 changes: 3 additions & 2 deletions Web Interfaces/rxfx_Turing-complete.www
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@description Turing-complete controller
@author Rek's Effeks
@version 0.1beta.3
@changelog Fixed tempo/time sig editing to be compatible with tap tempo.
@version 0.2.2
@changelog ReaPad integration and bug fixes.
@provides
[main script] rxfx_Turing-complete/rxfx_Turing-complete - Cycle track record arm.lua
[main script] rxfx_Turing-complete/rxfx_Turing-complete - Set time selection from markers.lua
Expand All @@ -14,6 +14,7 @@
[main script] rxfx_Turing-complete/rxfx_Turing-complete - Send project list.lua
[main script] rxfx_Turing-complete/rxfx_Turing-complete - Send tempo.lua
[main script] rxfx_Turing-complete/rxfx_Turing-complete - Set time signature.lua
[main script] rxfx_Turing-complete/rxfx_Turing-complete - Update track selections.lua
rxfx_Turing-complete/rxfx_turing_complete.html > rxfx_turing_complete.html
rxfx_Turing-complete/OpenSans-VariableFont_wdth,wght.ttf > rxfx_turing_complete/
@about
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ function Track_Cycle_RecordState()
--reaper.ShowConsoleMsg(reaper.GetExtState("Fanciest", "TrackRename"))
ToCycle = tonumber(reaper.GetExtState("Fanciest","TrackRecordCycle"))
Track = reaper.GetTrack(0, ToCycle-1)
if reaper.GetMediaTrackInfo_Value(Track, "I_RECARM") == 0 then
reaper.SetMediaTrackInfo_Value(Track, "I_RECARM", 1)
reaper.SetMediaTrackInfo_Value(Track, "I_RECINPUT", 0)
reaper.SetExtState("Fanciest","RecCycleSuccess","chan1",false)
else
if reaper.GetMediaTrackInfo_Value(Track, "I_RECINPUT") == 0 then
reaper.SetMediaTrackInfo_Value(Track, "I_RECINPUT", 1)
reaper.SetExtState("Fanciest","RecCycleSuccess","chan2",false)
if Track ~= nil then
if reaper.GetMediaTrackInfo_Value(Track, "I_RECARM") == 0 then
reaper.SetMediaTrackInfo_Value(Track, "I_RECARM", 1)
reaper.SetMediaTrackInfo_Value(Track, "I_RECINPUT", 0)
reaper.SetExtState("Fanciest","RecCycleSuccess","chan1",false)
else
reaper.SetMediaTrackInfo_Value(Track, "I_RECARM", 0)
reaper.SetExtState("Fanciest","RecCycleSuccess","off",false)
if reaper.GetMediaTrackInfo_Value(Track, "I_RECINPUT") == 0 then
reaper.SetMediaTrackInfo_Value(Track, "I_RECINPUT", 1)
reaper.SetExtState("Fanciest","RecCycleSuccess","chan2",false)
else
reaper.SetMediaTrackInfo_Value(Track, "I_RECARM", 0)
reaper.SetExtState("Fanciest","RecCycleSuccess","off",false)
end
end
end
reaper.DeleteExtState("Fanciest","TrackRecordCycle",true)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
-- @noindex
local function has_value (tab, val)
for index, value in ipairs(tab) do
if value == val then
return true
end
end

return false
end

function UpdateSelectedTracks()
local count = reaper.CountSelectedTracks(0)
local finalstring = ""
local trax = {}
if count ~= 0 then
for i=1, count do
trax[i] = reaper.GetSelectedTrack(0, i-1)
end
local count2 = reaper.CountTracks(0)
for i=1, count2 do
if has_value(trax, reaper.GetTrack(0,i-1)) then
finalstring = finalstring .. tostring(i) .. ","
end
end
reaper.SetExtState("Fanciest","TrackSelections",finalstring,false)
else
reaper.SetExtState("Fanciest","TrackSelections","",false)
end
end

UpdateSelectedTracks()
Loading
Loading