From 87ca01c3aef924b5c5fa463e5aef7c92666113ef Mon Sep 17 00:00:00 2001
From: rexendevar <46948713+rexendevar@users.noreply.github.com>
Date: Fri, 3 Apr 2026 21:16:09 -0700
Subject: [PATCH 1/7] Release Turing Complete Web Interface v0.alpha2
---
Various/rxfx_TuringCompleteWebInterface.lua | 3211 +++++++++++++++++
.../rxfx_CustomFancy_CycleTrackRecordArm.lua | 24 +
.../rxfx_CustomFancy_NewProject.lua | 25 +
.../rxfx_CustomFancy_OpenSelectedProject.lua | 25 +
.../rxfx_CustomFancy_ReadCurrentProject.lua | 70 +
...fx_CustomFancy_RenameTrackFromExtState.lua | 12 +
.../rxfx_CustomFancy_SaveProjectAs.lua | 58 +
.../rxfx_CustomFancy_SendProjectList.lua | 36 +
.../rxfx_CustomFancy_SendTempo.lua | 10 +
...rxfx_CustomFancy_SetTimeSelFromMarkers.lua | 47 +
.../rxfx_CustomFancy_SetTimeSig.lua | 26 +
11 files changed, 3544 insertions(+)
create mode 100644 Various/rxfx_TuringCompleteWebInterface.lua
create mode 100644 Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_CycleTrackRecordArm.lua
create mode 100644 Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_NewProject.lua
create mode 100644 Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_OpenSelectedProject.lua
create mode 100644 Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_ReadCurrentProject.lua
create mode 100644 Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_RenameTrackFromExtState.lua
create mode 100644 Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SaveProjectAs.lua
create mode 100644 Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendProjectList.lua
create mode 100644 Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendTempo.lua
create mode 100644 Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSelFromMarkers.lua
create mode 100644 Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSig.lua
diff --git a/Various/rxfx_TuringCompleteWebInterface.lua b/Various/rxfx_TuringCompleteWebInterface.lua
new file mode 100644
index 000000000..d56d68c1f
--- /dev/null
+++ b/Various/rxfx_TuringCompleteWebInterface.lua
@@ -0,0 +1,3211 @@
+-- @description Turing Complete Web Interface
+-- @author Rek's Effeks
+-- @version 0.alpha2
+-- @provides
+-- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_CycleTrackRecordArm.lua
+-- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSelFromMarkers.lua
+-- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_NewProject.lua
+-- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_OpenSelectedProject.lua
+-- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_ReadCurrentProject.lua
+-- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_RenameTrackFromExtState.lua
+-- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SaveProjectAs.lua
+-- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendProjectList.lua
+-- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendTempo.lua
+-- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSig.lua
+-- @about
+-- A web interface (adapted from Fancier.html) that can fully* control Reaper. Includes project save/load, basic track management, time selection controls and various bugfixes over the original.
+--
+-- NOTE: This is almost certainly not compatible with your existing workflow. It's designed to be the ONLY input method for a HEADLESS install of Reaper, specialized towards multitracking audio, and tested primarily on Raspberry Pi (Linux). This means significant caveats, including the need for a fairly specific project file structure. I have no intention of supporting midi in any form and I think it's unlikely the interface will work on Windows.
+--
+-- INSTALL INSTRUCTIONS: I don't know how web interfaces will be set up in ReaPack, but wherever the HTML file ends up, you should put the .ttf file for the OpenSans font beside it: https://fonts.google.com/specimen/Open+Sans
+--
+-- You also need to set your default project path in reaper-extstate.ini, in the form:
+-- [Fanciest]
+-- ProjectFolder=/path/to/folder/
+--
+-- Include the slash at the end.
+
+
+
+
+
+
+
+Rek's Turing-complete Controller
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No project
+
+
+
+
+
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Hours:Minutes:Seconds:Frames
+ 8
+ 999
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MASTER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ xxdB
+
+
+
+
+
+
+
+
+
+
+
+ + NEW TRACK
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+88
+
+Track Name
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ //
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PAN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Target Name
+ xx dB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ results :
Here
+
+
+
+
+
+
+
+
+ TEMPO & TIME SIGNATURE
+
+
+
+
+
+
+
+
+
+
+
BPM
+
+
+ CANCEL
+ SET ›
+
+
+
+
CLOSE
+
+
+
+
+
+
+
+
+
+
+
+ LOAD PROJECT
+
+
+
+
+
+
+
+ + NEW
+ LOAD ›
+
+
+
+
+
+
+
+
+ SET TIME SELECTION
+
+
+
+
+
+
+
+ CANCEL
+ SET ›
+
+
+
+
+
+
+
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_CycleTrackRecordArm.lua b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_CycleTrackRecordArm.lua
new file mode 100644
index 000000000..45c864639
--- /dev/null
+++ b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_CycleTrackRecordArm.lua
@@ -0,0 +1,24 @@
+-- @noindex
+
+
+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)
+ else
+ reaper.SetMediaTrackInfo_Value(Track, "I_RECARM", 0)
+ reaper.SetExtState("Fanciest","RecCycleSuccess","off",false)
+ end
+end
+reaper.DeleteExtState("Fanciest","TrackRecordCycle",true)
+end
+
+Track_Cycle_RecordState()
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_NewProject.lua b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_NewProject.lua
new file mode 100644
index 000000000..8b026f104
--- /dev/null
+++ b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_NewProject.lua
@@ -0,0 +1,25 @@
+-- @noindex
+
+
+function NewProject()
+ -- autosave current project
+ local autosaveName = reaper.GetProjectName(0):gsub(".RPP","")
+ if autosaveName ~= "" then
+ reaper.Main_SaveProject(0, false)
+ else
+ if reaper.CountMediaItems(0) ~= 0 then
+ reaper.SetExtState("Fanciest","ProjectSave","autosave_"..os.date(),false)
+ local scriptFolder = ({ reaper.get_action_context() })[2]:match('^.+[\\//]')
+ dofile(scriptFolder.."rxfx_CustomFancy_SaveProjectAs.lua")
+ end
+ end
+
+ -- open selected project
+ local folder = reaper.GetExtState("Fanciest", "ProjectFolder")
+ local projectFile = reaper.GetExtState("Fanciest", "ProjectLoad")
+ reaper.Main_openProject("noprompt:/")
+
+end
+
+NewProject()
+
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_OpenSelectedProject.lua b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_OpenSelectedProject.lua
new file mode 100644
index 000000000..3600ddb93
--- /dev/null
+++ b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_OpenSelectedProject.lua
@@ -0,0 +1,25 @@
+-- @noindex
+
+
+function OpenSelectedProject()
+ -- autosave current project
+ local autosaveName = reaper.GetProjectName(0):gsub(".RPP","")
+ if autosaveName ~= "" then
+ reaper.Main_SaveProject(0, false)
+ else
+ if reaper.CountMediaItems(0) ~= 0 then
+ reaper.SetExtState("Fanciest","ProjectSave","autosave_"..os.date(),false)
+ local scriptFolder = ({ reaper.get_action_context() })[2]:match('^.+[\\//]')
+ dofile(scriptFolder.."rxfx_CustomFancy_SaveProjectAs.lua")
+ end
+ end
+
+ -- open selected project
+ local folder = reaper.GetExtState("Fanciest", "ProjectFolder")
+ local projectFile = reaper.GetExtState("Fanciest", "ProjectLoad")
+ reaper.Main_openProject("noprompt:" .. folder .. projectFile)
+
+end
+
+OpenSelectedProject()
+
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_ReadCurrentProject.lua b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_ReadCurrentProject.lua
new file mode 100644
index 000000000..ca0acad17
--- /dev/null
+++ b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_ReadCurrentProject.lua
@@ -0,0 +1,70 @@
+-- @noindex
+
+
+function SendProjectList()
+ -- send project name
+ ProjectName=reaper.GetProjectName(0)
+ reaper.SetExtState("Fanciest","CurrentProject",ProjectName,false)
+
+ -- send loop points (by marker index)
+ local first, second = reaper.GetSet_LoopTimeRange(0, 0, 0, 0, 0)
+ count = reaper.GetNumRegionsOrMarkers(0)
+ local m, n = {}, {}
+ --m[0], n[0] = 0, "home"
+ for i=1, count do
+ local marker = reaper.GetRegionOrMarker(0, i-1, "")
+ local time = reaper.GetRegionOrMarkerInfo_Value(0, marker, "D_STARTPOS")
+ local idx = reaper.GetRegionOrMarkerInfo_Value(0, marker, "I_NUMBER")
+ m[i] = time
+ n[i] = idx
+ end
+ m[#m+1] = reaper.GetProjectLength(0)
+ n[#n+1] = "end"
+ m[#m+1] = 0
+ n[#n+1] = "home"
+
+ for idx, val in ipairs(m) do
+ if math.abs(first-val)<0.02 then
+ finalfirst = n[idx]
+ end
+ end
+ if finalfirst == nil then
+ reaper.GetSet_LoopTimeRange(1, 0, 0, 0, 0)
+ end
+
+ for idx, val in ipairs(m) do
+ if math.abs(second-val)<0.02 then
+ finalsecond = n[idx]
+ end
+ end
+ if finalsecond == nil then
+ reaper.GetSet_LoopTimeRange(1, 0, 0, 0, 0)
+ end
+
+ if finalfirst ~= finalsecond and finalfirst ~= nil and finalsecond ~= nil then
+ reaper.SetExtState("Fanciest","SelectDisplay",finalfirst..':'..finalsecond,false)
+ else
+ reaper.SetExtState("Fanciest","SelectDisplay","none",false)
+ end
+
+ -- send track arm states
+ count = reaper.CountTracks(0)
+ local arms = {}
+ for i=0, count-1 do
+ Track = reaper.GetTrack(0, i)
+ if reaper.GetMediaTrackInfo_Value(Track, "I_RECARM") == 0 then
+ arms[i+1] = "off"
+ elseif reaper.GetMediaTrackInfo_Value(Track, "I_RECINPUT") == 0 then
+ arms[i+1] = "chan1"
+ elseif reaper.GetMediaTrackInfo_Value(Track, "I_RECINPUT") == 1 then
+ arms[i+1] = "chan2"
+ else
+ reaper.SetMediaTrackInfo_Value(Track, "I_RECARM", 0)
+ arms[i+1] = "off" --don't feel like dealing w weird states
+ end
+ end
+ armstring = table.concat(arms,":") --isnt this the guy who landed on the moon
+ reaper.SetExtState("Fanciest","ArmDisplay",armstring,false)
+end
+
+SendProjectList()
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_RenameTrackFromExtState.lua b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_RenameTrackFromExtState.lua
new file mode 100644
index 000000000..e6be4abf1
--- /dev/null
+++ b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_RenameTrackFromExtState.lua
@@ -0,0 +1,12 @@
+-- @noindex
+
+
+function Rename_From_ExtState()
+--reaper.ShowConsoleMsg(reaper.GetExtState("Fanciest", "TrackRename"))
+NewName = reaper.GetExtState("Fanciest","TrackRename")
+Track = reaper.GetSelectedTrack(0, 0)
+reaper.GetSetMediaTrackInfo_String(Track, "P_NAME", NewName, true)
+reaper.DeleteExtState("Fanciest","TrackRename",true)
+end
+
+Rename_From_ExtState()
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SaveProjectAs.lua b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SaveProjectAs.lua
new file mode 100644
index 000000000..b6a566750
--- /dev/null
+++ b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SaveProjectAs.lua
@@ -0,0 +1,58 @@
+-- @noindex
+
+
+function SaveProjectAs()
+ local folder = reaper.GetExtState("Fanciest", "ProjectFolder")
+
+ local oldProject = reaper.GetProjectName(0):gsub(".RPP","")
+ local projectFile = reaper.GetExtState("Fanciest", "ProjectSave")
+ reaper.Main_SaveProjectEx(0, folder .. projectFile .. ".RPP", 8)
+ local projectStorage = reaper.GetProjectName(0):gsub(".RPP","")
+
+ reaper.GetSetProjectInfo_String(0, "RECORD_PATH", projectStorage, 1)
+ --reaper.ShowConsoleMsg('\n\n'..oldProject..'vs'..projectStorage..'\n')
+ os.execute('mkdir "'..folder..projectStorage..'"')
+
+ -- move all recordings
+ local numItems = reaper.CountMediaItems(0)
+ for i=0,numItems-1 do
+ local currentItem = reaper.GetMediaItem(0, i)
+ local numTakes = reaper.GetMediaItemNumTakes(currentItem)
+ for n=0,numTakes-1 do
+ local currentTake = reaper.GetMediaItemTake(currentItem,n)
+ --if currentTake == nil then
+ if currentTake ~= nil then
+ local currentSource = reaper.GetMediaItemTake_Source(currentTake)
+ local currentFilename = reaper.GetMediaSourceFileName(currentSource):gsub(folder,'')
+ if currentFilename ~= '' then
+ local t = {}
+ for str in string.gmatch(currentFilename, "([^/]+)") do
+ table.insert(t,str)
+ end
+ local finalFilename = folder..projectStorage..'/'..t[#t]
+ --reaper.ShowConsoleMsg(folder..currentFilename..'\n to '..finalFilename..'\n')
+ os.rename(folder..currentFilename, finalFilename)
+ local finalSource = reaper.PCM_Source_CreateFromFile(finalFilename)
+ reaper.SetMediaItemTake_Source(currentTake,finalSource)
+ end
+ end
+ --
+ -- GetMediaSourceFilename
+ --reaper.ShowConsoleMsg(currentShort .. '\n')
+ end
+ end
+ reaper.Main_SaveProject()
+
+ --delete old project - not ideal but a missing files warning is currently unrecoverable
+ if oldProject ~= projectStorage then
+ if not os.remove(folder..oldProject) then
+ os.rename(folder..oldProject,folder.."orphans_"..oldProject)
+ end
+ os.remove(folder..oldProject..'.RPP')
+ end
+
+ --reaper.ShowConsoleMsg(reaper.GetProjectPath())
+end
+
+SaveProjectAs()
+
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendProjectList.lua b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendProjectList.lua
new file mode 100644
index 000000000..64c5fbda9
--- /dev/null
+++ b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendProjectList.lua
@@ -0,0 +1,36 @@
+-- @noindex
+
+
+function GetProjectFolder()
+ reaper.SetExtState("Fanciest","ProjectFolder","/home/flynn/Music/",true)
+end
+
+-- GetProjectFolder()
+
+function SendProjectList()
+ local folder = reaper.GetExtState("Fanciest","ProjectFolder")
+ local ext = "rpp"
+ local files = {}
+ project_list = {}
+
+ local i = 0
+ repeat
+ local file = reaper.EnumerateFiles(folder, i)
+ if file and file:lower():match("%." .. ext .. "$") then
+ table.insert(files, file)
+ end
+ i = i + 1
+ until not file
+
+ -- files now contains all .rpp filenames in that folder
+ for _, f in ipairs(files) do
+ --reaper.ShowConsoleMsg(f .. "\n")
+ table.insert(project_list,f)
+ end
+ checking=reaper.GetProjectName(0)
+ reaper.SetExtState("Fanciest", "ProjectList", table.concat(project_list, '\n'), false)
+ --reaper.ShowConsoleMsg(reaper.GetExtState("Fanciest","ProjectList"))
+end
+
+SendProjectList()
+
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendTempo.lua b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendTempo.lua
new file mode 100644
index 000000000..28310de4f
--- /dev/null
+++ b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendTempo.lua
@@ -0,0 +1,10 @@
+-- @noindex
+
+
+function SendTempo()
+ currentPos = reaper.GetPlayPosition()
+ ta1, ta2, ta3, ta4, newTempo, ta5, ta6, ta7 = reaper.GetTempoTimeSigMarker(0, reaper.FindTempoTimeSigMarker(0,currentPos))
+ reaper.SetExtState("Fanciest","CurrentTempo",tostring(newTempo), false)
+end
+
+SendTempo()
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSelFromMarkers.lua b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSelFromMarkers.lua
new file mode 100644
index 000000000..7b2d5d47a
--- /dev/null
+++ b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSelFromMarkers.lua
@@ -0,0 +1,47 @@
+-- @noindex
+
+
+function OpenSelectedProject()
+ values = reaper.GetExtState("Fanciest","MarkerLoop")
+ local t = {}
+ for str in string.gmatch(values, "([^:]+)") do
+ table.insert(t, str)
+ end
+ ms = {}
+ for i=1, reaper.GetNumRegionsOrMarkers(0) do
+ table.insert(ms, reaper.GetRegionOrMarkerInfo_Value(0, reaper.GetRegionOrMarker(0, i-1,""), "I_NUMBER"))
+ end
+
+
+ if t[1] == "home" then
+ first = 0
+ elseif t[1] == "end" then
+ first = reaper.GetProjectLength(0)
+ else
+ wip = tonumber(t[1])
+ for i, n in ipairs(ms) do
+ if n == wip then
+ wip = reaper.GetRegionOrMarker(0, i-1,'')
+ end
+ end
+ first = reaper.GetRegionOrMarkerInfo_Value(0, wip, "D_STARTPOS")
+ end
+ if t[2] == "home" then
+ second = 0
+ elseif t[2] == "end" then
+ second = reaper.GetProjectLength(0)
+ else
+ wip = tonumber(t[2])
+ for i, n in ipairs(ms) do
+ if n == wip then
+ wip = reaper.GetRegionOrMarker(0, i-1,'')
+ end
+ end
+ second = reaper.GetRegionOrMarkerInfo_Value(0, wip, "D_STARTPOS")
+ end
+ reaper.GetSet_LoopTimeRange(1, 0, first, second, true)
+
+end
+
+OpenSelectedProject()
+
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSig.lua b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSig.lua
new file mode 100644
index 000000000..466badb8e
--- /dev/null
+++ b/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSig.lua
@@ -0,0 +1,26 @@
+-- @noindex
+
+
+function TimeSig()
+ currentPos = reaper.GetPlayPosition()
+ tempoString = reaper.GetExtState("Fanciest","TempoSet")
+ if tempoString == "" then
+ ta1, ta2, ta3, ta4, newTempo, ta5, ta6, ta7 = reaper.GetTempoTimeSigMarker(0, reaper.FindTempoTimeSigMarker(0,currentPos))
+ else
+ newTempo = tonumber(tempoString)
+ end
+
+ timeSigString = reaper.GetExtState("Fanciest","TimeSigSet")
+ if timeSigString == "" then
+ ta1, ta2, ta3, ta4, ta5, newTimeSigNum, newTimeSigDenom, ta7 = reaper.GetTempoTimeSigMarker(0, reaper.FindTempoTimeSigMarker(0,currentPos))
+ else
+ newTimeSigNum,newTimeSigDenom = timeSigString:match("(.+):(.+)")
+ newTimeSigNum,newTimeSigDenom = tonumber(newTimeSigNum),tonumber(newTimeSigDenom)
+ end
+ --reaper.ShowConsoleMsg(reaper.FindTempoTimeSigMarker(0,5))
+ reaper.SetTempoTimeSigMarker(0, reaper.FindTempoTimeSigMarker(0,currentPos), 0, -1, -1, newTempo, newTimeSigNum, newTimeSigDenom, false)
+ reaper.DeleteExtState("Fanciest","TempoSet",false)
+ reaper.DeleteExtState("Fanciest","TimeSigSet",false)
+end
+
+TimeSig()
From 3dfeda22efea70c65fb6c7a310b35db9cf5fd086 Mon Sep 17 00:00:00 2001
From: rexendevar
Date: Fri, 3 Apr 2026 21:20:27 -0700
Subject: [PATCH 2/7] rxfx_TuringComplete: Move all subscripts to where the web
interface needs them to be
---
.../rxfx_CustomFancy_CycleTrackRecordArm.lua | 0
.../rxfx_CustomFancy_NewProject.lua | 0
.../rxfx_CustomFancy_OpenSelectedProject.lua | 0
.../rxfx_CustomFancy_ReadCurrentProject.lua | 0
.../rxfx_CustomFancy_RenameTrackFromExtState.lua | 0
.../rxfx_CustomFancy_SaveProjectAs.lua | 0
.../rxfx_CustomFancy_SendProjectList.lua | 0
.../rxfx_CustomFancy_SendTempo.lua | 0
.../rxfx_CustomFancy_SetTimeSelFromMarkers.lua | 0
.../rxfx_CustomFancy_SetTimeSig.lua | 0
10 files changed, 0 insertions(+), 0 deletions(-)
rename Various/{rxfx_TuringCompleteWebInterface => }/rxfx_CustomFancy_CycleTrackRecordArm.lua (100%)
rename Various/{rxfx_TuringCompleteWebInterface => }/rxfx_CustomFancy_NewProject.lua (100%)
rename Various/{rxfx_TuringCompleteWebInterface => }/rxfx_CustomFancy_OpenSelectedProject.lua (100%)
rename Various/{rxfx_TuringCompleteWebInterface => }/rxfx_CustomFancy_ReadCurrentProject.lua (100%)
rename Various/{rxfx_TuringCompleteWebInterface => }/rxfx_CustomFancy_RenameTrackFromExtState.lua (100%)
rename Various/{rxfx_TuringCompleteWebInterface => }/rxfx_CustomFancy_SaveProjectAs.lua (100%)
rename Various/{rxfx_TuringCompleteWebInterface => }/rxfx_CustomFancy_SendProjectList.lua (100%)
rename Various/{rxfx_TuringCompleteWebInterface => }/rxfx_CustomFancy_SendTempo.lua (100%)
rename Various/{rxfx_TuringCompleteWebInterface => }/rxfx_CustomFancy_SetTimeSelFromMarkers.lua (100%)
rename Various/{rxfx_TuringCompleteWebInterface => }/rxfx_CustomFancy_SetTimeSig.lua (100%)
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_CycleTrackRecordArm.lua b/Various/rxfx_CustomFancy_CycleTrackRecordArm.lua
similarity index 100%
rename from Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_CycleTrackRecordArm.lua
rename to Various/rxfx_CustomFancy_CycleTrackRecordArm.lua
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_NewProject.lua b/Various/rxfx_CustomFancy_NewProject.lua
similarity index 100%
rename from Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_NewProject.lua
rename to Various/rxfx_CustomFancy_NewProject.lua
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_OpenSelectedProject.lua b/Various/rxfx_CustomFancy_OpenSelectedProject.lua
similarity index 100%
rename from Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_OpenSelectedProject.lua
rename to Various/rxfx_CustomFancy_OpenSelectedProject.lua
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_ReadCurrentProject.lua b/Various/rxfx_CustomFancy_ReadCurrentProject.lua
similarity index 100%
rename from Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_ReadCurrentProject.lua
rename to Various/rxfx_CustomFancy_ReadCurrentProject.lua
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_RenameTrackFromExtState.lua b/Various/rxfx_CustomFancy_RenameTrackFromExtState.lua
similarity index 100%
rename from Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_RenameTrackFromExtState.lua
rename to Various/rxfx_CustomFancy_RenameTrackFromExtState.lua
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SaveProjectAs.lua b/Various/rxfx_CustomFancy_SaveProjectAs.lua
similarity index 100%
rename from Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SaveProjectAs.lua
rename to Various/rxfx_CustomFancy_SaveProjectAs.lua
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendProjectList.lua b/Various/rxfx_CustomFancy_SendProjectList.lua
similarity index 100%
rename from Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendProjectList.lua
rename to Various/rxfx_CustomFancy_SendProjectList.lua
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendTempo.lua b/Various/rxfx_CustomFancy_SendTempo.lua
similarity index 100%
rename from Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendTempo.lua
rename to Various/rxfx_CustomFancy_SendTempo.lua
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSelFromMarkers.lua b/Various/rxfx_CustomFancy_SetTimeSelFromMarkers.lua
similarity index 100%
rename from Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSelFromMarkers.lua
rename to Various/rxfx_CustomFancy_SetTimeSelFromMarkers.lua
diff --git a/Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSig.lua b/Various/rxfx_CustomFancy_SetTimeSig.lua
similarity index 100%
rename from Various/rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSig.lua
rename to Various/rxfx_CustomFancy_SetTimeSig.lua
From 6b7e7a1b2d75d7d22e0f7a28448eb960411c1e2d Mon Sep 17 00:00:00 2001
From: rexendevar
Date: Fri, 3 Apr 2026 21:30:17 -0700
Subject: [PATCH 3/7] rxfx_TuringComplete: pass validation (hopefully)
---
Various/rxfx_TuringCompleteWebInterface.lua | 412 ++++++++++----------
1 file changed, 206 insertions(+), 206 deletions(-)
diff --git a/Various/rxfx_TuringCompleteWebInterface.lua b/Various/rxfx_TuringCompleteWebInterface.lua
index d56d68c1f..7eb815ab6 100644
--- a/Various/rxfx_TuringCompleteWebInterface.lua
+++ b/Various/rxfx_TuringCompleteWebInterface.lua
@@ -2,16 +2,16 @@
-- @author Rek's Effeks
-- @version 0.alpha2
-- @provides
--- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_CycleTrackRecordArm.lua
--- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSelFromMarkers.lua
--- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_NewProject.lua
--- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_OpenSelectedProject.lua
--- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_ReadCurrentProject.lua
--- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_RenameTrackFromExtState.lua
--- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SaveProjectAs.lua
--- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendProjectList.lua
--- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SendTempo.lua
--- [main] rxfx_TuringCompleteWebInterface/rxfx_CustomFancy_SetTimeSig.lua
+-- [main] rxfx_CustomFancy_CycleTrackRecordArm.lua
+-- [main] rxfx_CustomFancy_SetTimeSelFromMarkers.lua
+-- [main] rxfx_CustomFancy_NewProject.lua
+-- [main] rxfx_CustomFancy_OpenSelectedProject.lua
+-- [main] rxfx_CustomFancy_ReadCurrentProject.lua
+-- [main] rxfx_CustomFancy_RenameTrackFromExtState.lua
+-- [main] rxfx_CustomFancy_SaveProjectAs.lua
+-- [main] rxfx_CustomFancy_SendProjectList.lua
+-- [main] rxfx_CustomFancy_SendTempo.lua
+-- [main] rxfx_CustomFancy_SetTimeSig.lua
-- @about
-- A web interface (adapted from Fancier.html) that can fully* control Reaper. Includes project save/load, basic track management, time selection controls and various bugfixes over the original.
--
@@ -43,7 +43,7 @@
+