
Peakguard - Real-Time Gain Reduction for Windows
​
Peak Guard is a real-time dynamics control and monitoring system designed to stabilise transient-heavy audio while maintaining low-latency behaviour suitable for interactive use cases such as film, video game, broadcast ect.
-
Real-time Windows audio processor (WASAPI)
-
Low-latency dynamics control (no lookahead)
-
Deterministic processing with safety ceiling
-
Built for interactive audio (games, broadcast, live)
At its core, the AudioProcessor implements a sample-by-sample peak-driven control pipeline operating on interleaved floating-point buffers. For each frame, it derives a per-frame peak across channels which feeds a shared envelope detector. This detector uses asymmetric attack/release coefficients (exponential smoothing) to track signal amplitude with fast attack and controlled release characteristics, ensuring transient responsiveness without excessive modulation.
The processing chain is structured in three stages:
• Compressor stage
A threshold/ratio model is applied in the linear domain. When the tracked envelope exceeds the threshold, a target level is computed and converted into a gain factor. This gain is smoothed implicitly via the envelope follower rather than a separate gain smoother, reducing state complexity and avoiding additional latency.
• Limiter stage (pre-output gain)
A peak limiter operates on the post-compressor signal. Attack is effectively instantaneous, while release is time-based, preventing sustained gain reduction after transient events. This stage ensures that downstream gain increases do not reintroduce overs.
• Post-gain safety ceiling
A final non-user-facing safety limiter operates after output gain. This stage enforces a fixed ceiling (~-0.8 dBFS) and protects against digital clipping regardless of user-applied gain. It uses a fast peak-tracking envelope and applies corrective gain only when required, remaining transparent under normal conditions.
The combined gain structure can be expressed as:
g_total = g_compressor × g_limiter × g_output × g_safety
All stages operate per-sample with no lookahead, prioritising determinism and minimal latency over brickwall-style peak anticipation.
To support observability, the processor accumulates statistical telemetry during processing:
• RMS (input/output) computed from running sum-of-squares
• Peak output tracking and exact clip counting
• Gain reduction decomposition:
-
Compressor GR
-
Limiter GR
-
Safety limiter GR
-
Combined GR
To reduce CPU overhead at low buffer sizes, meter calculations are decimated (e.g. every other block), while the audio path remains unaffected. This avoids UI-induced performance spikes in ultra-low-latency configurations.
The AudioDeviceManager manages system-level routing and stream lifecycle. It interfaces with WASAPI in shared mode for broad compatibility, with optional VB-Cable routing for full system audio capture. Device enumeration is performed via IMMDeviceEnumerator, and default endpoint switching is handled through IPolicyConfig for Console, Multimedia, and Communications roles.
A fallback WASAPI path is provided to allow direct device processing without virtual routing dependencies, improving robustness in constrained or unsupported environments.
Latency is controlled through a configurable target buffer model. The system attempts progressively lower buffer sizes during initialisation, falling back gracefully if stability constraints are encountered. A bounded FIFO is used to decouple capture and render timing, with overwrite-on-full behaviour to prevent latency accumulation under load.
On the UI side, Peak Guard exposes real-time system state through a set of time-series visualisations:
• Gain Reduction over time (including safety stage contribution)
• Latency behaviour and buffer performance
• Input/output level monitoring
These plots are driven by timestamped telemetry streams and rendered in a sliding window, enabling users to correlate audible behaviour with system response in real time.
The overall design prioritises:
• Deterministic, low-latency processing (no lookahead, minimal buffering)
• Clear separation between audio path and telemetry
• Fail-safe behaviour under misconfiguration (safety ceiling)
• System-level integration with explicit device and routing control
This results in a dynamics control system that is not only corrective, but also inspectable, allowing users to understand how and when processing is applied, rather than treating it as a black box.
Voicenote Helpdesk support App for distributed teams
Voicenote Helpdesk is a browser-based service response and ticketing platform designed to standardise incident intake, improve response visibility, and generate operational performance data. It enables users to raise support requests from fixed devices using voice input, while providing staff with a live operational board to manage, track, and resolve incidents.
-
Device-driven ticketing system with voice capture
-
Improves incident clarity and response visibility
-
Built using Google Apps Script + real-time workflows
At the point of use, a kiosk interface allows a user to select a department and record a short voice message. A request is created immediately, linked to the device and its registered location, and written to a central data store. The voice recording is uploaded and associated with the request, providing additional context beyond a standard text-based ticket. This approach reduces friction for the user while improving clarity for the responding team.
On the staff side, requests are surfaced through a live department-based board. Staff can open requests, listen to associated voice notes, acknowledge ownership, assign themselves, progress work through defined workflow states, and close or reopen tickets as needed. Status changes update in near real time, allowing multiple users to coordinate without conflict. Each request maintains a full audit trail, including timestamps, status transitions, and assignment history.
Technically, the platform is implemented as a Google Apps Script web application with a browser-based frontend and a spreadsheet-backed backend. The frontend is built using HTML, CSS, and JavaScript, with asynchronous calls to server-side functions using google.script.run. It provides two primary interfaces: a kiosk interface for request capture and a staff interface for operational management.
The backend is composed of Apps Script services that manage request creation, workflow transitions, device metadata, alerting, and data consistency. Requests are stored in a structured Google Sheet, with additional sheets used for device registration, staff presence, settings, and audit logging. Voice recordings are stored in Google Drive, with file identifiers written back to the request record to enable playback via a controlled endpoint.
Each device is registered with a unique identifier and associated metadata, including role, location, and operational flags. This allows the system to automatically apply location context to incoming requests without requiring user input, ensuring consistency and reducing input errors. Device-level controls also support test environments, archived units, and controlled rollout across sites.
The request lifecycle is managed through defined states, typically progressing from open to assigned, in progress, and closed, with support for cancellation and reopening. Updates are written with concurrency controls to prevent conflicting changes, and lightweight caching is used to support efficient polling from both kiosk and staff interfaces.
The platform includes alerting mechanisms to notify relevant teams of new requests, along with logging to support traceability and diagnostics. Staff presence and eligibility can be managed to control alert distribution, supporting structured shift-based operations.
Voicenote Helpdesk is designed to provide a consistent and scalable approach to service response, combining device-driven request capture, structured workflow management, and operational analytics within a single system.