|
Fallen.Anvil Novice
Joined: 12 Jul 2012 Posts: 47
|
Posted: Wed Jul 25, 2012 5:32 pm
Sound questions |
Can I use a trigger to have Cmud play a MP3 track for a specified number of seconds?
Alias:
Watch>
Result:
play c:\music\song1 for 10 seconds.
If volume control is available that would be great as well. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Jul 25, 2012 5:41 pm |
look up the #PLAY command. If you want to turn it off after a set number of seconds, you will need to use some kind of timer to turn it off with #PLAY OFF.
I don't believe there is any way to control the volume within Cmud. |
|
|
|
Fallen.Anvil Novice
Joined: 12 Jul 2012 Posts: 47
|
Posted: Wed Jul 25, 2012 5:47 pm |
I don't understand how timers work. Can you provide a bare bones example so I can learn from it by tinkering with it?
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Jul 25, 2012 7:50 pm |
Here is an alias that should do approximately what you want. Treat this as an example and adjust as you wish. Warning--I'm not at home so I have not tested this code:
Code: |
#ALIAS song {$sound = "c:\music\song1"; #PLAY $sound; #ALARM songstop {+10} {#PLAY off}} |
|
|
|
|
Fallen.Anvil Novice
Joined: 12 Jul 2012 Posts: 47
|
Posted: Thu Jul 26, 2012 9:36 pm |
I haven't had time to test it yet but thank you kindly.
|
|
|
|
|
|