VoiceAttack
Profiles, Commands and Plugins => Profile and Command Discussions => Topic started by: D.D.Harriman on April 12, 2018, 03:21:08 PM
-
Ok,
Background. GeForce Experience has become broken so I have switched to OBS Studio and LightScreen.
I have VA set up to start/stop the OBS Recording and take screen shots with Lightscreen.
Problem is that in Elite Dangerous GeFe showed notifications when I was recording or when I took a screen shot and I really miss those notifications.
Lightscreen is supposed to have a built in sound alert when it takes a shot but it doesn't work. This is an easy one for me as I can simply make a sound file and add it to the VA command that executes the screen shot.
OBS is proving to be more difficult. I have several support requests out to various places hoping to find a device that has an led that I can control from VA so the light comes on when I am recording and goes out when not recording. If anyone knows of such an indicator box I would like the information. The one I currently think might work is the Genovations CP-48 keypad which supposedly has a programmable led but so far I haven't heard back from them.
In the interim I am thinking having a repeating low volume "beep/tone" on a 10-15 second timer that toggles when I toggle the recorder on and off. Recorder on, it beeps/tones then repeats the beep/tone to remind me that the recorder is running. I can record the beep/tone but how would I write the macro??
-
This is an option:
Press Right Ctrl+R keys and hold for 0,02 seconds and release
Begin Boolean Compare : [recording] Equals True
Set Boolean [recording] to False
Else
Set Boolean [recording] to True
End Condition - Exit when condition met
Set date [~nextSound] to [~nextSound] plus [10] seconds
Start Loop While : [recording] Equals True
Begin Date Compare : [~nextSound] Is Less Than Or Equals Current Date/Time
Play sound, '{VA_SOUNDS}\Recording Beep.wav' (and wait until it completes)
Set date [~nextSound] to [~nextSound] plus [10] seconds
End Condition
End Loop
When the command is triggered, it will press the key combination to stop or start recording(I'm assuming it's the same for both, otherwise you can add different keypresses to the condition instead), and if the loop isn't running it will set the variable to the running state and start the loop.
If the loop is already running, the variable will be set to the stopped state and the command will exit.
The command running the loop will stop the loop and exit.
There is something to consider here: I have the "Wait until sound completes before continuing command" option checked, which means that if you stop and start recording at the same time the sound is playing, two loops will run, and two sounds will play.
You can disable this option, but it will mean the 10 second delay will instead be 10 seconds minus the length of the sound; Pick your proverbial poison.
For the indicator light, if you're familiar with Arduino at all, you could buy a cheap clone, attach an LED(or use the internal one, if applicable), and control it via serial using an inline function. It's not as slick as something off the shelf, but you can't beat the price(and the API is pretty simple, which may not be true for a complete commercial product).
Do keep in mind that the above examples will be non-synchronized, meaning the VoiceAttack recording state and the actual OBS recording state can differ if a keypress doesn't go through(This is true for any solution relying on one-way communication, of course).
-
What gives.? Cannot copy and paste anymore??
-
What are you trying to copy and paste?
-
The posted script.
-
There's nothing restricting that from this site. You'll want to click the, 'select' link and then right-click and choose, 'copy'. If none of that is working for you, you'll want to either try clearing your browser cache or try a different browser.
-
Copying actions to text is one-way only, you can't import plain text into VoiceAttack.
There should be enough information in the text to build a working command, but I've attached a .vap that you can import directly.
-
Thank you Pfeil
I have it working as a voice command and that is set to also work with the keyboard input.
BUT, I now realize I errored in my original request.
I need it to toggle.
I toggle the video recorder on/off with the F12 key. I added this script to that script as an EXECUTE ANOTHER COMMAND and the sound does play on the ~10 interval as I want, but, even when I toggle the recorder off, the sound keeps playing.
-
even when I toggle the recorder off, the sound keeps playing.
As in it plays till the end of the sound file, or it still plays every 10 seconds?
The command should toggle itself when executed, that's what it's set up to do.
You can add some feedback to the command so you know what's happening in the background:
Begin Boolean Compare : [recording] Equals True
Set Boolean [recording] to False
Write '[Orange] Recording stopped' to log
Else
Set Boolean [recording] to True
Write '[Green] Recording started' to log
End Condition - Exit when condition met
Set date [~nextSound] to [~nextSound] plus [10] seconds
Start Loop While : [recording] Equals True
Begin Date Compare : [~nextSound] Is Less Than Or Equals Current Date/Time
Play sound, '{VA_SOUNDS}\Recording Beep.mp3' (and wait until it completes)
Set date [~nextSound] to [~nextSound] plus [10] seconds
End Condition
End Loop
Write '[Blue] Loop ends' to log
-
Ahh Yes!! It does toggle. I mixed myself up by modifying the script to play the sound file immediately so I would know the recording had started. Since I use the same voice command, the sound plays again and I just didn't wait long enough to find out that the script had indeed toggled off.
-
If you want the sound to play immediately, the only modification you need to make is to remove the first
Set date [~nextSound] to [~nextSound] plus [10] seconds
action.
It should then play when you toggle recording on, but not when you toggle it off.
If you want distinct stop and/or start sounds, those would go where the first two "Write a Value to the Event Log" actions are in my previous post.