EdgeLoop.app — Autonomous Real-Time Cardiac Biofeedback Edging & Funscript Generator

I’ve been building an autonomous tease-and-denial engine designed to run 100% in the browser: EdgeLoop.app.

The goal of this project is to automate physical edging cycles using real-time cardiac biometric feedback—without requiring paid subscriptions, complex desktop software suites, or manual speed adjustments. You connect your Bluetooth heart rate monitor, link your toys, and the engine automatically handles speed regulation, stroke-length contraction, dual-channel prostate cross-fading, and session logging.

Here is a full breakdown of how the platform works, supported hardware, and its feature set.

How the Biofeedback Engine Works

The core algorithm maps cardiac arousal against motor output using an inverse linear model:

  • Dynamic Tease & Recovery: When you are calm at your resting baseline HR, connected toys operate at full speed. As arousal and heart rate climb toward your configured climax ceiling, the toys decelerate to back you down from the brink.

  • Hysteresis Buffer: To prevent motor stuttering when hovering right at your climax threshold, the engine enforces a 5 BPM hysteresis buffer. Once a ceiling breach triggers an edge, toys remain throttled until your heart rate drops at least 5 BPM below your threshold.

  • Watchdog Safety Timeout: If cardiac telemetry stalls or the connection drops for more than 5 seconds, an automated safety watchdog halts all motor commands instantly.

Supported Hardware & Connectivity

EdgeLoop runs completely client-side in your browser, establishing direct local communication with your hardware:

  • Bluetooth Heart Rate Monitors (BLE GATT 0x180D):

    • Connects natively via Web Bluetooth to dedicated chest straps and optical armbands (Polar H10, Verity Sense, Garmin HRM-Pro, Wahoo TICKR).

    • Works with Google Pixel Watch (1, 2, 3) and Wear OS via the native “Heart Rate Sharing” quick settings tile.

    • Compatible with Apple Watch using BLE relay apps (such as HeartCast, Echo, or HeartBLE).

    • Platform Note: Windows, macOS, ChromeOS, and Android Chrome connect natively. Linux Chromium users need #enable-experimental-web-platform-features enabled in chrome://flags. iOS users must access the app through the free Bluefy browser, as mobile Safari does not support Web Bluetooth.

  • The Handy (1 & 2):

    • Communicates over Wi-Fi via HTTPS using your personal Connection Key.

    • Drives high-speed velocity changes via HAMP (/hamp/velocity).

    • Dynamically pushes physical stroke window boundaries directly to the /slide endpoint.

    • 25% Stroke Safety Floor: Physical stroke length dynamically contracts as heart rate climbs, but is mathematically clamped so travel never narrows below 25% of total capacity, preventing motor lockups.

  • Intiface Central / Buttplug.io:

    • Bridges to Intiface Central via local WebSocket (ws://localhost:12345).

    • Provides universal support for any Buttplug-compatible hardware (Lovense, We-Vibe, Kiiroo, Svakom, Fleshlight Launch, etc.).

    • Split-Axis Control: For multi-motor hardware like the Lovense Edge, the role manager lets you map Motor 1 to penile/shaft tease and Motor 2 to prostate milking.

Specialized Experience Modes

Rather than forcing manual adjustments, EdgeLoop features selectable behavioral profiles:

  • Classic Tease: Synchronous throttle where stroker velocity and vibrator speed back off together as heart rate rises.

  • Prostate Milker: Operates as a cross-fader. As heart rate climbs and penile friction slows, prostate vibration surges up to 100% power to milk the prostate hands-free.

  • Stroke Shortener: Retains velocity throttling while simultaneously pulling The Handy’s stroke range away from the sensitive glans, shifting down to base-only micro-strokes (clamped at $\ge 25\%$).

  • Ultimate Milker: Combines stroke-length contraction with a 100% secondary vibration surge for intense dual-channel hands-free sessions.

Session Controls & Customization

  • Edge Cutoff Behavior: Choose whether reaching your climax ceiling initiates a Full Stop (0%) or a Slow Crawl (10%) idle stroke.

  • Duration Targets:

    • Fixed: Set an exact session duration in minutes (ideal for syncing alongside video playback).

    • Mystery Range: Set a minimum and maximum window (e.g., 25 to 45 minutes) where the app secretly selects a random completion target.

    • Endless: Runs indefinitely with no automated timer.

  • Force Orgasm: Overrides standard ceiling cutoffs with a single click, dynamically ramping the heart rate ceiling while locking motors at 100%. Toggling it off immediately restores your original climax HR ceiling and biofeedback speed.

  • Session Gatekeeper & Safety: The Start button dynamically alerts you if either a heart rate sensor or haptic device is missing, while an onboard simulation slider enables full dry testing.

Dual-Channel .Funscript Generation & Export

A major feature for the scripting community is the built-in telemetry recorder:

  • EdgeLoop records timestamped action paths ({ at: milliseconds, pos: 0-100 }) for both your primary channel (stroker) and secondary channel (vibrator) during every active session.

  • When you complete or stop a session, open the History modal to view your stats (active time, edge count, pause count, peak BPM).

  • You can export and download dedicated .funscript files for Stroker (.funscript) and Vibe (.funscript) with one click, allowing you to inspect, edit, or replay your biofeedback session curves inside OpenFunscripter or ScriptPlayer.

P2P Remote Partner Control

EdgeLoop includes zero-server remote control via WebRTC (PeerJS):

  • Click Share to generate a direct, peer-to-peer room URL.

  • A remote partner opening the link on any phone or desktop receives your live heart rate graph, edge count, and motor outputs in real time.

  • The partner can trigger session states, switch experience modes, or activate Force Orgasm from anywhere in the world without routing intimate data through an intermediary server.

Architecture & Privacy

  • 100% Client-Side: Hosted statically on Cloudflare Pages. No user accounts, database backends, or third-party analytical tracking.

  • Local Data Retention: Handy connection keys, sensor pairings, and session logs remain strictly inside your browser’s local storage.

  • PWA Enabled: You can install EdgeLoop directly to your desktop or mobile home screen as a standalone progressive web app.

Links & Feedback

Tested on Windows & Linux (Chromium), Pixel Tablet, Pixel Watch 2, The Handy, and Lovense Edge. Looking forward to your feedback, test reports across different devices, and feature suggestions!







8 Likes

This is interesting. Ordered a HRM. Hopefully I’ll get to try this out Saturday or Sunday. Any tips? Is the stop button like the edge button if your heart rate doesn’t do the trick?

1 Like

Please let me know how it goes! Stop button is basically a kill switch. It will completely stop the session, and the timer and metrics. When you start the session, the start button turns into a pause button (for lube, water breaks, too close, etc) but the idea is that you set your max heart rate to around 10-15 below the your heart rate when you actually orgasms. for me thats around 140, so that became default.

when you press the force orgasm butt, it starts creeping up the max heartrate till you orgasm.

With the Handy 2, it seems like it’s receiving a position command rather than speed. At 100% it just locks to position 100 and doesn’t move.