Skip to content

Instantly share code, notes, and snippets.

@mumblequatch
mumblequatch / declick_dog_clicker.lua
Created June 6, 2026 15:06
Reaper Lua: remove dog-clicker double-clicks and ripple-close the gap (clip+isolation detection)
--[[
declick_dog_clicker.lua
Removes dog-clicker "double-clicks" from selected media item(s) and
ripple-closes the gap left behind, butting the surrounding audio together.
A dog clicker makes two sharp transients per actuation (press + release),
~100-250 ms apart. They record far hotter than dialogue (here they clip at
full scale while speech peaks ~0.3). This script:
1. Reads each selected item's audio.
@mumblequatch
mumblequatch / Delete_Empty_Tracks_No_Dependencies.lua
Last active May 26, 2026 23:32
Reaper: delete empty tracks that nothing depends on
-- Delete tracks that are empty and have no dependencies.
-- Skips tracks that:
-- * contain media items
-- * are folder parents (would orphan children)
-- * receive sends from other tracks
-- * have any visible envelope with points
local r = reaper
local function track_has_envelope_points(track)
@mumblequatch
mumblequatch / clipboard_type_gist.md
Created May 25, 2026 09:57
clipboard_type — KM tool that types clipboard contents as keystrokes instead of pasting

clipboard_type — paste-as-typing for macOS

A small Keyboard Maestro tool that reads the clipboard and types the contents as keystrokes via macOS System Events, instead of pasting. Useful for:

  • Fields that strip formatting on paste
  • Web forms with paste-disabled JS
  • Terminals / password fields / remote sessions where paste is unreliable
  • Any case where you want characters to arrive as if typed

Files

@mumblequatch
mumblequatch / grid_terminal_windows.applescript
Created May 21, 2026 01:07
grid_terminal_windows.applescript — tile/resize all Terminal.app or iTerm2 windows into a grid (canonical source: github.com/mumblequatch/scripts)
-- grid_terminal_windows.applescript
-- Arranges all windows of the active terminal app across the screen.
-- 1-3 windows : packed into a grid, NOT resized (each keeps its size).
-- 4-6 windows : RESIZED into a uniform 2-row grid, every window fully visible.
-- 7-9 windows : RESIZED into 3 rows -- rows 1-2 hold the six most-recently-
-- active windows at full size; row 3 holds the remaining
-- least-recently-active windows in a shorter strip.
-- 10+ windows : RESIZED into a uniform square-ish grid.
-- Works with Terminal.app and iTerm2.
-- Run: osascript ~/Scripts/grid_terminal_windows.applescript
@mumblequatch
mumblequatch / vo-site-writeup.md
Created May 19, 2026 19:50
thomaswoodrow.com/vo — a voice-artist site built in two days with Claude Code (writeup + architecture)
@mumblequatch
mumblequatch / Add_PinkNoise_Track_Below.lua
Created May 19, 2026 18:08
Reaper Lua: insert pink-noise track below selected, 1/2 -> 3/4 send
-- Insert a pink-noise calibration track immediately below the selected track.
-- Adds Liteon/pinknoisegen, disables master send, and routes the new track's
-- 1/2 to the selected track's 3/4 (auto-widening the parent to 4ch if needed).
local sel = reaper.GetSelectedTrack(0, 0)
if not sel then
reaper.ShowMessageBox("No track selected.", "Add Pink Noise Track Below", 0)
return
end
@mumblequatch
mumblequatch / B2_Backup_Maintenance.md
Created May 19, 2026 17:25
B2 Backup System — maintenance instructions (rclone + launchd, /Volumes/PERSONAL → B2, built 2026-05-19)

B2 Backup — Maintenance Instructions

Built: 2026-05-19
Covers: /Volumes/PERSONAL/b2:archive-main/PERSONAL/ (~3.59 TB photography master)
Cost: ~$30/month total ($99/yr Backblaze Personal + ~$22/mo B2)


The one thing you actually have to do

@mumblequatch
mumblequatch / image_optimize_km.sh
Created May 19, 2026 14:52
image_optimize_km.sh — Keyboard Maestro batch image optimizer (magick + pngquant) with a native one-shot NSAlert dialog
#!/bin/bash
# Image optimizer — Keyboard Maestro driver
#
# Thin wrapper around ImageMagick (+ pngquant for PNG output). Wire to a KM
# hotkey via a single "Execute Shell Script" action:
# ~/Scripts/image_optimize_km.sh
# (Set the action to "Ignore Results".)
#
# Flow:
# 1. Reads Finder selection (filtered to image files). Terminal args win if
@mumblequatch
mumblequatch / Render_Stale_Subproject_Proxies_Only.lua
Created May 18, 2026 15:44
Reaper Lua: refresh stale .rpp-PROX subproject proxies only (does NOT render the master). Companion to Render_Stale_Subproject_Proxies_Then_Master.lua.
-- Render_Stale_Subproject_Proxies_Only.lua
--
-- Run from a master project. Flow:
-- 1. If the master or any open referenced subproject tab is dirty, prompt
-- to save them all. (Subprojects MUST be saved -- their on-disk .rpp is
-- what gets rendered into the .rpp-PROX.)
-- 2. Build stale list from on-disk mtimes (.rpp newer than .rpp-PROX).
-- Subprojects that are currently dirty AND were NOT saved in step 1
-- are excluded -- we won't render an out-of-date on-disk version when
-- there are unsaved edits in memory.
@mumblequatch
mumblequatch / Jump_Between_Subproject_And_Parent_At_Cursor.lua
Created May 16, 2026 16:37
Reaper: solo-selected toggle + subproject/parent cursor jump
-- Jump between subproject and parent at the matching time position.
-- If the current project has a subproject item under the cursor, jump into
-- that subproject's tab at the corresponding internal time.
-- Otherwise, if the current project is itself referenced as a subproject
-- inside another open project, jump up to the parent at the mapped time.
local function get_source_path(take)
if not take then return nil end
local src = reaper.GetMediaItemTake_Source(take)
if not src then return nil end