Thanks for the code! I've tried adding it to the examplesactions.py file but nothing happpens when I trigger  1/show_name or  show_name. Am I doing something wrong? I also tried deleting the other actions. I'm still new to the user actions so forgive me if it's totally wrong. I've attached my file as well. Thanks Stray
Ahhh... Yeah I missed that part. Thanks! However, I still get nothing. Is my py file formatted correctly? I noticed that when I added it to the original example user actions file, the others wouldn't work. ex_track stopped working after that. So I decided to take those out to see if it made a difference but no luck.
just saw the other reply. Thanks I will give that a try.
Last Edit: Jun 8, 2019 7:33:08 GMT -5 by dollanaire
One more thing, how would I turn that into a variable? I tried this and different variations but it gives me 1 when I msg it. I'm sure it's completely incorrect lol. Just trying out different ways though. Ultimately I want to push this to lemur using the code you sent me or maybe through osc. I'm guessing I would need to create a separate user action for every address I were to send to?
self.canonical_parent.clyphx_pro_component.trigger_action_list('%test% = "%s"' % (name or 'No Name')) goal is to do this:
No need for variables or multiple user actions - it could all be done in the action I gave you. I wouldn't use the OSC actions for this, but I don't recall the format of the SysEx-related action I gave you. So I'll show you how to do it with OSC and hopefully you can modify it to use the SysEx-related action.
So the general format of the OSC action for this would be: osc str /the_address "The name of the clip"
And you want to combine that with show_name, so that you could do this: 1/user_clip show_name /the_address
So, same as before, but now you're telling the action which OSC address to use. With me so far?
Now, you just have to change two lines in the code from above:
First, update the method signature to accept args (to capture the address) like so: def show_clip_name(self, action_def, args):
Then, update the trigger method to include the OSC action like so: self.canonical_parent.clyphx_pro_component.trigger_action_list('osc str %s "%s"' % (args, (name or 'No Name')))
So the first blank (%s) will get filled in with the address and the second blank will get filled in with the name of the clip.
Last Edit: Jun 11, 2019 7:47:49 GMT -5 by Stray: Fixed typos
Hey stray. Sorry for the delay and thanks for the help and explicit instructions. I wanted to wait before I exhausted myself from trying different things to get this to work before asking for more help but please bear with me.
1) Is the trigger method missing an ' after the "%s" ... I'm assuming so since I put it there and the "or" turned blue in notepad ++ . I attached the py file to check if its all correct.
2) I'm also assuming I need to download the beta osc files as well for this so I did that but am having trouble and don't know whether its with the osc or Lemur. I've followed the instructions in the beta post .. added the lines with the outgoing address and port in preferences.txt I tried troubleshooting just the osc send part after the user action wouldnt work. Is this correct by doing this  OSC STR /msg "Hello world!" and creating a text object in lemur and creating an osc script for that with /msg for the address?
3) I noticed in that thread you have _user_actions folder instead of user_actions so I tried placing all user actions in both simultaneously since I wasn't clear to which one should be.
4) I'm also assuming you mean 1/show_name /the_address instead of 1/show_clip /the_address since show_name is in self.add_clip_action('show_name', self.show_clip_name)?
With so many questions, I'm not sure which part if all of it is incorrect lol.
Sorry, I should've proofed that post better. I've updated it for posterity.
1. Yes, it is. Good catch!
2. I wouldn't use OSC Actions for this. I'd use the SysEx-related action I created for you. I couldn't use that as an example since I don't recall the format. If you could tell me the format (how you use the action from an X-Trigger), I could give you an example using that format instead of OSC Actions.
3. ExampleActions.py explains the difference between user_actions (which resides inside of ClyphX Pro) and _user_actions (which resides outside of ClyphX Pro). The beta files are meant to be outside of ClyphX Pro.
Ahhh Thanks! I missed the explanation in the ExampleActions.py sorry about that. Ok well I switched it to the SysEx action instead. I came up with this:
self.canonical_parent.clyphx_pro_component.trigger_action_list('LMSG 1 %s "%s"' % (args, (name or 'No Name')))
but I have no idea how to change the ID from 1 to whatever I want. I'm trying to learn as much as possible here so thanks for helping me. Would I add another args to this or something? def show_clip_name(self, action_def, args):
and when triggering from a clip would it be:
1/user_clip show_name 4 "4" being the id that I want?
Also, it doesn't look like it from Lemur's side, but would it be possible to use a "name" instead of a number for ID. Not a huge deal but it could maybe get confusing remembering the numbers for ID's.
The format is LMSG 1 "Message" (for ID 1)
LMSGM 1 "Message" (for momentary) I'm sure I can figure out how to create the momentary action after getting the regular one corrected though.
Don't specify the ID in the trigger method. So use this: self.canonical_parent.clyphx_pro_component.trigger_action_list('LMSG %s "%s"' % (args, (name or 'No Name')))
Then, trigger the action like this: 1/user_clip show_name 4
As far as the momentary variant, there are a couple of different ways to handle that. I think the simplest to understand would be this one: self.canonical_parent.clyphx_pro_component.trigger_action_list('%s "%s"' % (args, (name or 'No Name')))
Then you could do: 1/user_clip show_name lmsg 4
Or: 1/user_clip show_name lmsgm 4
Remember that anything after the action name (show_name) will be passed to args. So, in the last set of examples, you're passing the message action name and ID (like lmsg 4) into args and that's filling in that first %s. Understandable?
Edit: On the ID question, not sure on that, but it would certainly require changes to the SysEx code and the Lemur template if it were possible.