Flash light button while recording VT

You have a question or need an advice about how to do something? Ask it here!
Post Reply
warmeman
Posts: 24
Joined: 05 Feb 2023 12:15
Flash light button while recording VT

Post by warmeman »

To record voice tracks use a button on my airlite: B8
I did this with the following code: CTRL_SWITCCH.16=1 : VT_REC_BUTTON
This command starts the recording and I can also stop the recording with the same button.
I also gave this button a green led color in Events/Commands at "Playlist-OnOpened": EXEC_SEND_DRAIRLITE_SETLED 16|2
Now I would like this green led to flash while recording the voice track and stop flashing again when the recordings stop. Is this possible ?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Flash light button while recording VT

Post by radio42 »

I would actually use the following events and commands:

You can in this case even remove the "Playlist.OnOpened" event/command...theoretically you can use the "Playlist-OnStartup" event and set the color of the B8 led to its initial state (in my case Yellow) : EXEC_SEND_DRAIRLITE_SETLED 16|3


"Application.OnVoiceTrackingOpen":
EXEC_SEND_DRAIRLITE_SETLED 16|2
EXEC_VAR_SET VTblink|0

-> When the voice tracking dialog is opened, the B8 led turns Green. Plus you initialize our own variable (called 'VTblink') to 0.

"Application.OnVoiceTrackingClose":
EXEC_SEND_DRAIRLITE_SETLED 16|3
EXEC_VAR_SET VTblink|0

-> When the voice tracking dialog is closed, the B8 led turns back to Yellow. Plus you reset our 'VTblink' variable to 0.

In your GPIO application you then assign the following to your B8 click (you assign 3 commands):
EXEC_COMMAND2 ${isvoicetrackingopen}|Equals(1)|VT_REC_BUTTON
EXEC_COMMAND2 ${isvoicetrackingopen}${VAR:VTblink}|Equals(10)|EXEC_VAR_SET VTblink|1${CRLF}EXEC_SEND_DRAIRLITE_SETLEDBLINK 16|1|0|1
EXEC_COMMAND2 ${isvoicetrackingopen}${VAR:VTblink}|Equals(11)|EXEC_VAR_SET VTblink|0${CRLF}EXEC_SEND_DRAIRLITE_SETLED 16|2


What does the do?
It uses a macro variable and uses your own user defined user variable:
${isvoicetrackingopen} : returns 1 if the voice tracking dialog is open, else 0
${VAR:VTblink} : returns the value of the variable called 'VTblink'

When the buttom B8 on the DnR is now clicked...
1. you trigger the click on the REC button (but only if the voice tracking is open) and...
2. If the two variables result in 10 (open and not blinking), you set 'VTblink' to 1 AND let the LED blink in Red.
3. If the two variables result in 11 (open and blinking), you set 'VTblink' to 0 AND switch the LED to Green.
warmeman
Posts: 24
Joined: 05 Feb 2023 12:15
Re: Flash light button while recording VT

Post by warmeman »

Thanks for your explanation!
But I don't get yellow color. I was also under the impression that red and green are the only colors you can use with an airlite. At 3 it doesn't give me any color.

Maybe a stupid question, but where can I find the GPIO application where I have to place those codes?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Flash light button while recording VT

Post by radio42 »

Sorry, I don’t have an Airlite, but just the API specs. So probably only the Airence supports a yellow color. But this doesn’t change much - in your case just None=0; Red=1; Green=2.

The GPIO Client application is also installed with ProppFrexx in the installation folder.
But when you activate the GPIO Ext. Service in the general settings, it should be started automatically. You find it then in the Windows Tray Icons…

Post Reply