Skip to content

Add Python control-side bindings (pyarco)#5

Open
oltyan wants to merge 1 commit into
rbdannenberg:mainfrom
Musical-Mycology:pyarco-bindings
Open

Add Python control-side bindings (pyarco)#5
oltyan wants to merge 1 commit into
rbdannenberg:mainfrom
Musical-Mycology:pyarco-bindings

Conversation

@oltyan
Copy link
Copy Markdown

@oltyan oltyan commented Apr 14, 2026

Summary

  • Adds pyarco/ — pure-Python control bindings for Arco using o2litepy, parallel to the Serpent bindings in serpent/srp/
  • ArcoEngine class manages connection lifecycle, UgenID pool, and a registry of live ugen shadows (preventing accidental GC from sending premature /arco/free)
  • ~50 ugen wrapper classes mirroring the Serpent API, plus the Instrument/Synth/Note/Score framework
  • NiceGUI interactive demo app at apps/test/python/init.py

Module layout

File Role
pyarco/arco_engine.py ArcoEngine, UgenID pool, action system, constants, utilities
pyarco/arco_ugens.py Ugen base class and all concrete wrappers
pyarco/arco_instr.py Instrument framework (Param, Synth, Note/Score, Reverb, Supersaw)
pyarco/arco.py Re-export layer — from arco import Sine works
apps/test/python/init.py NiceGUI demo for interactive testing

Test plan

  • Start Arco server (source apps/common/setpath.sh && cd apps/test && ./daserpent.app/Contents/MacOS/daserpent)
  • Run demo app (cd apps/test/python && python init.py)
  • Verify Connect, play/mute Sine, test fade in/out
  • Verify ugen cleanup on engine close (no leaked IDs)

🤖 Generated with Claude Code

Pure-Python control bindings for Arco using o2litepy. Replaces direct
O2 message construction with a Ugen class hierarchy that mirrors the
Serpent bindings.

- arco_engine.py: ArcoEngine lifecycle (connect/close/context manager),
  UgenID pool, action system, constants, utilities
- arco_ugens.py: Ugen base class and ~50 concrete wrappers
- arco_instr.py: Instrument framework (Param, Synth, Note/Score, etc.)
- arco.py: re-export layer for backward compatibility
- apps/test/python/init.py: NiceGUI interactive demo app

ArcoEngine holds strong references to all ugen shadows, preventing
accidental GC from sending premature /arco/free messages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant