Repository navigation
numchuck 0.1.10
Python bindings for the ChucK audio programming language using nanobind.
The numchuck library provides interactive control over ChucK, enabling live coding workflows, bidirectional Python/ChucK communication, and comprehensive VM introspection—all while maintaining the existing real-time and offline audio capabilities.
Changes from the last Release
Added
-
Bundled Chugins in Wheels (
scripts/cmake/fn_add_chugin.cmake,pyproject.toml,src/numchuck/api.py):- Pre-built chugins (~37
.chugfiles) are now included in distributed wheels NUMCHUCK_INSTALL_CHUGINSCMake option gates installation (ON for wheel builds, OFF for local dev)cmake.args = ["-DNUMCHUCK_INSTALL_CHUGINS=ON"]inpyproject.tomlenables bundling duringpip install/uv build- Bundled chugins directory (
<package>/chugins/) automatically added to ChucK search path inChuck.__init__ - Users no longer need to build from source to use chugins
- Pre-built chugins (~37
-
numchuck infolists bundled chugins (src/numchuck/cli/main.py):- Shows count and names of all bundled
.chugfiles from the installed package - Displays "none" for editable/dev installs where chugins are in
examples/chugins/instead
- Shows count and names of all bundled
-
Cross-Platform Wheel Repair for Chugins (
scripts/repair_wheel.py):- Wheel repair tools (delocate, auditwheel, delvewheel) skip
.chugfiles since they only scan platform-standard extensions - New repair script temporarily renames
.chugto the native extension (.dylib/.so/.dll), runs the repair tool, then renames back - Ensures chugin shared library dependencies are properly bundled if any chugin gains external (non-system) dependencies
- Uses only stdlib (
zipfile,hashlib,csv) -- no dependency on thewheelCLI package - RECORD file correctly regenerated after rename operations
- Platform-specific handling:
- macOS:
.chug->.dylib, delocate-wheel with--require-archs - Linux:
.chug->.so, auditwheel repair - Windows:
.chug->.dll, delvewheel with--analyze-existing --no-mangle
- macOS:
- Wheel repair tools (delocate, auditwheel, delvewheel) skip
-
README: Bundled chugins documentation (
README.md):- Categorized table of all 37 bundled chugins (38 on macOS with AudioUnit)
- Updated "Using Chugins" section to show automatic discovery (no manual path setup)
- Plugin Support overview links to the bundled chugins table
Changed
-
CI: Chugin tests enabled in wheel builds (
.github/workflows/wheels.yml):- Removed
and not chuginfromCIBW_TEST_COMMANDfilter - All three platforms (Linux, macOS, Windows) now use the custom repair script
- Windows builds install delvewheel via
CIBW_BEFORE_BUILD_WINDOWS
- Removed
-
Chugin test helpers updated (
tests/test_examples.py):- New
_get_chugins_dir()helper checks bundled package directory first, falls back toexamples/chugins/for dev builds - All chugin tests (
test_chugin_loading,test_chugin_bitcrusher_strict,test_chugin_gverb_strict,test_chugin_convrev_example) use the unified helper
- New
Fixed
-
TUI tests skipped on Windows (
tests/conftest.py):- Added
pytest_collection_modifyitemshook to skip@pytest.mark.tuitests on Windows - prompt_toolkit raises
NoConsoleScreenBufferErroron Windows in non-console environments - 42 TUI tests now skip gracefully on Windows instead of failing
- Added
-
WAV file rendering tests (
tests/test_wavfile.py):- Fixed
test_render_sine_to_wavrun duration:chuck.run(44100)changed tochuck.run(44100 * 4)to match 4-second ChucK code duration - Added
del chuckbefore temp directory cleanup in all tests to release file handles - Fixes
PermissionErroron Windows where files can't be deleted while open
- Fixed
-
Async awaitable race condition (
src/numchuck/api.py):get_int_awaitable,get_float_awaitable,get_string_awaitablehad a race betweenrun_in_executorcompletion andcall_soon_threadsafecallback delivery- Added
await asyncio.sleep(0)afterrun_in_executorto yield to the event loop and process pending callbacks before checkingfuture.done() - Fixes intermittent "callback not invoked" failures on slower platforms (macOS x86_64 under Rosetta)