logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
roverradio  
#1 Posted : Friday, August 5, 2022 2:43:54 AM(UTC)
roverradio

Rank: Advanced Member

Groups: Registered
Joined: 5/6/2016(UTC)
Posts: 83
United States

Was thanked: 5 time(s) in 5 post(s)
Looking to implement the following:

* Midi controller button is held for 4 seconds, so Dynamicvalue1 is set to foo
* Upon release of button, Dynamicvalue1 is set to bar

It's easy enough to determine when the midi button is in a pressed state (velocity = 127 for instance), but how would I determine how long it's been in that state to then do the next action (set dyanmicvalue)? And of course if it's released before 4 seconds, it resets to default state.

Any examples exist? I've searched but didn't seem to find any.

Thanks!
doggy  
#2 Posted : Friday, August 5, 2022 3:15:45 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,216
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: roverradio Go to Quoted Post
Looking to implement the following:

* Midi controller button is held for 4 seconds, so Dynamicvalue1 is set to foo
* Upon release of button, Dynamicvalue1 is set to bar

It's easy enough to determine when the midi button is in a pressed state (velocity = 127 for instance), but how would I determine how long it's been in that state to then do the next action (set dyanmicvalue)? And of course if it's released before 4 seconds, it resets to default state.

Any examples exist? I've searched but didn't seem to find any.

Thanks!


Does it have to be like this and not say press again within 4 seconds or not ?
roverradio  
#3 Posted : Friday, August 5, 2022 3:44:38 AM(UTC)
roverradio

Rank: Advanced Member

Groups: Registered
Joined: 5/6/2016(UTC)
Posts: 83
United States

Was thanked: 5 time(s) in 5 post(s)
Doesn't have to be that way per se, just figured it would be the most user-friendly. It's for setting PTZ preset to an NDI camera on a TYST 4M/E, which has Cam ID 1-8 and Preset 1-8 buttons below the PTZ joystick. see here

Presently here's what I did to set PTZ preset:

* Press and hold CAM ID
* Press preset # you want to set

That fires a script that makes an http post to birddog camera API to write the current position to the cameras's associated preset #.

Works well, EXCEPT you need to release the Preset button before you release the Cam ID button. Holding the CAM ID button (velocity = 127) sets the camera to be set and a dynamicvalue to "save" as opposed to the normal "recall" which just recalls the PTZ position. If you release cam ID and Preset at the same time, it reverts back to recall and doesn't save the value.

So I figured the easiest way to idiot-proof it would be to just "press and hold" for 4 seconds whatever preset button you wanted to set, without needing to press the cam ID button.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.