SoundFlow 1.0.2

dotnet add package SoundFlow --version 1.0.2                
NuGet\Install-Package SoundFlow -Version 1.0.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="SoundFlow" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SoundFlow --version 1.0.2                
#r "nuget: SoundFlow, 1.0.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.
// Install SoundFlow as a Cake Addin
#addin nuget:?package=SoundFlow&version=1.0.2

// Install SoundFlow as a Cake Tool
#tool nuget:?package=SoundFlow&version=1.0.2                

<div align="center"> <img src="logo.png" alt="Project Logo">

SoundFlow

A Powerful and Extensible .NET Audio Engine for Enterprise Applications

Build Status License: MIT NuGet .NET

</div>

Introduction

SoundFlow is a robust and versatile .NET audio engine designed for seamless cross-platform audio processing. It provides a comprehensive set of features for audio playback, recording, processing, analysis, and visualization, all within a well-structured and extensible framework.

Key Features:

  • Cross-Platform by Design: Runs seamlessly on Windows, macOS, Linux, Android, and iOS or any other .NET compatible platform.
  • Modular Component Architecture: Build custom audio pipelines by connecting sources, modifiers, mixers, and analyzers.
  • Extensibility: Easily add custom audio components, effects, and visualizers to tailor the engine to your specific needs.
  • High Performance: Optimized for real-time audio processing with SIMD support and efficient memory management.
  • Playback: Play audio from various sources, including files, streams, and in-memory assets.
  • Recording: Capture audio input and save it to different encoding formats.
  • Mixing: Combine multiple audio streams with precise control over volume and panning.
  • Effects: Apply a wide range of audio effects, including reverb, chorus, delay, equalization, and more.
  • Analysis: Extract valuable information from audio data, such as RMS level, peak level, frequency spectrum, and voice activity.
  • Visualization: Create engaging visual representations of audio waveforms, spectrums, and level meters.
  • Surround Sound: Supports advanced surround sound configurations with customizable speaker positions, delays, and panning methods.
  • HLS Streaming Support: Integrate internet radio and online audio via HTTP Live Streaming.
  • Backend Agnostic: Supports the MiniAudio backend out of the box, with the ability to add others.

Getting Started

Installation

NuGet Package Manager:

Install-Package SoundFlow

.NET CLI:

dotnet add package SoundFlow

Basic Usage Example

This example demonstrates how to play an audio file using SoundFlow:

using SoundFlow.Abstracts;
using SoundFlow.Backends.MiniAudio;
using SoundFlow.Components;
using SoundFlow.Providers;
using SoundFlow.Enums;

// Initialize the audio engine with the MiniAudio backend
using var audioEngine = new MiniAudioEngine(44100, Capability.Playback);

// Create a SoundPlayer and load an audio file
var player = new SoundPlayer(new StreamDataProvider(File.OpenRead("path/to/your/audiofile.wav")));

// Add the player to the master mixer
Mixer.Master.AddComponent(player);

// Start playback
player.Play();

// Keep the console application running until playback finishes
Console.WriteLine("Playing audio... Press any key to stop.");
Console.ReadKey();

// Stop playback and remove the player from the mixer
player.Stop();
Mixer.Master.RemoveComponent(player);

Core Concepts

SoundFlow is built upon a few key concepts:

  • Audio Engine (AudioEngine): The central component that manages audio device initialization, data processing, and the audio graph.
  • Sound Components (SoundComponent): Modular units that process or generate audio, forming a directed graph through input and output connections.
  • Mixer (Mixer): Combines multiple audio streams into a single output.
  • Sound Modifiers (SoundModifier): Apply audio effects like reverb, chorus, delay, and equalization.
  • Audio Playback & Recording: Components for playing and capturing audio, including surround sound support.
  • Audio Providers: Standardized way to read audio data from various sources (files, streams, memory).
  • Audio Analysis & Visualization: Tools for extracting information from audio and creating visual representations.

For detailed information on these concepts, please refer to the SoundFlow Documentation.

API Reference

Comprehensive API documentation will be available on the SoundFlow Documentation.

Tutorials and Examples

The Documentation provides a wide range of tutorials and examples to help you get started:

  • Playback: Playing audio files and streams, controlling playback.
  • Recording: Recording audio, using voice activity detection.
  • Effects: Applying various audio effects.
  • Analysis: Getting RMS level, analyzing frequency spectrum.
  • Visualization: Creating level meters, waveform displays, and spectrum analyzers.

(Note: You can also find example code in the Samples folder of the repository.)

Contributing

We welcome contributions to SoundFlow! If you'd like to contribute, please follow these guidelines:

  1. Report Issues: If you find a bug or have a feature request, please open an issue on the GitHub repository.
  2. Ask Questions and Seek Help: If you have questions about using SoundFlow or need help with a specific issue, please open a discussion on the GitHub repository to keep the issues section clean and focused.
  3. Submit Pull Requests:
    • Fork the repository.
    • Create a new branch for your changes.
    • Make your changes, following the project's coding style and conventions.
    • Write unit tests for your code.
    • Ensure all tests pass.
    • Submit a pull request to the master branch.
  4. Coding Style:
    • Follow the .NET coding conventions.
    • Use clear and descriptive variable and method names.
    • Write concise and well-documented code.
    • Use XML documentation comments for public members.

Acknowledgments

This project uses the miniaudio library for as default backend for audio I/O.

Support This Project

SoundFlow is an open-source project driven by passion and community needs. Maintaining and developing a project of this scale, especially with thorough audio testing, requires significant time and resources.

Currently, development and testing are primarily done using built-in computer speakers. Your support will directly help improve the quality of SoundFlow by enabling the purchase of dedicated headphones and audio equipment for more accurate and comprehensive testing across different audio setups.

Beyond equipment, your contributions, no matter the size, help to:

  • Dedicate more time to development: Allowing for faster feature implementation, bug fixes, and improvements.
  • Enhance project quality: Enabling better testing, documentation, and overall project stability (including better audio testing with proper equipment!).
  • Sustain long-term maintenance: Ensuring SoundFlow remains actively maintained and relevant for the community.

You can directly support SoundFlow and help me get essential headphones through:

  • Ko-fi: For simple one-time donations or flexible recurring support.

    ko-fi

  • Binance Pay (Crypto): Support with cryptocurrency via Binance Pay.

    Binance Pay QR Code/Link

    You can also scan this QR code in your Camera app:

photo-2025-02-08-13-36-41.jpg

By becoming a sponsor or making a donation, you directly contribute to the future of SoundFlow and help ensure it sounds great for everyone. Thank you for your generosity!

License

SoundFlow is released under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.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.