V1.1.0
SoundFlow v1.1.0 Release Notes
This is a landmark release for SoundFlow, introducing a powerful Non-Destructive Audio Editing and Persistence Engine. This update provides developers with a complete framework for building sophisticated audio editing applications, from simple clip arrangement to complex multi-track projects with effects, time-stretching, and project saving/loading capabilities.
✨ Major New Features
1. The SoundFlow.Editing Module: A Full-Featured Audio Editing Engine
We are thrilled to introduce a comprehensive, non-destructive editing module. This suite of tools allows you to build complex audio timelines programmatically.
- Composition as a Canvas: The new
Compositionclass acts as your main project container, holding multipleTrackobjects. - Multi-Track Support: Mix and manage several audio
Tracks simultaneously. Each track has its own settings for volume, pan, mute, and solo. - Audio Segments (Clips): The
AudioSegmentis the core building block. Place segments on a track's timeline, specifying a start time and duration from any audio source. - Advanced Segment Controls: Each segment comes with a rich
AudioSegmentSettingsobject, allowing for:- Independent volume, pan, and speed adjustments.
- Segment-level effects and analyzers.
- Reversing: Play audio clips backward with a simple
IsReversed = trueflag. - Looping: Repeat segments a specific number of times or to fill a target duration using
LoopSettings. - Fades: Apply smooth
FadeInandFadeOuteffects withLinear,Logarithmic, andS-Curveshapes.
2. Pitch-Preserved Time Stretching & Advanced Speed Control
Manipulating the timing of audio is now more powerful than ever.
- WSOLA Time Stretching: A new
TimeStretchFactorproperty onAudioSegmentallows you to change the duration of an audio clip without altering its pitch. This is perfect for fitting dialogue or music to a specific time slot. Internally, this is powered by a new, high-qualityWsolaTimeStretchercomponent. - Target Duration Stretching: You can now set a
TargetStretchDurationon a segment, and SoundFlow will automatically calculate the required stretch factor to make it fit perfectly. - Classic Speed Control: The
SpeedFactorproperty remains, allowing for classic varispeed effects that adjust both tempo and pitch (like a tape machine).
3. Project Persistence: Save and Load Your Compositions
A complete SoundFlow.Editing.Persistence system has been added, allowing you to save and load entire compositions to and from a file (.sfproj).
- Save & Load: Use
CompositionProjectManager.SaveProjectAsyncandLoadProjectAsyncto manage your projects. - Media Consolidation: When saving, you can opt to "consolidate" all audio assets into a single
Assetsfolder within your project directory, making your projects portable and self-contained. - Embed Small Media: For convenience, small audio files (under 1MB) can be embedded directly into the project file as Base64 strings, eliminating the need for external files for short sound effects or jingles.
- Missing Media Relinking: If a project is loaded and an audio file is missing, the API reports the missing source and provides a
RelinkMissingMediaAsyncfunction to point the project to the file's new location.
4. New Sample Project: SoundFlow.Samples.EditingMixer
To showcase these powerful new features, a comprehensive new sample project has been added. Run it to see interactive examples of:
- Stitching, trimming, and editing a dialogue between two speakers.
- Replacing and layering audio with generated tones and music.
- Applying time stretching, speed changes, looping, and fades.
- Saving a project with media consolidation, loading it back, and relinking missing files.
🚀 Enhancements & Improvements
- Stream-Based Encoding & Recording: The
RecorderandISoundEncoderinterfaces now operate onStreamobjects instead of file paths. This is a major flexibility improvement, allowing you to record or encode directly to aMemoryStream,NetworkStream, or any other stream type. - Improved Playback Engine:
SoundPlayerBasehas been significantly refactored to support the new time-stretching and advanced playback capabilities, resulting in more robust and flexible audio playback. - Enhanced
RawDataProvider: This provider is now significantly more versatile, with new constructors that can acceptfloat[],int[],short[], andbyte[]arrays directly, in addition to streams. - Robust Resource Management: The core
Mixercomponent is nowIDisposableand uses aConcurrentDictionaryfor its components, improving thread safety and ensuring proper cleanup of audio resources. - Effect Toggling:
SoundModifierandAudioAnalyzerclasses now have anEnabledproperty, allowing you to non-destructively toggle effects on and off at any level (segment, track, or master). - Performance Optimizations: The audio conversion pipeline for final output has been optimized for better performance.
- Updated Native Libraries: The underlying native libraries for WebRTC APM and MiniAudio have been updated to their latest versions across all supported platforms.
⚠️ Breaking Changes
This release includes several API changes to improve flexibility and consistency.
-
Encoder API Uses
Stream:AudioEngine.CreateEncoderand theMiniAudioEncoderconstructor now require aStreaminstead of astring filePath.- Before:
new MiniAudioEncoder("output.wav", ...) - After:
new MiniAudioEncoder(new FileStream("output.wav", ...), ...) - Reason: This allows encoding to any type of stream, not just files.
-
Recorder API Uses
Stream:- The
Recorderconstructor now takes aStreaminstead of astring filePath. - Before:
new Recorder("recording.wav", ...) - After:
new Recorder(new FileStream("recording.wav", ...), ...) - Reason: Consistent with the Encoder API change, enabling recording to any stream.
- The
-
ISoundDataProvider.SampleRateProperty:- The
SampleRateproperty onISoundDataProvideris now a non-nullable, get-onlyint(public int SampleRate { get; }). It was previously a settableint?. - Reason: The sample rate is an intrinsic property of the audio source and should not be changed after creation. It is now inferred from the audio source or the engine, ensuring more reliable behavior.
- The
-
Provider Constructor Signatures:
- Reflecting the change above, constructors for
ChunkedDataProvider,NetworkDataProvider, andAssetDataProviderno longer accept asampleRateparameter.
- Reflecting the change above, constructors for
🌐 New Platform Support
- FreeBSD: SoundFlow now includes native binaries for FreeBSD on x64 and ARM64 architectures (
freebsd-x64andfreebsd-arm64).
What's Changed
- refactor: Raw audio sample support for AssetDataProvider by @patrick-hovsepian in #43
- fix: GC hole in MiniAudioDecoder by @Windows10CE in #47
- feat: Implement advanced audio editing, WSOLA time stretching & project I/O by @LSXPrime in #48
- feat: Implement stream-based audio encoding by @LSXPrime in #49
- feat: Add FreeBSD support, refine cross-platform builds, and enhance audio processing by @LSXPrime in #50
New Contributors
- @patrick-hovsepian made their first contribution in #43
- @Windows10CE made their first contribution in #47
- @LSXPrime made their first contribution in #48
Full Changelog: V1.0.4...V1.1.0