sc3.seq.patch module¶
The content of this file is highly experimental.
A Patch is a language-side control graph as a possible replacement for SuperCollider’s event streams. It organize patterns and actions scheduling played by Routine as a synchronous graph that resembles synth graphs.
Objects, operands and operations, within a patch form a graph that is evaluated cyclically by triggers.
The main difference with event streams is that any object can be triggered separately and thus have its own time function. Triggers can be combined to create superimposed functions in time, e.g. each pattern can have its own timing and target the same output object.
It’s inspired by the patterns library of SuperCollider and Max/PD control flow. However, its implementation differs from them and it creates its own set of rules and behaviour, it’s a different mix.
Sequential programming was preferred to simplify side-effect actions such as resource instantiation and cleanup.
-
class
Patch
¶ Bases:
object
-
current_patch
= None¶
-
property
outlet
¶
-
property
roots
¶
-
play
(clock=None, quant=None)¶
-
stop
()¶
-
-
class
PatchFunction
(func)¶ Bases:
object
-
patch
(func)¶
-
class
BoxObject
(tgg=None, msg=None)¶ Bases:
object
-
class
TriggerObject
¶ Bases:
object
Triggers are iterators that just return floats as deltas. They are not part of the graph as nodes, they are transversal.
-
class
Trig
(hz=1)¶ Bases:
sc3.seq.patch.TriggerObject
-
class
Every
(time=1)¶ Bases:
sc3.seq.patch.TriggerObject
-
class
Within
(time=1, n=1)¶ Bases:
sc3.seq.patch.TriggerObject
-
class
RootBox
(tgg=None, msg=None)¶ Bases:
sc3.seq.patch.BoxObject
-
class
Outlet
(value, tgg=None)¶ Bases:
sc3.seq.patch.RootBox
-
class
ValueList
(lst)¶ Bases:
sc3.seq.patch.BoxObject
-
class
Event
(delta, obj)¶ Bases:
sc3.seq.patch.RootBox
-
class
Trace
(graph, prefix=None, tgg=None, msg=None)¶ Bases:
sc3.seq.patch.RootBox
-
class
Tempo
(bpm, tgg=None, msg=None)¶ Bases:
sc3.seq.patch.RootBox
-
class
Note
(*args, **kwargs)¶ Bases:
sc3.seq.patch.RootBox
-
class
Inlet
(patch, index=None)¶ Bases:
sc3.seq.patch.BoxObject
-
class
Box
(obj, tgg=None, msg=None)¶ Bases:
sc3.seq.patch.BoxObject
-
class
Message
(lst, tgg, bang=True)¶ Bases:
object
-
class
Tidyner
¶ Bases:
object
-
class
Cleanup
(lst, method=None, delay=None)¶ Bases:
sc3.seq.patch.Tidyner
-
class
CleanupFunction
(func, args=None, delay=None)¶ Bases:
sc3.seq.patch.Tidyner
-
cleanup
(func=None, *, args=(), delay=None)¶
-
class
AbstractBox
(tgg=None, msg=None)¶ Bases:
sc3.seq.patch.BoxObject
,sc3.base.absobject.AbstractObject
-
class
UnopBox
(selector, a)¶ Bases:
sc3.seq.patch.AbstractBox
-
class
BinopBox
(selector, a, b)¶ Bases:
sc3.seq.patch.AbstractBox
-
class
NaropBox
(selector, a, *args)¶ Bases:
sc3.seq.patch.AbstractBox
-
class
If
(cond, true, false)¶ Bases:
sc3.seq.patch.AbstractBox
-
class
MetaValue
¶ Bases:
type
-
class
Value
(value, tgg=None)¶ Bases:
sc3.seq.patch.AbstractBox
-
class
Map
(dct, tgg=None)¶ Bases:
sc3.seq.patch.BoxObject
-
class
Seq
(lst, repeat=1, tgg=None)¶ Bases:
sc3.seq.patch.AbstractBox
-
class
FunctionBox
(func, *args, tgg=None, **kwargs)¶ Bases:
sc3.seq.patch.AbstractBox