Meatcorps.AudioAnalyzer.Client 0.1.0-preview.2

This is a prerelease version of Meatcorps.AudioAnalyzer.Client.
dotnet add package Meatcorps.AudioAnalyzer.Client --version 0.1.0-preview.2
                    
NuGet\Install-Package Meatcorps.AudioAnalyzer.Client -Version 0.1.0-preview.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Meatcorps.AudioAnalyzer.Client" Version="0.1.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meatcorps.AudioAnalyzer.Client" Version="0.1.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="Meatcorps.AudioAnalyzer.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Meatcorps.AudioAnalyzer.Client --version 0.1.0-preview.2
                    
#r "nuget: Meatcorps.AudioAnalyzer.Client, 0.1.0-preview.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Meatcorps.AudioAnalyzer.Client@0.1.0-preview.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Meatcorps.AudioAnalyzer.Client&version=0.1.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Meatcorps.AudioAnalyzer.Client&version=0.1.0-preview.2&prerelease
                    
Install as a Cake Tool

Meatcorps.AudioAnalyzer

Standalone live audio analyzer for the Halloween arcade hall.

It captures the operating system's default recording/line-in device, analyzes the live PCM stream, and broadcasts a tiny music telemetry frame over WebSockets.

Selecting the capture device

Every capture device is printed at startup. AudioAnalyzer:CaptureDevice can be:

  • empty: use the OS default input
  • a numeric enumeration index, e.g. "2" (handy for testing)
  • an exact device name or unique case-insensitive name substring, e.g. "USB Audio CODEC" (recommended for the arcade hall)

Persistent configuration in appsettings.json:

"AudioAnalyzer": {
  "CaptureDevice": "USB Audio CODEC"
}

Or override it from the command line without editing the file:

dotnet run -- --AudioAnalyzer:CaptureDevice="USB Audio CODEC"

If a name matches multiple devices the analyzer refuses to guess and prints the matches.

Signal path

Mixer AUX/REC OUT -> audio interface line input -> MiniAudio capture -> FFT -> WebSocket

WebSocket

URL: ws://<machine>:8765/audio

Every WebSocket binary message is exactly four bytes:

Byte Meaning
0 Low frequency level, 0..255
1 Mid frequency level, 0..255
2 High frequency level, 0..255
3 Flags; bit 0 is a one-frame beat pulse

The service broadcasts at 30 Hz by default. Beat is latched internally so one detected beat becomes one outgoing WebSocket beat packet even though FFT analysis runs faster than the network update rate.

Frequency bands

Defaults:

  • Low: 20-250 Hz
  • Mid: 250-4000 Hz
  • High: 4000-16000 Hz

The FFT uses a 2048-sample Hann window and a 512-sample hop.

First hardware test

  1. Connect an AUX/REC output from the central mixer to a proper line input / USB audio interface.
  2. Select that line input as the operating system's default recording device.
  3. Run the project.
  4. Open http://localhost:8765/.
  5. Play music through the mixer and verify LOW/MID/HIGH movement and BEAT flashes.

The first version intentionally uses the default capture device. Device enumeration/selection should be the next step after the capture + analysis path is proven on the actual mixer hardware.

C# client

using System.Net.WebSockets;

using var socket = new ClientWebSocket();
await socket.ConnectAsync(new Uri("ws://music-analyzer:8765/audio"), CancellationToken.None);

var buffer = new byte[4];
while (socket.State == WebSocketState.Open)
{
    var result = await socket.ReceiveAsync(buffer, CancellationToken.None);
    if (result.MessageType != WebSocketMessageType.Binary || result.Count < 4)
        continue;

    var low = buffer[0];
    var mid = buffer[1];
    var high = buffer[2];
    var beat = (buffer[3] & 1) != 0;
}
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.2 68 10/20/2026
0.1.0-preview.1 74 10/20/2026