Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently November 8th, 2024, 1:51 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Music over several screens
PostPosted: April 19th, 2007, 1:15 pm 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
I'm talking out loud here, as I find it a great way to solve problems. But feel free to jump in with further thoughts!

I've got a Opus v6 presentation of 16 screens. It's a glorified powerpoint, with voiceover.

Within each screen, there's say 4 sentences, each voiced, with imagery to match.

There's also a music track on channel 2. The music changes every 3 or 4 screens ... it doesn't change with every screen. The music is started by an on show page action, and stopped a couple of screens later by a sync to end to voiceover.

It's used as a sales presentation, and if played through from start to finish works flawlessly.

BUT: sales presentations can be interupted by phone calls, viewer comments etc. So there's also some navigation buttons on each screen - forward, backwards, replay page etc.

As the music isn't triggered by every page, this can cause problems - replaying a page that didn't trigger music means that the soundtrack will run out, for instance.

I was thinking of splitting the music into 16 pieces, one for each screen. But if it's played through from start to end, I bet the music wouldn't flow perfectly.

So I could have two sets of music, with the cut up stuff triggered by variables if the navigation buttons are used.

But this is getting way too complicated.

What's another way of getting the music to run well?

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 19th, 2007, 1:55 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
OK completely theoretical as my pubs don't use music in your way.

But, can you use the SEETPOSITION to play the piece of music ONSHOW for each page. If you Debug.trace with a GETPOSITION first, you could work out the timing.

Mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 19th, 2007, 9:03 pm 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
OK, sorry to be a pain, but could you tell me exactly how I'd use SETPOSITION etc?

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Last edited by Linda on April 20th, 2007, 9:10 am, edited 1 time in total.

Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 19th, 2007, 11:22 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 511
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
Very quick outline reply--from memory.. of how you can stop a sound file, store the point at which it is stopped, then restart from the stored position.--- which may help you...also check out help on Sound Script Functions.


Create a pub variable (talktime) for storing the file position.

create a sound object in a script:-
var mySound=OpenSound("C:\\the path 2 the file\\the_sound_file.mp3");



start the file playing at the beginning:-
mySound.Play(1,100,0,-1,0,0,false,false);


if someone stops the presentation, the current sound file position can be found and stored using usng:-
talktime=mySound.GetPosition();

to stop the file :-
mySound.stop();

you can then use:-
mySound.Play(1,100,talktime,-1,0,0,false,false); to play from the stored position.

or a variation of the the above

_________________
Whoever designed this, never actually used it!


Top
 Profile  
 
 Post subject:
PostPosted: April 20th, 2007, 9:11 am 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
That's brilliant, thanks - I'll go and experiment.

Thanks again, Linda

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 20th, 2007, 10:16 am 
Offline

Joined: October 25th, 2004, 1:21 pm
Posts: 424
Location: West Lancs, UK
Opus: 7
OS: Xp, Win7
Sorry, I didn't realise how far behind I am with this way of working. I need more general help in how to implement this.

I've created the pub variable talktime.

create a sound object in a script:-
var mySound=OpenSound("C:\\the path 2 the file\\the_sound_file.mp3");


Now I'm stuck. Do I create a script object for this, or is it a script within an action on the page? If it's a script object, "Script 1", what's calling it up? Or does it automatically run because it's there?

start the file playing at the beginning:-
mySound.Play(1,100,0,-1,0,0,false,false);


Again, where do I do this? I'm presuming it's an action on a button, say. If I put a script action on a button, I need to specify if if/else for or while. None of them seem appropriate; I just want it to get on and do it.

I'll stop there.... once I understand the above, maybe the rest will become more clear.

Many thanks for everyone's help!

_________________
Linda Rossiter, Rossiter & Co

Pro 8, Pro 7, Pro 6, Pro 05.5XE, Pro 04XE, XE2.8, ILM 4.5 on Win7 Professional


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 20th, 2007, 11:28 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Linda,

Sorry, but haven't had time to play with the SETPOSITION command yet.

As for you next question. Anything outside of a function, in a script object will run automatically on page start. Anything inside a function needs to be 'callled'

In the script object named SCRIPT 1

mySound = OpenSound("c:\\A.wav")

//The above will run with the publication. NOTE: all variables outside of functions are page variables and do not need the VAR to declare them. VAR is only useful for keeping a variable INSIDE a function

As for the mySound.Play(1,100,0,-1,0,0,false,false);

This can go inside a SCRIPT ACTION, that is called with the page ONSHOW.

Bascially, what will happen is that the sound will load when the publication is run, but only play when the page is displayed. Add the script action to each of your pages to play mySound from a set position. By using the STOP on your naviagtional buttons and an ISPLAYING, you could check when each page shows whether you need to call your script action or note.

NOTE: the path in open sound is absolute. if the file isn't their on the host machine, it simply won't open. Either add it to the additional resources or use a system variable such as <SYSTEM_PUBLICATION_DIR> as the path.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 30 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group