What’s new in 0.8#
Summary of changes in the 0.8.x series. (A detailed internal change record is kept by the developers; this page is the user-facing summary.)
Platforms and Python versions#
Windows (x86-64) support via MSVC and the sndlib CMake build; pysndlib now provides binary wheels for macOS (universal2), x86-64 Linux, and x86-64 Windows for Python 3.10 through 3.14.
Wheels are built, tested, and published from CI; the full test suite runs against every wheel before upload.
Settings-file support#
Settings can live in a platform-appropriate location (
%APPDATA%\pysndlib\pysndlib.pyon Windows,~/Library/Application Support/pysndlib/on macOS, XDG config on Linux), or in the legacy~/.pysndlib.$PYSNDLIB_RCoverrides;$PYSNDLIB_RC_STRICTmakes errors fatal; see Settings File.pysndlib.clm.load_rc()loads (or re-loads) a settings file at any time.
Error handling#
sndlib errors now surface as
pysndlib.clm.SNDLibErrorraised at well-defined points (generator construction, output, file I/O,Sound.__exit__) instead of as delayed, hard-to-trace failures.pysndlib.clm.check_sndlib_errors()reports any error recorded by the sndlib error handler.sndlib
mus_printoutput is routed to python’s stdout.
Playback#
Sound(play=True)accepts adefault.playerthat is either an executable name ('afplay','aplay') or a command list with a'{file}'placeholder (see Settings File). Windows has a working default player.
Bug fixes#
envelope_interpaccepts breakpoint lists (as in CLM’senv-interp), not just envelope generators.64-bit sample counts and lengths no longer truncate on Windows (
mus_sound_samples,mus_sound_framples,mus_sound_data_location,mus_sound_length,clm.get_length,clm.get_framples).mus_sound_commentno longer crashes on files without a comment.Numerous fixes in the shipped instruments and generators (e.g.
MovingFFTandNoddsinwere unconstructible;canternow accepts list envelopes).
API changes#
pysndlib.sndlib.mus_sound_reopen_outputno longer takes asrateparameter (it was never passed to sndlib).pysndlib.generators.make_nchoosekcos(frequency, ratio, n)– the previous factory passed its arguments to the constructor in the wrong order.pysndlib.clm.locsigreturnsNone(previously returned an unintended0.0).
Development#
The version number is derived from git tags (setuptools-scm); see
RELEASE.mdin the repository for the release process.A test suite (340+ tests) runs on every supported platform and python version in CI.
A hands-on tutorial series of notebooks is included in the repository under
notebooks/.