Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 7th, 2024, 7:20 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Stopping a sound before it starts -- sorry, long post
PostPosted: January 17th, 2006, 4:55 am 
I am using Opus Pro XE 5.5.

Let me explain the somewhat strange subject for this post.

I am building tutorials. Each contains several chapters and many pages.

Each page includes many text objects. Except for the first object, all text objects are initially hidden.

I have run the contents of every text object through a text-to-speech engine to produce thousands of .WAV files. I chose WAV rather than MP3 because size is unimportant, and I have not encountered any problems with .WAV files.

When a text object displays, I use a combination of On Show and Synchronise to End triggers to control the actions on the page. The speech sound wave files are the only sounds used in thies pubs. Therefore there is no conflict between sound channels and wanted/ unwanted sounds.

This all works perfectly, but I am aware of a situation for which I have not yet found a solution. This might arise when the user, for whatever reason, does not want to hear the spoken text.

I know that I could simply display an instruction at the beginning: If you do not want to hear the speech, turn off your speakers.

This instruction would satisfy the requirements of two seemingly conflicting outcomes:

A. The user does not hear the sounds.

B. To synchronise actions, I must have the speech files playing, even if they are not audible.


1. Ideally, I would like to add two buttons: Play Sound and No Sound on the first page. Clicking either would set the value of a persistent publication variable, PlaySound. Each time a page is displayed, the content of this variable is checked, and the sound is automatically enabled/disabled as appropriate. This should work, but after weeks of trial, I have not managed to do it.

2. My next thought was to include a button on every page to allow the user to toggle the sound on or off. I thought the Stop Wave Sound action would provide the solution, but to stop a sound, it must be playing.

3. I also considered disabling the sound, but I believe that this would require that the Stop/Play actions be applied to every sound file. Because there are thousands of sound files, that idea was impractical, even if it might work, so I did not pursue it. I could be wrong about this, and would love to be proved wrong.

I haven't tried scripting, because I am not a great script writer, but I am happy to consider a scripting solution.

Does anyone have a suggestion?


Top
   
 
 Post subject:
PostPosted: January 17th, 2006, 7:11 am 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
Hi Ray
Just a quick thought before going out for a while
Do your publication with the sound enabled.
Duplicate the pub and then disable sound
On page 2 if user clicks sound, call the pub with sound enabled.
If user clicks no sound, call the pub with no sound.
Is this thought useful or have I misunderstood what you are trying to do?
Cheers
Graham

_________________
Too much coffee can result in frequent toilet breaks!


Top
 Profile  
 
 Post subject:
PostPosted: January 17th, 2006, 7:32 am 
Hi Graham

I briefly considered that, but gave up that idea when my estimates of the size of final published, unified publication came out to more than 500MB.

The idea seemed pretty impracticable, so I broke it up.

If I have to go without a a "neat" way of stopping sound, the "turn off your speakers" message will have to do. :)


Top
   
 
 Post subject:
PostPosted: January 17th, 2006, 8:20 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Hi Ray,
Instead of turning the sound off, can you use SetVolume(Device,Volume,Fade,Channel) to set the sound level to zero?.

cheers
Paul


Top
 Profile  
 
 Post subject:
PostPosted: January 17th, 2006, 8:34 am 
Thanks Paul. I'll look into that.

Now for the hard question: where to I find that command?


Top
   
 
 Post subject:
PostPosted: January 17th, 2006, 8:34 am 
Offline

Joined: November 5th, 2004, 6:54 am
Posts: 130
Location: Hengelo, The Netherlands
Opus: 8.5/9.0
OS: Windows 7 64-bits, Android 2.1, Android 4.1.2, iOS 7
System: Pentium 7i, 6GB RAM, 750GB HD, DVD-RW (+/-), DV, 3TB EHD, 3D monitor without glasses
Hi Ray,

Can't you use script for it?

1 Create a publication variable

var hearsound

2 Create two buttons.

Button 1

hearsound = "yes"
SetVolume("Wave",100)

Button 2

hearsound = "no"
SetVolume("Wave",0)

3 Create a pagescript

if(hearsound)=="yes"
{
SetVolume("Wave",100)
}
if(hearsound)=="no"
{
SetVolume("Wave",0)
}


Place the buttons and the script in a masterpage so all pages will use it.
For more information see the Helpfile of Opus script "SetVolume()".

I built a small example to show you how it can work.

I hope this helps.


You do not have the required permissions to view the files attached to this post.

_________________
Oscar Nijst
ON Education & Consultancy
Hengelo, The Netherlands
OPUS Pro 9.5
Pentium 7i, 16GB RAM, 1 TB HD, DVD-RW (+/-), DV, 3TB EHD, 3D monitor without glasses


Last edited by osni on January 17th, 2006, 9:33 am, edited 1 time in total.

Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 17th, 2006, 8:48 am 
Thanks very much Oscar. I'll study your example.

I keep promising myself that one day I must learn to properly use scripting. :D

Unfortunately, at this stage, it takes me many times longer to script something than it does to use actions.

I know that there are occasions when scripting must be used.


Top
   
 
 Post subject:
PostPosted: January 17th, 2006, 9:26 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Hi Ray
Might not need scripting.
Look under Actions >> Audio/Video >> stop wave sound >> sounds on channel.
Might be useable.

Paul


Top
 Profile  
 
 Post subject:
PostPosted: January 17th, 2006, 11:06 am 
Hi Paul

That was the first thing I tried, and it didn't work as I thought it would -- more likely I did something wrong :(

Anyway, the way I had set it up, it would stop a sounf after the sound started, but not before. I might well have had other actions conflicting with the control of sounds.

I will re-visit with a clean page and see what happens.


Top
   
 
 Post subject:
PostPosted: January 17th, 2006, 11:14 am 
Offline

Joined: November 5th, 2004, 6:54 am
Posts: 130
Location: Hengelo, The Netherlands
Opus: 8.5/9.0
OS: Windows 7 64-bits, Android 2.1, Android 4.1.2, iOS 7
System: Pentium 7i, 6GB RAM, 750GB HD, DVD-RW (+/-), DV, 3TB EHD, 3D monitor without glasses
Hi Ray,

Indeed, you can do this without scripting.
I'm not an expert in using scripts.
But sometimes it very easy to use.

For the example Paul is talking about that isn't the right action for you (sorry Paul) :wink:.
If you want to keep playing the files you need the action for changing the volume (Change Volume). You can set the value for one button to 0% and for the other button to 100%.

Best regards,

_________________
Oscar Nijst
ON Education & Consultancy
Hengelo, The Netherlands
OPUS Pro 9.5
Pentium 7i, 16GB RAM, 1 TB HD, DVD-RW (+/-), DV, 3TB EHD, 3D monitor without glasses


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 17th, 2006, 11:21 am 
Thanks Oscar.

As that well known secret agent said, "Good thinking, 99!"

From these replies, it looks like I have plenty of alternatives to try.

Many thanks to all who have offered advice. It is very much appreciated.


Top
   
 
 Post subject:
PostPosted: January 17th, 2006, 1:07 pm 
Offline

Joined: October 26th, 2004, 1:26 pm
Posts: 262
Hi Ray,

I was going to suggest the non-script "Change Volume" action as well? ;-) (settings: All Wave sounds)

You could even use the "To variable" option and store this to disk for the user, if need be. :D

_________________
Cheers,
Steve


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group