Module Duplex.RoamingDSP
Extend this class if you want an application to lock onto a specific type of device, or navigate between similar devices.
Inheritance: Duplex.Application > Duplex.RoamingDSP
The application can target any device that has been selected in Renoise, freely roaming the tracks. If the lock button starts to blink slowly, it is to remind you that the application is currently 'homeless', has no matching device to control.
Opposite to the "free-roaming mode" we have the "locked mode" which will lock to a single device. The locked mode can either be set by being mapped to a button, or via the options dialog. In either case, the application will 'tag' the device with a unique name.
To complement the "lock" button, we also have a "focus" button. This button brings focus back to the locked device, whenever you have (manually) selected an un-locked device.
Finally, we can navigate between devices by using the 'next' and 'previous' buttons. In case we have locked to a device, previous/next will "transfer" the lock to that device.
Changes
0.98
- First release
Functions
__init (VarArg) | Constructor method |
start_app () | inherited from Application |
initial_select () | this search is performed on application start if not in locked mode: use the currently focused track->device if we are in locked mode: recognize any locked devices, but fall back to the focused track->device if no locked device was found |
goto_previous_device () | goto previous device search from locked device (if available), otherwise use the selected device |
goto_next_device () | goto next device search from locked device (if available), otherwise use the selected device |
search_previous_device (track_index, device_index) | locate the prior device |
search_next_device (track_index, device_index) | locate the next device |
goto_device (track_index, device_index, device, skip_tag) | attach to a device, transferring the 'tag' if needed this is the final step of a "previous/next device" operation, or called during the initial search |
update_prev_next (track_index, device_index) | update the lit state of the previous/next device buttons |
do_device_search () | look for a device that match the provided name it is called right after the target device has been removed, or by initial_select() |
get_unique_name () | get the unique name of the device, as specified in options |
device_is_valid (device) | test if the device is a valid target |
tag_device (device) | tag device (add unique identifier), clearing existing one(s) |
on_idle () | inherited from Application |
get_selected_device () | return the currently focused track->device in Renoise |
attach_to_selected_device () | attempt to select the current device failing to do so will clear the target device |
attach_to_device (track_idx, device_idx, device) | attach notifier to the device called when we use previous/next device, set the initial device or are freely roaming the tracks |
_attach_to_track_devices (track) | keep track of devices (insert,remove,swap...)
invoked by attachtodevice() |
follow_device_pos () | select track + device, but only when follow_pos is enabled |
update_lock_button () | update the state of the lock button |
_build_app () | inherited from Application |
on_new_document () | inherited from Application |
on_release_document () | inherited from Application |
clear_device () | de-attach from the device |
_update_record_mode () | update the record mode (when editmode or record_method has changed) |
_attach_to_song () | attach notifier to the song, handle changes |
_remove_notifiers (observables) | "brute force" removal of registered notifiers |
Tables
default_options | Options |
available_mappings | Mappings |
Fields
self.automation | (Duplex.Automation) used for recording movements |
self._record_mode | (bool) set while recording automation |
self.target_device | (renoise.AudioDevice) the device we are currently controlling |
self._blink | (bool) current blink-state (lock button) |
self.track_index | (int) the target track index |
self.device_index | (int) the target device index |
self.current_device_requested | (bool), set when we should attempt to attach to the current device (althought we might not succeed) |
self._parameter_observables | (table) list of observable parameters |
self._device_observables | (table) list of observable device parameters |
Functions
- __init (VarArg)
-
Constructor method
Parameters:
- VarArg ), see Application to learn more
- start_app ()
-
inherited from Application
Returns:
-
bool or nil
See also:
- initial_select ()
- this search is performed on application start if not in locked mode: use the currently focused track->device if we are in locked mode: recognize any locked devices, but fall back to the focused track->device if no locked device was found
- goto_previous_device ()
-
goto previous device
search from locked device (if available), otherwise use the selected device
Returns:
-
bool
- goto_next_device ()
-
goto next device
search from locked device (if available), otherwise use the selected device
Returns:
-
bool
- search_previous_device (track_index, device_index)
-
locate the prior device
Parameters:
- track_index (int) start search from here
- device_index (int) start search from here
Returns:
-
table or nil
- search_next_device (track_index, device_index)
-
locate the next device
Parameters:
- track_index (int) start search from here
- device_index (int) start search from here
Returns:
-
table or nil
- goto_device (track_index, device_index, device, skip_tag)
-
attach to a device, transferring the 'tag' if needed
this is the final step of a "previous/next device" operation,
or called during the initial search
Parameters:
- track_index (int) start search from here
- device_index (int) start search from here
- device (renoise.AudioDevice)
- skip_tag (bool) don't tag device
- update_prev_next (track_index, device_index)
-
update the lit state of the previous/next device buttons
Parameters:
- track_index (int)
- device_index (int)
- do_device_search ()
- look for a device that match the provided name it is called right after the target device has been removed, or by initial_select()
- get_unique_name ()
-
get the unique name of the device, as specified in options
Returns:
-
string
- device_is_valid (device)
-
test if the device is a valid target
Parameters:
- device (renoise.AudioDevice)
Returns:
-
bool
- tag_device (device)
-
tag device (add unique identifier), clearing existing one(s)
Parameters:
- device (renoise.AudioDevice), leave out to simply clear
- on_idle ()
-
inherited from Application
See also:
- get_selected_device ()
-
return the currently focused track->device in Renoise
Returns:
-
Device
- attach_to_selected_device ()
- attempt to select the current device failing to do so will clear the target device
- attach_to_device (track_idx, device_idx, device)
-
attach notifier to the device
called when we use previous/next device, set the initial device
or are freely roaming the tracks
Parameters:
- track_idx
- device_idx
- device clear the previous device references
- _attach_to_track_devices (track)
-
keep track of devices (insert,remove,swap...)
invoked by
attachtodevice()
Parameters:
- track (renoise.Track)
- follow_device_pos ()
- select track + device, but only when follow_pos is enabled
- update_lock_button ()
- update the state of the lock button
- _build_app ()
-
inherited from Application
Returns:
-
bool
See also:
- on_new_document ()
-
inherited from Application
See also:
- on_release_document ()
-
inherited from Application
See also:
- clear_device ()
- de-attach from the device
- _update_record_mode ()
- update the record mode (when editmode or record_method has changed)
- _attach_to_song ()
- attach notifier to the song, handle changes
- _remove_notifiers (observables)
-
"brute force" removal of registered notifiers
Parameters:
- observables
- list of observables
- observables
Tables
- default_options
-
Options
Fields:
- locked Enable/Disable locking
- record_method Determine how to record automation
- follow_pos Follow the selected device in the DSP chain
- available_mappings
-
Mappings
Fields:
- lock_button control the locked state of the selected device
- next_device used for locating a device across tracks
- prev_device used for locating a device across tracks
Fields
- self.automation
- (Duplex.Automation) used for recording movements
- self._record_mode
- (bool) set while recording automation
- self.target_device
- (renoise.AudioDevice) the device we are currently controlling
- self._blink
- (bool) current blink-state (lock button)
- self.track_index
- (int) the target track index
- self.device_index
- (int) the target device index
- self.current_device_requested
- (bool), set when we should attempt to attach to the current device (althought we might not succeed)
- self._parameter_observables
- (table) list of observable parameters
- self._device_observables
- (table) list of observable device parameters