The user actions I've created (see the three track actions listed here) all equally work with devices and clips, except they'll only apply to the selected clip or device, even if I specify DEV(3) for example. Is there a way I can implement device and clip specifications in these already-existing track actions, or do I have to create new user clip and user device actions for each one?
Yes, specifically the one I'm trying to achieve right now looks like this :
"My Track"/+ 1 DEV(ALL) (apply to 1 track after "My Track")
With the code being :
def apply_track_action_to_next_track(self, action_def, args): arg_split = args.split() track_index = list(self.song().tracks).index(action_def['track']) + int(arg_split) + 1 action = '%s/%s' % (track_index, ' '.join(arg_split[1:])) self.canonical_parent.clyphx_pro_component.trigger_action_list(action) Right now, any device action will only apply to the selected device. And this is the same for all other track actions I've created so far (see again this post for reference) such as don't apply to groups, apply to midi tracks only and apply if track name contains x. So I'm guessing if we're able to implement device specification in this one, we can do the same for all the other ones?
Ah, I see. ClyphX Pro will parse specs it supports, so you'd need to use an alternate form of the spec and then convert it. For example, you could use this as the spec: "My Track"/+ 1 DEVALL RND
Then, create a method to format the spec into what ClyphX Pro needs: def format_device_or_clip_spec(self, args): new_args =  for a in args.split(): if 'dev' in a: new_args.append('dev(%s)' % a.replace('dev', '')) elif 'clip' in a: new_args.append('clip(%s)' % a.replace('clip', '')) else: new_args.append(a) return ' '.join(new_args)
Then, in the first line of each of your action methods, call that formatter: args = self.format_device_or_clip_spec(args)