diff --git a/docs/badge/bl00mbox.rst b/docs/badge/bl00mbox.rst index 9f2b1f0ee794bbe9693e637a979379b48f9de4a9..d67269e06c3dfd67d330cfb7ddc27bcb41142c21 100644 --- a/docs/badge/bl00mbox.rst +++ b/docs/badge/bl00mbox.rst @@ -190,8 +190,15 @@ and we can get them individually: [channel mixer] (1 connections) output in [bud 1] lowpass -As we can see this channel has quite a lot going on. Ideally each application should have -its own channel(s), so in order to get a free one we'll create a new one without argument: +As we can see this channel has quite a lot going on. Each application should have its own +channel(s), so in order to get a free one we'll request a free one from the backend by +skipping the argument: + +.. note:: + Do not use .Channel(n) in application code, it's for REPL purposes only. Each + application manages their own channel(s), so they might clear out your plugins + or drag down your performance or other kinds of nasty interferences. Don't do it. + .. code-block:: pycon diff --git a/python_payload/apps/demo_melodic/__init__.py b/python_payload/apps/demo_melodic/__init__.py index 4bf3d9f977948771995a6f7eac892bf2bd05fcbc..c4079cadeda511c9af4be7152aaae65302044a2d 100644 --- a/python_payload/apps/demo_melodic/__init__.py +++ b/python_payload/apps/demo_melodic/__init__.py @@ -74,7 +74,7 @@ def run(ins: InputState) -> None: def init() -> None: global synths for i in range(1): - synths += [blm.new_patch(bl00mbox.patches.tinysynth_fm)] + synths += [blm.new(bl00mbox.patches.tinysynth_fm)] for synth in synths: synth.decay(100) diff --git a/python_payload/mypystubs/bl00mbox/_user.pyi b/python_payload/mypystubs/bl00mbox/_user.pyi index 4d059c5d7926ba7f7da412f257f67541c69c9745..5b49f53d524ef91a23764c2280d8ca12ede5a8e9 100644 --- a/python_payload/mypystubs/bl00mbox/_user.pyi +++ b/python_payload/mypystubs/bl00mbox/_user.pyi @@ -49,8 +49,8 @@ class Channel: free: bool def clear(self) -> None: ... - def new_patch(self, patch: Type[T], init_var: Optional[Any] = None) -> T: ... - def new_bud( + def _new_patch(self, patch: Type[T], init_var: Optional[Any] = None) -> T: ... + def _new_bud( self, thing: bl00mbox._plugins._Plugin | int, init_var: Optional[int | float] = None,