Repository navigation
SwiftMusic 0.2.0 (Preview)
Pre-release
Pre-release
- Extended the immutable
Sound/Musiccompiler with bounded rhythm, note, gain, pan, pitch, cutoff, envelope and sample-selection patterns. Patterns support bracket subdivisions, cycle alternatives, leaf repetition and orderedfast,slow,phase,reversedandrepeatedtransforms with checked rational rates and typed UTF-8 diagnostics. - Added typed musical time, tempo, pitch, frequency, decibel, scale, key, chord, voicing, arpeggio, legato, portamento, unison, automation, envelope, probability, humanization, Euclidean rhythm, swing, ratchet and periodic-rhythm values.
- Added sample descriptors for named, absolute-file and validated sample-bank sources, plus source traversal for regions, selection, slicing, chopping, granular playback, stretching, reversal and playback-rate changes.
- Added oscillator descriptors for band-limited saw, pulse, frequency modulation, deterministic colored noise and wavetable sources while retaining the existing basic waveforms.
- Added ordered source, expression, filter, modulation, effect, mix and routing modifiers, including typed filter/chorus/flanger/phaser factories, tremolo, vibrato, ducking, sends, outputs, mute, voice policy and choke groups.
- Added MainActor performance-model injection with
@Performance(Model.self),.performance(model), optionalPerformanceEntryfactories andPerformanceObservationSession.PerformanceObservationSession.prepareDetailedpreserves located compiler diagnostics after one tracked body evaluation. - Added optional typed performance controls for finite numbers, one BPM role and normalized
SpatialPositionXY/depth values. Complete control-set validation rejects malformed IDs, domains, values, duplicate key paths and multiple BPM roles before mutation. - Kept revision-safe live preparation explicit through
LiveMusicUpdateandLiveMusicState: stale completions are rejected, failures retain the adopted plan, and adoption remains a host-selected boundary operation.
Compatibility and verification
Music.bodyand Music compiler entry points are MainActor-isolated;Soundand compiled values remain Sendable. SwiftMusic has no SwiftUI dependency.- Requires Swift tools 6.4; package deployment target macOS 14. All 198 library tests passed on macOS 27 arm64 with Swift 6.4.2-dev (2026-09-04, compiler
d2e983b81b18217). Runtime compatibility on macOS 14, Embedded Swift and WASM is not claimed. - This release covers the SwiftMusic library product. MusicPlaygournd is a separate native host under development; remaining editor layout and full UI acceptance are not represented as complete. Audio rendering and hardware I/O remain host responsibilities.
- Prerelease APIs may change.