Skip to content
Snippets Groups Projects
Commit b0fca42f authored by moon2's avatar moon2 :speech_balloon:
Browse files

bl00mbox: docs update

parent 8b7ab015
No related branches found
No related tags found
No related merge requests found
...@@ -190,8 +190,15 @@ and we can get them individually: ...@@ -190,8 +190,15 @@ and we can get them individually:
[channel mixer] (1 connections) [channel mixer] (1 connections)
output in [bud 1] lowpass output in [bud 1] lowpass
As we can see this channel has quite a lot going on. Ideally each application should have As we can see this channel has quite a lot going on. Each application should have its own
its own channel(s), so in order to get a free one we'll create a new one without argument: 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 .. code-block:: pycon
......
...@@ -74,7 +74,7 @@ def run(ins: InputState) -> None: ...@@ -74,7 +74,7 @@ def run(ins: InputState) -> None:
def init() -> None: def init() -> None:
global synths global synths
for i in range(1): for i in range(1):
synths += [blm.new_patch(bl00mbox.patches.tinysynth_fm)] synths += [blm.new(bl00mbox.patches.tinysynth_fm)]
for synth in synths: for synth in synths:
synth.decay(100) synth.decay(100)
......
...@@ -49,8 +49,8 @@ class Channel: ...@@ -49,8 +49,8 @@ class Channel:
free: bool free: bool
def clear(self) -> None: ... def clear(self) -> None: ...
def new_patch(self, patch: Type[T], init_var: Optional[Any] = None) -> T: ... def _new_patch(self, patch: Type[T], init_var: Optional[Any] = None) -> T: ...
def new_bud( def _new_bud(
self, self,
thing: bl00mbox._plugins._Plugin | int, thing: bl00mbox._plugins._Plugin | int,
init_var: Optional[int | float] = None, init_var: Optional[int | float] = None,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment