Objects¶
Comment¶
Obj¶
- class pdpy_lib.objects.obj.Obj(className=None, pd_lines=None, json=None, **kwargs)[source]¶
Bases:
Object
This class represents a Pure Data object.
- Parameters
className (
string
orNone
) – The className of the pd object.pd_lines (
string
orNone
) – The pd-lang line that represents the object, eg:#X obj 10 10 float 1
json (
dict
or None) – The json dictionary representing the object.**kwargs – Additional keyword arguments are passed
pdpy.Object
- Raises
ValueError – If the
pd_lines
provided invalid arguments
Msg¶
- class pdpy_lib.objects.msg.Msg(message=None, pd_lines=None, json=None)[source]¶
Bases:
Object
Representation of a patchable Pd Message box
This class represents a Pd message box with a list of targets. Each
target
is an instance ofMessage
.- Parameters
message (
str
, alist
ofstr
, orNone
) – A string or a list of strings with a message. Each element of the list defaults to theoutlet
target.pd_lines (
str
) – A pd-lang string with a message, eg:#X msg 10 10 Hello world
Or, for multiple targets:#X msg 10 10 Hello World \;pd quit
json (
dict
) – A json dictionary with the scope of a Msg.
Gui Objects¶
- class pdpy_lib.objects.gui.Gui(pd_lines=None, json=None, **kwargs)[source]¶
Bases:
Object
A Pd Native Gui object like
floatatom
,symbolatom
, orlistbox
A Pd Native Gui object is a graphical user interface that is implemented in pure data.
- Parameters
pd_lines (
list
) – The lines of the Pure Data patch that define the object.json (
dict
) – A JSON representation of the object.**kwargs (optional) –
Keyword arguments are:
className
: the name of the class of the objectdigits_width
: The width of the object in digitsflag
: The flag of the objectlabel
: The label of the objectfontsize
: The font-size of the object
Other keyword arguments are passed to
pdpy_lib.primitives.bounds.Bounds
andpdpy_lib.patching.comm.Comm
See also
pdpy_lib.utilities.default.Default
For default parameters.