OSC to do a Clip->Cut ?

Post your questions here and we'll all try to help.
Post Reply
nosuchtim
Met Resolume in a bar the other day
Posts: 11
Joined: Thu Jan 05, 2012 22:57

OSC to do a Clip->Cut ?

Post by nosuchtim »

I'm looking for a way to "cut" a clip using OSC. I know how to disconnect a clip, but I want to actually clear its slot (equivalent to connecting a clip and then selecting Clip->Cut or pressing control-X on the keyboard). I'm not seeing any current way other than actually sending a control-X keystroke to the Resolume process. I'd much rather use OSC to do this, since I'm currently using OSC for everything else I need to automate.

Let me pop up a level to describe what I *really* want to do, in case there's another way to accomplish my true objective. I want to automate recording so that every time I start and stop a recording (which I can do with OSC using /composition/recording/recording), it uses the same slot and output file. Currently, when you repeatedly record (start,stop,start,stop,...), a new filename and clip is generated for each recording. If I could do a Clip->Cut via OSC, I could manage to have it re-use the same slot and filename (if I delete or rename the file) every time I start a new recording.

Is there any way to do what I want using only OSC?

...Tim...

User avatar
drazkers
Wants to marry Resolume, and Resolume said "yes!"
Posts: 968
Joined: Wed May 18, 2011 10:54
Location: Brady V up in Canada

Re: OSC to do a Clip->Cut ?

Post by drazkers »

The admins can clarify if i'm incorrect. But i'm pretty sure you can't cut or delete clips based on OSC.
What you can do is use something like max MSP or openframe works. I don't see why you can select the clip via standard Resolume OSC commands and then use a background program to trigger the key stroke via a second OSC command.

http://forum.openframeworks.cc/t/osc-to ... roke/15280 may help.

nosuchtim
Met Resolume in a bar the other day
Posts: 11
Joined: Thu Jan 05, 2012 22:57

Re: OSC to do a Clip->Cut ?

Post by nosuchtim »

Well, I tried sending ctrl-x keystrokes to Resolume, and discovered an interesting wrinkle that appears to thwart this approach to cutting a clip programmatically.

If I preview a clip using an OSC command (e.g. "/layer1/clip5/preview 1"), and then send (or type) ctrl-x to the Resolume window, the clip is not cut. If instead I preview the clip using the mouse (clicking on the clip slot label), sending (or typing) ctrl-x to the Resolume window works properly - the clip is cut.

So, ctrl-x only seems to work if a mouse click has been used to preview the clip. If the clip has been previewed using OSC, it doesn't work. Unless I start faking mouse clicks (which I REALLY REALLY don't want to do), I can't think of any way to cut a clip programmatically.

...Tim...

User avatar
drazkers
Wants to marry Resolume, and Resolume said "yes!"
Posts: 968
Joined: Wed May 18, 2011 10:54
Location: Brady V up in Canada

Re: OSC to do a Clip->Cut ?

Post by drazkers »

What happens when you click in the clip area then send the select and cut command?

Sorry not near a computer with resolume to test right now.

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5185
Joined: Fri May 22, 2009 11:38

Re: OSC to do a Clip->Cut ?

Post by Joris »

Could it be you have Update Clip Panel turned off?
ClipPanel.png
ClipPanel.png (18.36 KiB) Viewed 11504 times

nosuchtim
Met Resolume in a bar the other day
Posts: 11
Joined: Thu Jan 05, 2012 22:57

Re: OSC to do a Clip->Cut ?

Post by nosuchtim »

The "Update clip panel" switch is turned on (I've never turned it off, so I assume that's the default). On further investigation, It looks like that feature doesn't work in release 4.1.7 (at least, for the ctrl-x issue I've described). Happily, it appears that somewhere between 4.1.7 and 4.1.11, this bug was fixed. When using 4.1.11, ctrl-x will work properly, at least when manually typed after using OSC to preview a clip, where it didn't work in 4.1.7. I'm still not yet seeing the ctrl-x work programmatically, but since it now works in 4.1.11 when manually typing ctrl-x, I assume I'll be able to get it working programmatically as well, soon. Thanks for the help!

...Tim...

nosuchtim
Met Resolume in a bar the other day
Posts: 11
Joined: Thu Jan 05, 2012 22:57

Re: OSC to do a Clip->Cut ?

Post by nosuchtim »

Well, I've now tried two different ways of sending a ctrl-x programmatically to the Resolume window, and it doesn't do anything (i.e. it doesn't do the same thing as manually typing ctrl-x in the window). I've tried using the nircmd.exe utility as well as the Windows Scripting Host. Here's the wsh script I'm using - if you stick this code into a file named "sendctrlx.vbs" and execute it, it should illustrate the problem:

Code: Select all

WScript.Sleep(1000)
Set wshShell = CreateObject("WScript.Shell")
WScript.Sleep(1000)
wshShell.AppActivate("Resolume")
WScript.Sleep(5000)
wshShell.SendKeys("^x")
WScript.Sleep(1000)
wshShell.AppActivate("Command")
WScript.Sleep(1000)
wshShell.SendKeys("^x")
WScript.Sleep(1000)
WScript.Quit
The second SendKeys call (assuming there's a Command Prompt window present) shows that it does indeed send a ^X to the Command Prompt window. But sending ctrl-x to Resolume seems to be ignored, even in 4.1.11. If you click the mouse in Resolume while the Sleep(5000) is sleeping, the ctrl-x will be acknowledged.

So, I guess the issue remains in 4.1.11 - ctrl-x appears to be ignored if it's sent programmatically as opposed to being typed. The script above illustrates the problem, which is independent of any use of OSC.

...Tim...

nosuchtim
Met Resolume in a bar the other day
Posts: 11
Joined: Thu Jan 05, 2012 22:57

Re: OSC to do a Clip->Cut ?

Post by nosuchtim »

> If you click the mouse in Resolume while the Sleep(5000) is sleeping, the ctrl-x will be acknowledged.

Don't pay too much attention to that particular statement, I haven't been able to reproduce that. ...Tim...

Cassss512
Met Resolume in a bar the other day
Posts: 10
Joined: Fri Jan 28, 2022 02:40

Re: OSC to do a Clip->Cut ?

Post by Cassss512 »

I'm trying to navigate this same issue and am getting no where. Any new and exciting solutions to this since the post got started?

Post Reply