.NET 10 LTS + HIGH PRECISION AUDIO
AI Architecture Rules
IntelligentAudio.NET Documentation & Standards
Framework
.NET 10 LTS
High-Performance Profile
Communication
OSC / UDP
BuildSoft.OscCore
AI Engine
Speach Engine
Whisper.NET, ONNX
Audio Engine
Audio
NAudio
Memory Management Strategy (STRICT)
Goal: Zero-Allocation in the hot path
Architectural Excellence
- No LINQ, avoid boxing, and prioritize Span<T> for all buffer handling. Important!
- This version represents a complete architectural rebuild, moving away from legacy Reflection-based systems to a modern,decoupled **Event-Driven Architecture**:
- Zero-Allocation Pipeline: Leveraging `Span&alt;float>` and `Memory&alt;T>` for real-time audio cleaning without Garbage Collector spikes.
- Asynchronous Orchestration: Powered by `System.Threading.Channels` for non-blocking communication between the Microphone, AI Engine, and Network layers.
- DAW-Agnostic Design: A Factory-based driver system (`IDawClient`) that currently supports Ableton Live via OSC, (roadmap for FL Studio, Logic Pro, (VST Bridge).
- In-Memory Event Bus: A `DefaultEventAggregator` that decouples AI analysis from hardware delivery, ensuring a (No-Bug) environment.
- IntelligentAudio.NET uses a Dynamic Discovery Architecture.
- Instead of hardcoding ports, clients announce themselves via a handshake protocol.
- The server dynamically spins up dedicated UDP transmitters for each instance, ensuring perfect isolation and zero configuration for the end user.
Constraints
- Use
Span<T>andMemory<T> - NO LINQ in audio processing or OSC parsing pipelines.
- Avoid boxing. Use generics with where T : struct where applicable.
- Prohibit
foreach(useforor Span iteration) - Use
ArrayPool<T>for recurring objects
Architectural Principles
- Decoupled Design: DAW-specific logic must be abstracted via interfaces.
- Pipeline-Driven: Use System.IO.Pipelines or Channels for data flow between modules.
- Event-Driven: Use high-performance events or ValueTask to minimize heap pressure.
- Naming Convention: Do NOT use words like " Simple" in class names. Use Default[Name]Impl.cs or specific descriptive names.
Project Structure & Responsibilities
IntelligentAudio.NeuralEngine
Core brain. Implements the context-aware controller
IntelligentAudio.Contracts
ZERO external dependencies. Contains interfaces, record struct, and const.
IntelligentAudio.Infrastructure
Houses BuildSoft.OscCore. Implements non-allocating UDP listeners.
IntelligentAudioEngine
TWhisper.net, Span<T> logic, chord detection, and transport control.
IntelligentAudio.Server
Composition Root and DI setup. Dependency Injection setup, and service lifecycle management.
IntelligentAudio.Integrations.Common
Middleware: Connect external apps layer.
IntelligentAudio.Integrations.Ableton
Plugin: Ableton specific commands.
IntelligentAudio.MusicTheory
Plugin: Musictheory lib.