Module xObservable
Be 'smart' about observable properties in the Renoise API .
This class tries to be clever and provide 'inside knowledge' about properties. For example, the valid range of a "selectedinstrumentindex" is an integer with a minimum of 1
For now, we only care about the "first level" properties - the ones that belong to the song object.
Functions
get_by_type_and_name (str_type, str_obs, str_prefix) | combine the above search with a match for a given name |
get_keys_by_type (str_type, prefix, arr) | return a 'flattened' list of observable names, e.g. |
attach (obs, arg1, arg2) | Add notifier, while checking for / removing existing one supports all three combinations of arguments: function or (object, function) or (function, object) |
Functions
- get_by_type_and_name (str_type, str_obs, str_prefix)
-
combine the above search with a match for a given name
Parameters:
- str_type (string), one of xStreamArg.BASE_TYPES
- str_obs (string), e.g. "transport.keyboardvelocityenabled_observable"
- str_prefix (string), e.g. "rns."
- get_keys_by_type (str_type, prefix, arr)
-
return a 'flattened' list of observable names, e.g.
"transport.keyboardvelocityenabled_observable"
Parameters:
- str_type (string), one of xStreamArg.BASE_TYPES
- prefix (string), e.g. "rns."
- arr (table) supply observables (when we got them)
Returns:
-
table
- attach (obs, arg1, arg2)
-
Add notifier, while checking for / removing existing one
supports all three combinations of arguments:
function or (object, function) or (function, object)
Parameters:
- obs (renoise.Document.ObservableXXX)
- arg1 (function or object)
- arg2 (function or object)