OSC Message Elements#
In order to create a correct OSC message, we will use a few classes that set the specific Sub Elements of the <osc> Element.
We can create a message from ElementTOSC with:
- ElementTOSC.createOSC(message=<tosclib.elements.OSC object>)[source]#
Builds and appends an OSC message
- Parameters
message (tosclib.elements.OSC) –
- Return type
Then we can construct a custom osc message with the help of these classes:
- class tosclib.tosc.OSC[source]#
Default Elements and Sub Elements for <osc>
- Parameters
enabled (str, optional) – Boolean. Defaults to “1”.
send (str, optional) – Boolean. Defaults to “1”.
receive (str, optional) – Boolean. Defaults to “1”.
feedback (str, optional) – Boolean. Defaults to “0”.
connections (str, optional) – Binary.
"00001" (Defaults to) –
triggers (List[Trigger], optional) – [Trigger].
[Trigger()]. (Defaults to) –
path (List[Partial], optional) – [Partial].
[Partial (Defaults to) –
arguments (List[Partial], optional) – [Partial].
[Partial –
- __init__(enabled='1', send='1', receive='1', feedback='0', connections='00001', triggers=[<tosclib.elements.Trigger object>], path=[<tosclib.elements.Partial object>, <tosclib.elements.Partial object>], arguments=[<tosclib.elements.Partial object>])[source]#
- Parameters
enabled (str) –
send (str) –
receive (str) –
feedback (str) –
connections (str) –
triggers (list[tosclib.elements.Trigger]) –
path (list[tosclib.elements.Partial]) –
arguments (list[tosclib.elements.Partial]) –
- __new__(**kwargs)#
- class tosclib.tosc.Partial[source]#
Default Elements for <partial>
- Parameters
type (str, optional) –
"CONSTANT" –
"INDEX" –
"VALUE" –
"CONSTANT". ("PROPERTY". Defaults to) –
conversion (str, optional) –
"BOOLEAN" –
"INTEGER" –
"FLOAT" –
"STRING". ("STRING". Defaults to) –
value (str, optional) – Depends on the context. Defaults to “/”.
scaleMin (str, optional) – If “VALUE”, set range. Defaults to “0”.
scaleMax (str, optional) – If “VALUE”, set range. Defaults to “1”.
- __new__(**kwargs)#