🎚️ Zorgan Tools: HYDRA SANITY - LIFE PRODUCTION ENGINE FOR HYDRA AUTOMATION and MIDI controller endless increment, absolute and others

:dragon: HYDRA SANITY (v7.67 THE APEX ENGINE)

Safe MIDI Routing + PAD Bridge | Hybrid Intent Execution | Absolute Math

:dna: 0. SYSTEM PHILOSOPHY & PURPOSE

HYDRA SANITY is not a simple automation recorder. It is a deterministic real-time signal processor for human input.

This tool is designed to make working with GRAPH automation easier, specifically when using HYDRA. You can control multiple MIDI coders at once and your graphs are written safely and cleanly using extended functions for encoders, faders, and endless coders. It acts as an extended command center for recording and working with multiple HYDRA elements at the same time. Instead of simply overwriting points, the engine analyzes the signal, calculates momentum, and writes only actual value changes, keeping the curves perfectly clean and smooth.


:hammer_and_wrench: 1. INSTALLATION & QUICK START

  • Installation: Simply drag and drop the downloaded .xrnx file anywhere into the Renoise window. The application will prompt you to install the tool.
  • Launch: Open the GUI via the top menu: Tools > Zorgan > HYDRA SANITY.
  • Shortcuts: You can assign a global keyboard shortcut (Preferences > Keys > Global > Hydra Sanity > Show GUI) or a MIDI trigger to instantly toggle the tool window.
  • Auto-Start: The monitoring engine starts automatically the moment the GUI is invoked.

:electric_plug: 2. CUSTOM MIDI MAPPING & OSC SERVER (Critical!)

Hydra Sanity uses its own dedicated MIDI mapping environment to intercept and process hardware data before it reaches the DAW sequencer.

  • The Golden Rule: Do NOT rely on Renoise’s native CTRL+M MIDI mapping for parameters controlled by Hydra Sanity. You must assign your faders and knobs ONLY via the L (Learn) buttons inside the Hydra Sanity interface.
  • Shared Hardware (Playing Notes + Automation): Because Hydra intercepts the selected MIDI port, Renoise normally stops receiving MIDI notes from that device.
  • The OSC Solution: To use the same MIDI device for playing instruments in Renoise AND recording automation in Hydra, the tool bridges the gap using a local network connection.
  • Setup: You must enable the OSC server in Renoise (Preferences > OSC > Enable OSC Server). Ensure the port matches the OSC Port in Hydra’s GUI (default is 8000).

:control_knobs: 3. GLOBAL CONTROLS & MULTI-RECORDING

The tool automatically scans your project and lists every Hydra device instance across all tracks. You can arm (REC ON) multiple Hydra devices simultaneously, allowing you to record complex multi-fader performances live.

Global Interface

  • MIDI Port / OSC Port: Select your hardware controller and the internal OSC routing port.
  • START / STOP ENGINE: The main power switch. If it is not glowing red, the engine ignores MIDI input.
  • RESCAN: Click this to update the list if you add or remove a Hydra device in your project.
  • MIDI ENC / MIDI DEC: Enables Absolute Encoder Sync (MIDI Feedback) for motorized faders and endless encoders with LED rings to sync their physical position with the DAW.
  • RESET ALL CC: A global safety override. Safely unmaps every single CC routing in the tool to prevent hardware configuration collisions.
  • SMOOTH PULL: Adjusts the inertia/elasticity of the curve when returning to its baseline state (the “ironing” strength).

Seamless Transport Modes

Switch between these modes on the fly during live playback without audio dropouts:

  • REC PLAY NOTE & Automation: Toggles native Renoise Edit Mode and playback to record both notes and curves.
  • REC PLAY Automation: Starts playback but explicitly disables Edit Mode. This safety feature ensures you only write automation without accidentally overwriting pattern notes.
  • PLAY / PAUSE (Safe Listen): Temporarily disables all active Hydra REC states. Safely preview your track; once paused, your previously armed recording states are instantly restored.
  • FOLLOW ON / OFF: A bi-directional toggle for Renoise’s native “Follow Song Position”.

Per-Device Controls

  • REC ON/OFF: Arms the specific Hydra for recording.
  • Learn Buttons (W / L): Click L to arm (turns into a red W), then move your hardware controller to map it. You can map three distinct actions per track:
    • REC CC: Toggles REC ON/OFF remotely.
    • LATCH CC: Activates LATCH mode remotely.
    • Encoder CC: The main fader/knob used to draw the graph.
  • LATCH: When the fader is released, the curve does not snap back but retains its trajectory, freezing on the spot (Hold) or creating a smooth fade into future points.
  • ◄◄◄ (Focus): Instantly jumps the Renoise lower frame to the automation lane of this specific Hydra.
  • :right_arrow_curving_left: (Return): Instantly restores your previous track/device selection after editing.

:brain: 4. THE SIGNAL SYNTHESIS ENGINE (Under the Hood)

  • Sparse Automation Engine: Writes points only when a real value or directional change occurs. The result is a minimal point count and massive performance savings.
  • IRON Mode (Smoothing): An intelligent mode that, when REC ON is active but the fader is untouched, gently “irons” the existing automation, creating cleaner, more musical curves without manual rewriting.
  • Smart Mute/Solo Protection (New in v7.67): The engine natively observes Track and Group Mute/Solo states. If you mute a track with a Hydra, the engine automatically drops its REC ON state to prevent invisible background overwrites, and intelligently restores it when unmuted.
  • Quadratic Bezier Smoothing: Provides organic, fluid automation curves that respect motion momentum instead of harsh linear extrapolation.
  • Project State Saving: No external config files. All active ports, armed REC states, and CC mappings are safely saved directly inside your .xrns song file.

:musical_keyboard: 5. THE ZORGAN ECOSYSTEM

Hydra Sanity is designed to work perfectly in tandem with the MIDI PADS to Controll Tracks tool.
Clicking the PADs tool button in the main GUI instantly launches this sister tool. Together, they utilize an invisible, lightning-fast IPC Event Bus that ensures instantaneous state synchronization (Track Select, Mute, Solo) between both tools without freezing the GUI or losing data. This synergy creates the ultimate hands-free live electronic music production environment.

📜 6. COMPLETE CHANGELOG

6. COMPLETE CHANGELOG

:rocket: HYDRA SANITY v7.67 THE APEX ENGINE - IPC EVENT BUS & MUTE MEMORY

(Changelog v7.65 ➔ v7.67)

  • Ecosystem (IPC Event Bus): Engineered a robust, real-time Inter-Process Communication (IPC) bridge between Hydra Sanity and the MIDI PADs to Controll Tracks tool using a non-destructive renoise.song().tool_data duplex channel. This allows instant, bidirectional synchronization for track selection, focus, and arm states.
  • Logic (Smart Mute/Solo Protection): The engine now natively observes Track and Group Parent Mute/Solo states. When a track is muted or out-soloed, Hydra dynamically disarms its active recording state to prevent accidental invisible automation writes, safely storing the original intent in memory. Upon unmuting, the previous active state is intelligently restored.
  • Architecture (Performance Throttling): Deprecated the unstable tool_data_observable in favor of a highly optimized, 20Hz throttled event polling mechanism natively integrated into the master app_idle_observable loop. This prevents UI freezing, eliminates heavy string parsing overhead, and fixes API crashes on project initialization.
  • Architecture (Lexical Scope Hoisting Fix): Executed a massive structural refactor utilizing strict forward declarations for all core local functions (e.g., set_intent, check_all_mutes). This definitively eradicates elusive Lua runtime crashes caused by cyclic dependencies when the engine is triggered before the GUI is fully instanced.
  • Failsafe (Deterministic Parsing): Implemented an anchored greedy regex layer (.*ZORGAN_EVT|...$) for processing incoming cross-tool events. This guarantees the engine strictly resolves the absolute latest event, explicitly ignoring malformed trailing string garbage, and future-proofs the system for potential batch-event queues.
  • Failsafe (MIDI Device Validation): Engineered a robust fallback validator (get_valid_midi_device) for MIDI hardware. If a previously saved MIDI device is disconnected or unavailable upon project load, the engine intelligently falls back to a safe state (“None” or the first available port) instead of throwing missing port errors, ensuring seamless cross-studio project sharing.

:rocket: Older Key Updates

  • v7.65 (The Great Purge): Implemented a global RESET ALL CC safety override button to instantly wipe the entire tool’s MIDI CC routing map during hardware collisions. Purged memory leaks from dead “Hold” phases.
  • v7.64 (Zombie State Purge): Fixed an issue where unexpectedly toggling off recording mid-fader movement trapped the engine in a visual/data loop. The engine now guarantees a pristine reset to the neutral IRON mode.
  • v7.63 (Clean Start): Solved initialization anomalies. The tool now guarantees all parameters boot with a clean slate independently of the last saved wild performance.
  • v7.62 (Hybrid Intent): Integrated “Race Condition” protection (thread collision safeguards) and advanced visual GUI indications (dynamic color changes for LATCH and REC states).

I’m working on a better logic for the whole engine now and there will be improved controls… for releasing the fader you can have the fader level written to it by pressing the LATCH button, when you use the fader it will remember that it should write the same level at the end for the next use of the fader. Implementation of using OSC server, client so that MIDI keys can also be used = midi controller for the hydra sanity engine and MIDI NOTE keys for Renoise. Implementation of cache for less engine load, etc. In the future, pad control for switching track - instrument, solo/mute and more will be added.

1 Like

Thank you all for your patience. My zeal to bring this engine for HYDRA automation to the light of day kept me going. And finally I released version 7.0… which is now the final clean version, no scratches, no other playback issues, it’s definitely native playback, ultimate clean.

1 Like
📝 CHANGELOG

v7.1 - The UI & Workflow Integration Update

  • Feature: Auto-start! The monitoring engine now automatically starts the moment the GUI is invoked.
  • Feature: Added global Keybinding and MIDI mapping support for toggling the GUI window.
  • Feature: Added ◄◄◄ focus button to instantly jump to a specific Hydra’s automation lane in the Renoise lower frame.
  • Feature: Added Quick Return button to instantly restore the previous track/device selection after editing curves.
  • UI/UX: Overhauled transport buttons (REC NOTE & Automation and REC Automation) to explicitly manage Renoise Edit Mode and prevent accidental pattern overwriting.
  • UI/UX: Implemented semantic color-coding for CC# learn buttons (Red, Purple, Orange, Teal).
  • UI/UX: Renamed the hardware lock icon to HOLD ►► for clean cross-platform ASCII rendering.

v7.0 - The Signal Synthesis (Paradigm Shift)

  • Architecture: Introduced the Continuous Signal Buffer (CSB).
  • Fix: Completely removed the destructive clear_range method. Future points are no longer constantly overwritten, eliminating all zipper noise.
  • Logic: Re-engineered Release logic. Velocity vectors instantly zero out upon fader release for perfect flat-line holds.

v7.12 - The Seamless Transport Update

  • Feature: Seamless “on-the-fly” switching between all transport modes (“REC PLAY NOTE & Automation”, “REC PLAY Automation”, and “Safe Listen”) during playback.
  • Logic: Switching to a different transport mode while the song is playing no longer triggers a pause. The engine now dynamically transitions to the new mode, instantly saving or restoring “REC ON” armed states as needed.
  • Logic: Playback will now only pause if you trigger the explicitly currently active transport mode.
  • Scope: Smooth transport transitions are fully supported via both GUI buttons and external MIDI controller triggers.

Change Log
v7.13 - The Pattern Focus & UI Polish Update

  • Feature: Added an interactive “FOLLOW ON / OFF” button to the main GUI to easily toggle Renoise’s native “Follow Song Position”.

  • Feature: Bi-directional visual sync. The new Follow button automatically updates its state even if toggled externally (e.g., via the Scroll Lock key in Renoise).

  • Logic: Activating the “REC PLAY NOTE & Automation” mode (via GUI or MIDI) now automatically enables the Follow player, ensuring you always see the active pattern line you are recording into.

  • UI/UX: Adjusted the active/paused colors for the transport buttons (“REC PLAY Automation”, “Safe Listen”) and the new “FOLLOW” button. They now use a neutral, comfortable dark orange, significantly reducing eye strain in dark DAW environments.

:memo: CHANGELOG

v7.15 – The Crystal Continuity Update**

  • Fix (Ghost Points): Implemented a just_restored guard mechanism that definitively eliminates stray points and unwanted spikes in the automation graph when switching between transport modes.

  • Hard Reset Logic: The restore_armed_states function now performs a deep reset of all runtime registers (MIDI history, buffer, and prediction), ensuring that any new recording starts from an absolutely clean state.
    *First-Frame Protection: Introduced a safety delay that automatically bypasses the first computational frame after a state restore. This allows internal registers to synchronize with the current Renoise parameters before any new automation points are written.

  • Logic Continuity:The protection mechanism has been integrated into the recover_state function to maintain mathematical curve integrity even during critical mode transitions.
    BEFORE:

now when switching from PLAY safe mode to PLAY REC … the GRAPH is clean without glitch

What is another LEVEL of editing in this HYDRA SANITY engine … is that you can safely draw a graph with a fader, a coder and next to it you can correct what you want to change with a pencil. This should speed up the processing of the automation line …
I would be happy to respond… I would be happy to answer any further questions…

1 Like

v7.35 – The Signal Synthesis (Update)

  • Smart Echo Cancellation: Replaced the legacy “blind” message blocking with a precise, content-aware filter. The engine now intelligently compares incoming MIDI against the last_sent_value within a 30ms window, preventing the accidental dropping of real physical fader movements during bi-directional synchronization.

  • Boundary Transparency: Absolute edge values (0 and 127) now bypass all jitter and echo filters. This ensures immediate delivery of boundary data to the engine and instant stabilization of Bezier prediction, permanently eliminating “bounces” or curve hallucinations at fader extremes.

  • Auto-Kill HOLD on Record: Improved user workflow (Quality of Life). Activating the record state (switching from REC OFF to REC ON) now automatically and safely terminates any active HOLD state. This protects the user from forgotten static automation blocking new live data input.

v7.31 – The Signal Synthesis

  • Quadratic Bezier Smoothing: Replaced linear extrapolation with a Quadratic Bezier sampling engine for organic, fluid automation curves that respect motion momentum.

  • Signal-Driven Rendering: Transitioned from input-driven to continuous signal-driven processing, eliminating “zipper noise” and oscillations near the playhead caused by irregular MIDI data flow.

  • Adaptive Confidence Blending: Implemented an intelligent trust model that dynamically blends between physical MIDI input and the predictive buffer based on movement speed, ensuring micro-jitter stability.

  • Anti-Averaging Logic: Eliminated the MIDI accumulator bug; the engine now registers the absolute latest physical hardware position with zero latency, preserving high-speed transients and sharp peaks.

  • Smart Hold Tolerance: Introduced time-based hysteresis for fader activity, providing a massive 1.5s hold window at edge values (0/127) to prevent accidental release while maintaining precise 0.6s responsiveness during active movement.

  • Edge Stability Guard: Implemented a residual motion “kill-switch” at automation boundaries to prevent the predictive engine from pulling the signal back from absolute minimum or maximum values.

  • Mutual Mode Exclusion: Hardcoded logic to prevent UI conflicts by ensuring HOLD and LATCH modes are mutually exclusive, maintaining a clean and predictable state machine.

  • Absolute Encoder Sync: Added a dedicated “Absolute Encoder Sync” (MIDI Feedback) handshake to synchronize hardware controllers with current automation values upon engagement.

    Hydra Sanity allows you to instantly toggle (show/hide) its main interface using your computer keyboard or a dedicated button on your MIDI controller. Because the engine automatically starts monitoring when the GUI opens, this is the fastest way to drop into a live recording session.

The engine HYDRA SANITY in version 7.36 is optimized for the fastest possible response using a new Dynamic Time-Aware architecture. To conquer the hardware limits of the DAW’s GUI thread at extreme tempos (e.g., 180+ BPM / 8+ LPB), we introduced O(1) Lane Caching, which eliminates thousands of redundant API queries per second. The engine now dynamically calculates the real-world time per line (compensating for current BPM and LPB) to adaptively scale its Bezier prediction lookahead, ensuring a rock-solid 150ms safety buffer regardless of playback speed.

Furthermore, a new CSB Gap Filler automatically detects and mathematically patches any skipped automation lines caused by graphical thread lag, while Single Batch pcall execution drastically reduces computational overhead. This guarantees perfect, uninterrupted signal rendering and zero-latency input translation even under the most demanding live performance conditions.

I didn’t believe I would be able to do it, to make a nimble fast engine that would have crystal logic and very good latency … And here it is … Tested at BPM 130 and LPB 8 … it handles it easily …
Which is a big leap compared to how I started with the design. I’ve been at it for 4 days now and I have to say that it has trained me in an incredible way. From understanding the Renoise API to C++ programming algorithms… An incredible amount of work behind me, by the way, you can also find the log in README.md. I’m trying to keep the descriptions of individual functions and logic in main.lua. It works … Writing, ironing automation HYDRA graphs in real time all at once … other amazing things are already working nimble!

:rocket: HYDRA SANITY v7.49 - The Perfect Snap Engine (Complete Changelog)

  1. O(N²) Performance Death Spiral & API Overload (v7.36 - v7.41)

Problem: At high BPM and LPB the engine froze massively. Linear iteration through thousands of points and constant rewriting of the same values ​​to the Renoise C++ API was killing the performance of the entire DAW.

Solution: Deployed lightning fast O(log N) Binary Search for reading curves. Implemented safe_write with O(1) Integer-based Dedup Cache (smart memory for deduplication with zero load on the Garbage Collector), which completely prevented API spamming. Added Adaptive Load Scaling (reducing write density under extreme load) and Sliding Automation Window, which dynamically deletes old points far from the playhead.

  1. Sparse Automation & Point-Preserving Modifiers (v7.44)

Problem: Modifiers (HOLD, LATCH, IRON) behaved like generators – they constantly created new points and irreversibly destroyed the structure and topology of the original graph (Dense Overwrite).

Solution: Fundamental transition to Sparse Writer Logic. The engine stopped recording the passing time and started recording only signal changes (change of direction, exceeding threshold limits). Modifiers became “Point-Preserving” – instead of overwriting reality, they only modify the height (Y-axis) of existing nodes in the grid.

  1. Continuous Float Time & The Sweep Override (v7.46 - v7.47)

Problem: Renoise automation runs in continuous time (float), not exactly on whole lines. Our grid-based writing missed old float points (e.g. 23.42), which left “teeth” and residual noise in the graph.

Solution: Range-Based Engine with Epsilon tolerance (EPS = 0.01) is used. WRITE mode (physical touch of the fader) has received God Mode Sweep (clear_range) – it works like a bulldozer that completely cleans its surroundings [line - 0.5, line + 1.5] before writing a new clean point, making the track absolutely dominant.

  1. Residual Velocity Tail & The Snap Release (v7.48)

Problem: When releasing the fader, the running CSB inertia generated a small, unwanted ramp-up arc before the curve finally settled to a flat plane.

Solution: Implementation of Hard Stop Velocity. When releasing the fader, the inertia is immediately reset to zero, the value is frozen and the engine performs an Ultra Clean Release – it instantly erases all predicted lookahead artifacts up to 8 lines into the future.

  1. The Geometric Trap & Pure Curve Smoothing (v7.49)

Problem: The Iron (IRON) would sometimes drop to 0.5 on startup and draw a dead straight line. It was accidentally averaging the live curve values ​​with the physical fader still.

Solution: Perfect decoupling of the IRON mode from the physical fader. The Iron now works as a pure Moving Average Filter directly on the curve – it takes the previous and future real point from the graph, finds their geometric center and elastically pulls the nodes towards it. Zero jumps, pure DAW surgery.

Now I’m solving the HOLD and LATCH buttons…

:rocket: HYDRA SANITY v7.52 THE APEX ENGINE - ABSOLUTE MATH & EDGE LAYER

(Changelog v7.50 ➔ v7.52)

1. Transition to Event-Driven Architecture (End of State-Fighting)

  • Problem: The engine previously ticked as a Frame-Based State Machine, which caused collisions in one frame (e.g. infinite oscillation between IRON and HOLD states).
  • Solution: Edge-Driven Logic (edge ​​detection) introduced. The engine changes modes only when a real state change occurs (added sticky_state_prev register). The modes no longer fight each other.

2. LATCH Atomic Lock

  • Issue: There were 1-frame vulnerabilities where the LATCH initialization process could be interrupted by the activation of another state.
  • Solution: Implemented latch_lock. Once LATCH_INIT is triggered and the ramp is drawn, the engine locks and ignores external interference until LATCH_WAIT safely runs out and passes the baton back to the iron.

3. HOLD State Snapshot and God Mode Planes (End of Ghosting)

  • Issue: When switching to HOLD, the engine took an unstable “live” value, which led to drifting. In addition, simply writing points failed to overwrite the old accumulated points.
  • Solution: Added hold_value register to create an instant “snapshot” of the value upon activation. STICKY_HOLD itself now uses clear_range as a bulldozer - it erases the noise around [cur_l - 0.25, cur_l + 0.75] and then places a single anchor point. The result is a mathematically perfect and clean plane.

4. Float Epsilon Tolerance (Micro-point Capture)

  • Problem: get_exact_point (or a small window EPS = 0.01) was missing points lying in float gaps (e.g. 23.42, 23.91), leaving residual “teeth” on the curve.
  • Solution: Epsilon window extended to EPS = 0.25. process_line_points now works as a 100% capture network that will not miss a single float sub-point on the line.

5. IRON Anti-Overshoot Protection (Safe Clamp)

  • Problem: A high multiplier (pull = 1.6) caused the algorithm in the iron to aggressively “undershoot” or “overshoot” the real signal during sudden movements and cut under the curve.
  • Solution: Added dynamic math.min and math.max clamps to the target calculation based on neighboring points. The curve now elastically smooths, but never breaks through the natural geometric boundaries of its surroundings.

6. Hard Timeout and Extreme Edges (Removing “Bounce from 127”)

  • Problem: After physically releasing the fader at extreme values ​​(0 or 127), the engine still waited 1.5 seconds (assuming that the user was still holding the stop), thereby ignoring other inputs, and LATCH sometimes remained stuck in a flashing “ARMED” state.
  • Solution: Introduced asynchronous detector hard_timeout = 0.15 (150 ms of silence triggers immediate release) and shortened release tolerance for boundary values ​​(is_pinned) to 0.2s. Engine now releases fader immediately and safely cancels sticky_pre_arm.

7. Lua Scope Bug Fix (Forward Declaration)

  • Problem: get_interpolated_value is not declared crash caused by file parsing hierarchy after adding a new function.
  • Solution: Safely introduced forward declaration in header, eliminating local shadow functions and ensuring reliable linking without the need to chaotically move entire engine blocks.

Supreme Victory … next LEVEL HYDRA SANITY The Apex Engine is here … v7.58

Tested at BPM 180 and LPB 12 … the HYDRA SANITY THE APEX ENGINE engine works stably without any obvious CPU load … the graph is drawn smoothly, the iron is accurate, the modified graphical environment, the LATCH / STICK function for writing also works reliably. No extra points, accurate writing.

  -- HYDRA SANITY (v7.59 THE APEX ENGINE - ABSOLUTE MATH & EDGE LAYER) -- 

-- SPARSE OVERRIDE + O(log N) ENGINE + CLEAN LATCH + SMART GC + SAFE CLAMPS – =============================================================================

Kudos to the main fix for a good startup, loading saved data from a file, maintaining backward compatibility of data for loading the old data structure from the song file… combed variables when the engine first starts… hopefully it will look like a professional tool now.

:rocket: HYDRA SANITY v7.63 THE APEX ENGINE - CLEAN START & SAFE CLAMPS

(Changelog v7.62 ➔ v7.63)

  • Architecture: Fixed the “Dirty State” and “Stubborn Hydra” initialization anomaly. Volatile runtime performance states (STICKY_HOLD and LOCK) have been formally stripped from the .xrns save/load array context. Hydras now reliably initialize into a clean IRON mode irrespective of previous session states, eliminating disruptive zero-snapping during the first hardware engagement.
  • Architecture: Comprehensive multi-array flush sequence added to the engine initialization block (scan_and_arm), guaranteeing clinically clean memory states during manual RESCAN or core re-boots.
  • UI/UX: Eradicated visual crosstalk on the Focus Arrow ◄◄◄ buttons. Illumination states are now strictly bound solely to actual hardware transmission events (MIDI_INC), disassociating them entirely from the internal UI Intent logic loop.

:rocket: HYDRA SANITY v7.62 THE APEX ENGINE - HYBRID INTENT ARCHITECTURE

(Changelog v7.59 ➔ v7.62)

  • Architecture: Implemented the “Hybrid Intent Execution” pattern. User interactions (via UI or hardware) no longer manipulate the core engine state concurrently during active MIDI signal recording. Instead, actions queue a resilient sticky_intent (ON or OFF) via a dedicated Micro-API.
  • Logic: The engine now evaluates and strictly executes queued intents only during the guaranteed safe “release” window (when hardware drops contact), radically eliminating data race conditions and rendering artifacts.
  • Logic: Built-in “Race Condition Clock Lock”. Binds a timestamp to every UI intent. This strictly prevents identical-frame mechanical fader bounce errors from pre-emptively executing an intent before the GUI cycle has successfully registered and communicated the state to the user.
  • UX/UI: Advanced visual indication for cyclical modes. The LATCH control dynamically transitions colors and textual context (e.g., blinking ARM ON, deep-red blinking ARM OFF) strictly responding to the derived get_effective_mode state machine, providing a professional and predictable mixing desk experience.
  • Failsafe: Integrated an absolute transport STOP listener and multi-device cleanup protocols (scan_and_arm, restore_armed_states) to intelligently clear out unresolved intents, strictly mitigating “zombie” states that persist between playback cycles.
  • Failsafe: Interactive user commands against locked states now broadcast an explicit STICKY LOCK ACTIVE message to the Renoise status bar rather than failing silently, vastly improving UI clarity.

:rocket: HYDRA SANITY v7.65 THE APEX ENGINE - THE GREAT PURGE & RESET TOOL

(Changelog v7.64 ➔ v7.65)

  • Architecture: Completely eradicated all legacy “HOLD” locking logic (lock_sticky_states, hydra_lock_ccs) from the core engine, memory mapping, GUI constraints, and MIDI callbacks. This “Great Purge” finally disconnects old saved MIDI controllers that were silently interfering with the new Hybrid Intent Architecture on the backend.
  • UI/UX: Introduced a global RESET ALL CC safety override button. Protected by a prompt dialog, this feature allows users to instantly wipe the entire tool’s MIDI CC routing map (both global transport constraints and individual Hydra instances) to resolve severe hardware configuration collisions immediately.
  • UI/UX: Re-engineered the top layout grouping (STOP ENGINE, RESCAN, MIDI ENC, RESET ALL CC) with equalized dimensions (width = 130px) for optimal interface scaling.

:rocket: HYDRA SANITY v7.64 THE APEX ENGINE - THE ZOMBIE STATE PURGE

(Changelog v7.63 ➔ v7.64)

  • Failsafe: Implemented a strict cleanup protocol when toggling a device’s global REC OFF. Previously, interrupting an active fader movement (MIDI_INC) by abruptly clicking REC OFF would leave the GUI and internal state machine trapped in a “zombie” visual state (frozen orange arrows). The engine now explicitly flushes these dangling states and forces an immediate return to IRON mode, ensuring a pristine GUI reset.

:control_knobs:Zorgan Tools: Renoise Tool Development HYDRA SANITY v7.67 & MIDI PADs to Control Tracks v2.97

This system consists of two independent yet tightly integrated tools for Renoise, working together to create a powerful real-time environment for track control, MIDI interaction, automation shaping, and expressive sound design.

:brain: 1. HYDRA SANITY

:bullseye: Purpose

HYDRA SANITY is an advanced tool designed not only for Hydra device control, but also for:

  • real-time automation shaping and curve drawing

  • smooth parameter modulation (synthesis-like control)

  • managing and controlling Hydra devices within a project

  • handling ARM / MUTE / SOLO logic

  • preventing unwanted state changes (safe states)


:gear: What it does

  • :bar_chart: monitors all track states (mute, solo, group hierarchy)

  • :level_slider: controls Hydra automation lanes with continuous, smooth parameter changes

  • :chart_increasing: enables drawing and generating automation curves (not just switching values)

  • :control_knobs: allows expressive control similar to synthesis modulation

  • :locked: provides “safe playback” modes for controlled recording

  • :counterclockwise_arrows_button: keeps GUI synchronized with the project state

  • :musical_keyboard: reacts to MIDI input, automation, and Renoise UI changes


:light_bulb: Benefit

HYDRA SANITY acts as a central control and modulation engine, enabling:

  • fluid automation instead of static steps

  • expressive parameter control (like a synth modulation system)

  • safe and predictable behavior during playback and recording


:floppy_disk: Save to Song (Persistent Configuration)

HYDRA SANITY stores its configuration directly in:

renoise.song().tool_data

This includes:

  • selected MIDI device

  • OSC settings

  • CC mappings

  • device states (ARM, sticky, etc.)

:check_mark: settings are saved with the project
:check_mark: automatically restored when reopening the song
:check_mark: safely separated from IPC events using a structured format


:control_knobs: 2. MIDI PADs to Control Tracks

:bullseye: Purpose

This tool serves as a real-time hardware control interface, allowing intuitive interaction with tracks using a MIDI pad controller.


:gear: What it does

  • :musical_keyboard: maps MIDI pads to tracks

  • :backhand_index_pointing_up: responds to gestures:

  • short press → SELECT track

  • strong press → MUTE

  • hold → SOLO

  • :artist_palette: displays real-time track states in GUI

  • :computer_mouse: synchronizes with Renoise track selection (mouse + UI)

  • :high_voltage: enables fast navigation across groups and tracks


:light_bulb: Benefit

The PAD tool provides:

  • fast, tactile control

  • reduced reliance on mouse interaction

  • performance-ready workflow


:musical_keyboard: Keybindings & MIDI Mapping Support

Both tools support full integration with Renoise input systems:

:check_mark: Keybindings

  • assign keyboard shortcuts to:

  • open/close tool GUI

  • toggle engine states

  • trigger specific actions

:check_mark: MIDI Mapping

  • assign MIDI controls to:

  • open tool interfaces

  • trigger functions directly from hardware

  • integrate with external controllers seamlessly

:backhand_index_pointing_right: This allows instant access to tools without navigating menus, making the system ideal for live workflows.


:link: INTEGRATION BETWEEN BOTH TOOLS

:brain: Core Principle

Both tools communicate via:

renoise.song().tool_data

Which acts as an:

event-based communication bus (IPC) between sandboxed Renoise tools


:counterclockwise_arrows_button: How it works

PAD TOOL → HYDRA

ZORGAN_EVT|PAD_SELECT|track|timestamp
ZORGAN_EVT|PAD_MUTE|track|timestamp
ZORGAN_EVT|PAD_SOLO|track|timestamp

:backhand_index_pointing_right: HYDRA:

  • receives events

  • updates automation and logic

  • reacts in real time


HYDRA → PAD TOOL

ZORGAN_EVT|HYDRA_UPDATE|track|timestamp

:backhand_index_pointing_right: PAD tool:

  • updates GUI

  • synchronizes visual feedback


:gear: Technical Implementation

  • :repeat_button: polling via app_idle_observable

  • :brain: anti-duplicate protection (timestamp-based)

  • :magnifying_glass_tilted_left: robust parsing (regex with end anchoring)

  • :puzzle_piece: separation of config and events (||| delimiter)


:rocket: KEY ADVANTAGES OF USING BOTH TOOLS


:high_voltage: 1. Real-time expressive control

:check_mark: continuous parameter modulation
:check_mark: automation behaves like synthesis
:check_mark: no stepping — smooth transitions


:bullseye: 2. Unified control system

:check_mark: HYDRA = logic + modulation engine
:check_mark: PAD tool = physical control layer
:check_mark: perfectly synchronized


:control_knobs: 3. Performance-ready workflow

:check_mark: hardware-driven interaction
:check_mark: minimal mouse usage
:check_mark: instant response


:locked: 4. Stability & safety

:check_mark: no data corruption
:check_mark: no race conditions
:check_mark: safe across engine restarts


:brain: 5. Event-driven architecture

:check_mark: efficient communication
:check_mark: low CPU usage
:check_mark: scalable design


:link: 6. Extensibility

Ready for future expansion:

  • :control_knobs: MIDI LED feedback

  • :globe_with_meridians: OSC communication

  • :artist_palette: advanced visualization

  • :high_voltage: event batching


:chequered_flag: SUMMARY

HYDRA SANITY and MIDI PADs together form:

a real-time control and modulation system for Renoise

Where:

  • HYDRA = :brain: logic, automation, modulation

  • PADs = :control_knobs: physical interaction

  • IPC = :link: communication layer


:speech_balloon: IN ONE SENTENCE

:backhand_index_pointing_right: This system enables real-time, expressive control of tracks, automation curves, and Hydra devices in Renoise using MIDI hardware — combining performance workflow

:level_slider: PRO-GRADE VISUAL FEEDBACK (New in v7.68)

The engine is now equipped with highly optimized “live” monitoring, giving you absolute control over your hardware’s performance in relation to the DAW.

  • Live Idle Metering: LCD meters now respond to your physical controller in real-time even when Renoise is stopped (STOP), behaving like a real hardware mixing console.

  • Ghost Meter (Live vs. Graph): A breakthrough visualization showing two values simultaneously on a single line: a solid block (▰) represents the current physical fader position, while a shadow block (▱) indicates the existing automation curve at the cursor position. This allows you to see exactly how to adjust your fader to seamlessly pick up from the existing graph.

  • Peak Hold (Peak Memory): A professional feature found on hardware mixers; a visual notch (|) remembers your maximum reached value for 1.5 seconds, perfect for tracking fast, aggressive fader movements.

  • Dynamic Color States: Peripheral vision is critical during live performances; meters now dynamically change color based on the engine state: :blue_circle: Blue (Idle/Stop/Reading curve), :red_circle: Red (Rec On/Live overwrite), :orange_circle: Orange (Latch/Sticky Hold).

📜 CHANGELOG v7.68 THE APEX ENGINE

:rocket: HYDRA SANITY v7.68 THE APEX ENGINE - LIVE METERING & PRO VISUALS (Changes from v7.67 ➔ v7.68)

  • GUI / Visuals (Pro-Grade LCD Bar): Completely rewritten rendering engine for LCD meters; instead of simply displaying a single value, the meter now constructs a complex image using safe “table indexing,” absolutely eliminating the risk of Unicode character corruption or “garbled text” during aggressive updates.

  • GUI / Visuals (Ghost Metering & Peak Hold): Introduced advanced dual visualization; the engine now overlays the “shadow” of the original automation with the “solid” line of the physical hardware fader, plus an integrated 1.5s Peak Hold timer for peak indication.

  • GUI / Visuals (Color States): Meters now dynamically change color (Blue / Red / Orange) based on whether the hardware is idle, overwriting data, or holding a LATCH state.

  • Engine (Live Idle Monitoring): A revolutionary change in data reading; the engine now bypasses transport dependency, meaning in STOP mode, the engine reads raw MIDI data and visualizes it instantly, turning Hydra Sanity into a live hardware mixer.

  • Workflow (GO TO ROW 00): Added a new navigation button; one click instantly moves the playback_pos (transport) to the first row of the current pattern, regardless of whether the DAW is stopped or playing.

  • Architecture (Anti-Jitter & Redraw Protection): Implemented a strict Float Compare Threshold (> 0.002); the visual updates only when humanly perceivable fader movement is detected, saving CPU and ignoring MIDI micro-jitter.

HYDRA SANITY (v7.70 THE APEX ENGINE - REAL-TIME MIDDLEWARE ARCHITECTURE)
MICRO-BUFFER COALESCING + SUBFRAME SMOOTHING + FRAME LOCK + PAD BRIDGE

:building_construction: New Control Philosophy: How to Setup MIDI Correctly

Starting with version v7.70, HYDRA SANITY acts as an absolute “bouncer” (middleware) between your hardware controller and the Renoise environment itself. For the CC message filter to work perfectly—without triggering native Renoise functions or cluttering patterns with hexadecimal codes—your controller must never be activated directly in the main Renoise settings (Preferences → MIDI In Device).

Instead, choose one of the following two approaches depending on your hardware type:

Scenario A: I use a simple controller exclusively for Hydra

If you have a basic controller (e.g., just faders and encoders) that you want to dedicate purely to the HYDRA SANITY tool, and you don’t plan to use it to play notes or control other elements in the DAW:

  1. In the main Renoise settings (Edit -> Preferences -> MIDI), make sure this controller is DISABLED (set to None).

  2. Open the HYDRA SANITY window.

  3. Select your controller as the MIDI In.

  4. Set the MIDI Out to None. (In this case, the script doesn’t need to pass any data further into the system).

Scenario B: I use a complex DAW controller with a keyboard (Keys, Pads, Pitchbend)

If you use a complex device (like a master keyboard) where one part controls Hydra, but you also need to play notes on the keys, use the ModWheel, and utilize other MIDI functions inside Renoise, you must create a “Loopback” (virtual cable).

  1. In the main Renoise settings (Edit -> Preferences -> MIDI), your controller must be strictly DISABLED.

  2. Install software to create a virtual MIDI port. For ultimate control and further layering, you can use professional software like Bome MIDI Translator Pro. If you are looking for a simple, free solution, the reliable loopMIDI driver works perfectly (download here: https://www.tobias-erichsen.de/software/loopmidi.html).

  3. Create a virtual port in your loopback software (e.g., name it Hydra_Out).

  4. In the HYDRA SANITY window, set MIDI In to your physical hardware controller and MIDI Out to this newly created virtual port (Hydra_Out).

  5. Now go to Renoise (Edit -> Preferences -> MIDI) and select your virtual port (Hydra_Out) as the MIDI In Device.

Result: HYDRA takes its assigned CC messages from the controller, securely isolates them, and sends only clean notes and pitchbend into Renoise via the virtual cable. Your patterns remain completely untouched, and you can utilize your controller to its absolute maximum!

📜 HYDRA SANITY v7.70 (THE APEX ENGINE) - Changelog
  • [ADDED] New “Middleware” MIDI Routing: Added an independent output port selection (MIDI Out) to the GUI, enabling advanced MIDI signal chaining and the seamless integration of virtual MIDI cables.

  • [REMOVED] Internal OSC Client Deprecated: The tool has been completely cleared of OSC sockets. This significantly lightens the script, speeds up the MIDI callback, and completely eliminates the risk of double-triggering notes when hardware is connected in parallel. The IPC communication (the event bus for the PAD Tool and Mute/Solo states) remains fully functional and intact.

  • [FIXED] Ultimate “Dirty Pattern” Fix: Thanks to the new strict routing, the frustrating issue of unwanted native MIDI macro commands (e.g., M0, M1…) being written into Pattern Editor columns while moving faders is permanently and 100% resolved.

  • [IMPROVED] Intelligent Message Absorber: CC messages mapped to HYDRA SANITY are securely “swallowed” after processing and do not pass through to the DAW. In contrast, unmapped data (Notes, Pitchbend, Aftertouch) flows freely and cleanly into the selected output.

so much nois e (wall-to-wall text). make a video.

:dragon: HYDRA SANITY (v7.85 THE APEX ENGINE)

LIVE PRODUCTION ENGINE FOR HYDRA AUTOMATION and MIDI controller (endless increment, absolute) and others.

**Safe MIDI Routing + PAD Bridge | Release-Aware Intent Execution | Absolute Math | Touch Punch-In
**
APEX ENGINE: This tool acts as a “middleware” and transforms Renoise into a full-fledged production mixing console.

It flawlessly and smoothly converts data from both absolute and relative (infinite) encoders.
It analyzes your movement, calculates momentum, and records only the actual changes in values ​​using Bézier subframe smoothing.
It features professional studio recording modes: ARM, LATCH, STICKY, and Touch Punch-In , which keep your automation curves crystal clear.
It allows you to fully control and record dozens of Hydra devices simultaneously.

Engine features highly optimized “live” monitoring that gives you absolute control over the performance of your hardware in relation to your DAW.

Live Idle Metering: LCD meters respond to your physical controller in real time, even when Renoise is STOPPED. Your fader behaves just like it would on a real hardware mixer.
Ghost Meter (Live Image vs. Graph): A groundbreaking visualization that displays two values ​​simultaneously. The solid block (▰) represents the current physical position of the fader, while the shadow block (▱) shows the existing automation curve at the cursor position. You can see exactly how to align the fader to seamlessly follow the existing graph.
Peak Hold (Peak Memory): A professional hardware mixer feature. The visual marker (|) remembers the maximum value reached for 1.5 seconds, ideal for tracking fast and aggressive movements.
Dynamic Color States: Peripheral vision is essential during live performance. The LCD displays change color continuously depending on the processor status: :blue_circle: Blue (Idle/Stop/Read Curve), :red_circle: Red (Recording On/Live Overwrite), :orange_circle: Orange (ARM Preparation/Sticky Hold).

Since version 7.84 the system uses its own memory context ( zorgan_rec_mode ), completely independent of the Renoise API. Thanks to this the engine knows exactly when to record, even if the native red record button in Renoise is turned off.

REC PLAY NOTE & Automation: Classic recording. Starts playback and activates the native noise editing mode. You record notes to both the pattern and automation curves.
REC PLAY Automation: Special mode. Activates playback and our internal recording context, but TURNS OFF the native noise editing mode. Perfect mode for safe recording and drawing curves “on the fly” without the risk of accidentally overwriting the notes of the pattern by pressing a key. All ARM ON logic Touch Punch-Inzde works fully.
PLAY / PAUSE (Safe Listening): Safe playback. Temporarily puts all active REC and ARM states to sleep. You can safely experiment with the faders without writing anything to the graph. When you exit this mode, the original states are restored.
MIDI ENC / MIDI DEC: Toggle between absolute and relative encoder support (infinite rotary knobs).
SMOOTH PULL AND IRONING GROOVES: Global inertia and smoothing (ironing) strength settings applied to all active Hydras.

:dna: 6. SIGNAL SYNTHESIS ENGINE (Under the Hood)
Sparse Automation Engine: Only writes points to the graph when there is an actual change in value or direction. The result is dramatic performance savings and visually flawless waveforms.
IRON Mode: If you have a REC ON active fader but are not currently moving it, the system will not destroy the existing waveform with a “dead flat line”. Instead, it will intelligently “iron out” the existing points under the cursor, smoothing out the original automation.
Intelligent Mute/Solo Protection: The engine natively tracks the mute/solo states of the track and group. If you mute a track with Hydra active, the engine will silently exit the background recording state to prevent overwriting invisible data, and will intelligently resume it when the mute is unmuted.
Saving Project State: No external configuration files. All CC mappings and states are securely and invisibly stored directly in the .xrns project file.
:musical_keyboard: 7. ZORGAN ECOSYSTEM
Hydra Sanity is designed to work seamlessly with the MIDI PADS to Controll Tracks tool. Clicking the PADs tool button in the main interface will launch this sister tool instantly. Both scripts share a lightning-fast and invisible bus (IPC Event Bus) for switching Mute, Solo and Focus states without freezing the user interface or losing data. This creates the perfect environment for playing electronic music live.

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

I apologize that I don’t have a finished video or photo documentation for the controls yet. What is already complete can be found in the Renoise tools Readme where I describe at least the details. At the same time, I am still overwhelmed by the development of both tools. I have already finished the stability and control logic, now I am focusing on the controls and improving the GUI appearance.
how to start … set up a MIDI Controller in the GUI tool … load a song, every time you add HYDRA to a song, you can click RESCAN and it will appear there … the rest is simple and will be even easier.
Give me time, when I have it all together with all the plans I have ready, I will prepare detailed photo documentation and a video.

Change log

:rocket: HYDRA SANITY v7.85 (APEX ENGINE - LAST POLISH)
Only the visual representation of the sticky_release_pending state changes. What exactly changes: Instead of flashing ARM ON when displaying sticky_release_pending[dk], the text: LEAVE is displayed, color: darker orange.

:rocket: HYDRA SANITY v7.84 (APEX ENGINE - LAST POLISH)
[NEW] Zorgan recording context: The recording logic has been completely separated from the native Renoise edit_mode. The tool now maintains its own global zorgan_rec_modestat, which ensures flawless operation of advanced features (Touch Punch-In and LATCH) even in “REC PLAY Automation” mode (when the native red button in Renoise is disabled).
[NEW] Release-related logic: Significant revision of the LATCH/STICKY button. LATCH button controls in both the GUI and MIDI now work purely as an “ARM request”. If a fader is active (held) and you click LATCH, the system does not hardware-disconnect. Instead, it raises the sticky_release_pending flag, blinks in the GUI, and safely waits for the fader to be released.
[NEW] Touch Punch-In (zero frame loss): Once Hydra is powered on ( ARM ONblink) and master recording is started, the first millisecond touch of a hardware fader will immediately write the data to the graph. The loss of the first “idle frame” has been eliminated.
[FIXED] Engine Loop Bug: Fixed a critical “race” bug where a continuous stream of data from a held MIDI fader would cause the system to get stuck in an infinite loop between ARM and STICKY states.
[FIXED] Button Intelligence: Buttons no longer guess states, but strictly respect the hierarchy: INTENT > REC PLAY > REC OFF. The LATCH button is now 100% predictable regardless of the DAW transport state.