|
|
|
The following page was printed from RemoteCentral.com:
Prontoscript to play a .WAV file
| |
|
Topic: | Prontoscript to play a .WAV file This thread has 13 replies. Displaying all posts. |
|
Post 1 made on Wednesday December 8, 2010 at 14:24 |
lscolman2 Long Time Member |
Joined: Posts: | July 2003 216 |
|
|
Hi,
Can anyone help me out with the prontoscript required to playback a .WAV file.
I've looked through the developers guide, but I haven't been able to see anything in there to help.
Thanks in advance
Cheers, Lee
|
|
Post 2 made on Wednesday December 8, 2010 at 14:46 |
gopronto Senior Member |
Joined: Posts: | April 2008 1,453 |
|
|
I think you might have to put a button on a hidden page add the wav to the button and the get your code to activate the button.
|
Pronto still one of the best Wi-Fi Remotes, www.ikonavs.co.nz and [Link: axiumcontrol.com] Axium Control |
|
Post 3 made on Wednesday December 8, 2010 at 14:59 |
Lowpro Select Member |
Joined: Posts: | March 2004 2,081 |
|
|
Of course the wave file itself needs to be available in the editor in order to add it to the action list of a given button. For that part of it see the below taken from the PEP FAQ.
How do I add new custom sounds in the editor? Custom sounds can be added by copying the desired .wav file to the Sounds folder which can be found directly under the ProntoEdit Professionals installation directory. Make sure the format is 16 bit, mono at 44 kHz (Windows PCM). Also note that if you want to share your configuration file with others, you will also have to separately share the sound files as they are not embedded in the configuration file.
|
LP Related Links: View my profile to access various links to key posts and downloads. |
|
OP | Post 4 made on Wednesday December 8, 2010 at 15:31 |
lscolman2 Long Time Member |
Joined: Posts: | July 2003 216 |
|
|
Hi,
I'm using a program called texttowav
This is able to generate the files in the required format, and these work fine.
My problem is for the buttons I want the sound on, there it already calls a piece of prontoscript. I was hoping that I could add a further script to the end of the script to call the wav file.
Is this possible?
Cheers, Lee
|
|
Post 5 made on Wednesday December 8, 2010 at 16:15 |
gopronto Senior Member |
Joined: Posts: | April 2008 1,453 |
|
|
you can put a wav sound and a pronto script on the same button, just like you can put an IR code and a script on the same button.
|
Pronto still one of the best Wi-Fi Remotes, www.ikonavs.co.nz and [Link: axiumcontrol.com] Axium Control |
|
OP | Post 6 made on Wednesday December 8, 2010 at 16:28 |
lscolman2 Long Time Member |
Joined: Posts: | July 2003 216 |
|
|
Hi,
How do I put both on one button. I can either add things like sounds, but then when I select the prontoscript button, that dims the other buttons. Trying the button on the pronto, and it only does one or the other (if that makes sense)
Cheers, Lee
|
|
Post 7 made on Wednesday December 8, 2010 at 16:34 |
Lowpro Select Member |
Joined: Posts: | March 2004 2,081 |
|
|
Add the sound to the action list of the given button, then invoke the action list of that button using ProntoScript from that same button.
Last edited by Lowpro on December 8, 2010 17:20.
|
LP Related Links: View my profile to access various links to key posts and downloads. |
|
Post 8 made on Wednesday December 8, 2010 at 17:00 |
randman Long Time Member |
Joined: Posts: | June 2003 424 |
|
|
On a related note, which Prontos support wav files? Does the TSU9400 support WAV?
|
|
OP | Post 9 made on Wednesday December 8, 2010 at 17:02 |
lscolman2 Long Time Member |
Joined: Posts: | July 2003 216 |
|
|
Hi Lowpro,
I'm sorry, but I don't follow that. Can you jot down the steps (with button presses and actions) I need to take?
I've read the above a couple of times, but I'm struggling. Sorry for being dim.
Cheers, Lee
|
|
Post 10 made on Wednesday December 8, 2010 at 17:21 |
Lowpro Select Member |
Joined: Posts: | March 2004 2,081 |
|
|
See the below. Step 1: Add the sound to the button's action list. Step 2: Enable ProntoScript for that button. (Enabling ProntoScript for the button doesn't remove the action list. The action list is still there. It's just hidden and can only be executed using ProntoScript at that point.)Step 3: Give the button a ProntoScript name. In this case lets say you've named it, " On". Step 4: Now include the below ProntoScript on that button or within a function located at the page or activity level that button may already be calling to. GUI.widget("On").executeActions();Done deal. When pressing the button the ProntoScript on that button is executed which in turn invokes the action list of the button as well. Keep in mind per my example above, that the use of GUI.widget will execute the action list of any button on the given page with the ProntoScript name, " On". If you wanted to target the button specifically you'd simply go with the ProntoScript (PS) below instead. CF.widget("On","PS Page Name","PS Device Name").executeActions();
Last edited by Lowpro on December 8, 2010 21:36.
|
LP Related Links: View my profile to access various links to key posts and downloads. |
|
OP | Post 11 made on Thursday December 9, 2010 at 06:33 |
lscolman2 Long Time Member |
Joined: Posts: | July 2003 216 |
|
|
Hi Lowpro,
I'll give that a go when I get home. Thanks for all your help lads.
Cheers, Lee
|
|
Post 12 made on Thursday December 9, 2010 at 10:31 |
Lyndel McGee RC Moderator |
Joined: Posts: | August 2001 12,999 |
|
|
In a single button, add your WAV sound and an IR code (note that the IR code cannot be repeated as there are 2 actions in the action list plus you will be executing this actionlist via script).
Then, click the 'PS' button.
There, add one of the following 2 lines
this.executeActions();
OR
this.scheduleActions();
Note that in a button script, javscript keyword 'this' is a reference to the current widget. :-)
The GUI.widget() lookup provided above allows you to execute actions that are stored in some other widget on current page. CF.widget provides the ability execute actions that are stored in either a different page/activity.
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|
OP | Post 13 made on Thursday December 9, 2010 at 12:44 |
lscolman2 Long Time Member |
Joined: Posts: | July 2003 216 |
|
|
Thanks everyone, worked a treat...
Cheers, Lee
|
|
Post 14 made on Thursday December 9, 2010 at 12:53 |
Lowpro Select Member |
Joined: Posts: | March 2004 2,081 |
|
|
Thanks for chiming in Lyndel. Using this.executeActions(); or this.scheduleActions(); is certainly the way to go if the action list is being executed directly from the button script and not within a function at the activity level as is always the case per my own configuration file for instance.
|
LP Related Links: View my profile to access various links to key posts and downloads. |
|
|
Before you can reply to a message... |
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now. |
Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.
|
|