Skip to content

SwiftMusic 0.2.0 (Preview)

Pre-release
Pre-release

Choose a tag to compare

@1amageek 1amageek released this 08 Sep 13:31
· 18 commits to main since this release
  • Extended the immutable Sound/Music compiler with bounded rhythm, note, gain, pan, pitch, cutoff, envelope and sample-selection patterns. Patterns support bracket subdivisions, cycle alternatives, leaf repetition and ordered fast, slow, phase, reversed and repeated transforms 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), optional PerformanceEntry factories and PerformanceObservationSession. PerformanceObservationSession.prepareDetailed preserves located compiler diagnostics after one tracked body evaluation.
  • Added optional typed performance controls for finite numbers, one BPM role and normalized SpatialPosition XY/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 LiveMusicUpdate and LiveMusicState: stale completions are rejected, failures retain the adopted plan, and adoption remains a host-selected boundary operation.

Compatibility and verification

  • Music.body and Music compiler entry points are MainActor-isolated; Sound and 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.