Sound Effects

bitzerjd's Avatar Topic Author
User User
  • Posts: 375
  • Thanks: 3

Re: Sound Effects

1 year 7 months ago
#4023
I'm good, copy and paste works wonders. I can get around the sound file variable by simply changing and renaming the .mp3 if I want to change it. The volume one is the one I really hoped the variable would work for. I have a keypad scene for devices and need to update each number to the correct volume. I was lazy and created a couple of them (device specific). What I need to do is "variable enable" them so there is one keypad and it's aware of the device.

Please Log in or Create an account to join the conversation.

Nillaz's Avatar
User User
  • Posts: 444
  • Thanks: 36

Re: Sound Effects

1 year 7 months ago - 1 year 7 months ago
#4024
You can use variables for both the name of the file and the volume level. I'm going to implement this myself on a separate settings page of the remote so I can change the volume level of audio cues straight from the remote.

The syntax would be "ClientCMD|PlaySound|sounds/{{sound}}~{{vol}}"

You can just give these variables the filename of the .mp3 you want to use and the number for your preferred volume level as their respective values. In myDesigner you can drop this into the Server Command window for soft buttons and in the short/long press fields for hard buttons. If you want to switch between different mp3's you can change the value of the server variable with the name of the desired mp3 file and it will update the audio played on your remote in realtime.

I would maybe be cautious about using longer sound files for hard buttons that loop commands quickly (volume up/down for example) as I don't know if that's going to overwhelm the server/remote by flooding requests to repeatedly play audio files.
Last edit: 1 year 7 months ago by Nillaz. Reason: fix typo in command syntax

Please Log in or Create an account to join the conversation.

bitzerjd's Avatar Topic Author
User User
  • Posts: 375
  • Thanks: 3

Re: Sound Effects

1 year 7 months ago
#4025
You tripped me up for a bit....

The syntax would be "ClientCMD|PlaySound|sounds/{{sound))~{{vol}}"

Look at the part after "sound"

I couldn't understand why the command would not work :-).   On my laptop the font is small and the difference isn't easy to see.  Once I saw it, and it worked, I set off to simplify my setup.   I think I'm going to make the button sound command a macro so I can simply call the macro on the button and make any changes via the myServer Web Screen.

I like the concept of simple triggers on the remote calling executables on the server.

Thanks again for the help!
The following user(s) said Thank You: Nillaz

Please Log in or Create an account to join the conversation.

Nillaz's Avatar
User User
  • Posts: 444
  • Thanks: 36

Re: Sound Effects

1 year 7 months ago
#4026
Sorry for the confusion. I was so focused on making sure that I used the same folder and variable names you mentioned in your previous post that I didn't notice I made a typo with the curly braces.

Glad you got it sorted though!
The following user(s) said Thank You: bitzerjd

Please Log in or Create an account to join the conversation.

Time to create page: 0.285 seconds