PDA

View Full Version : Background Music



handuma
10-07-2004, 08:05 PM
I've delivered a project to one of my customers that works fine on my machine but fails to perform properly for them on two different machines.

The project contains many pages of "Slideshow," a "Video" page and a "Splash" page." I wanted background sounds to play only on the "SlideShow" pages. For the splash (first) page and the video page I did not want background music.

I went to Project> Audio Settings... added a particualar piece of music (.wma) to the Background Music tab. Then, I added an Audio.TogglePlay(CHANNEL_BACKGROUND); action to the "On Show" tab of the "Splash" (first) page of the project. Next I selected the "On Close" tab of the same page and added the same Action, Audio.TogglePlay(CHANNEL_BACKGROUND);. I then added the same actions to the same tabs on the "Video" page of the project. This should have turned off Background Music on these two pages and left it on for all the other pages. When, I published the project to a CD and tested it on my machine. The application ran correctly but when I delivered it to company I was trying to sell the CD to, they said the background audio played incessantly. The client tested the application on two different systems. Did I set the actions incorrectly?
Has anyone else experienced this problem? Can I use a .wma as a BACKGROUND_CHANNEL?

Second problem:
I creaed buttons on the "Video" page and added, Video.Seek("Video1", SEEK_SPECIFIC, 1760); Actions to their "On Click" tabs.. I thought it'd make chapter buttons for the video. The buttons found specific spots in the video and jumped to them on my machine but failed to function at all on my customers machines. Did I add the right action for the job? Is there more I should know about jumping to specific locations in a video?

Please aswer ASAP. I've agreed to deliver this CD today!

Michael Morgan

yosik
10-08-2004, 03:00 AM
Michael,
As you are in a hurry, let's do a quick solution.
Instead of using toggle for the sound, just use play and stop.
3 pages:
Splash - No music
Slide show - Page.OnShow, Audio.Load Audio.Play (the music)
Page.OnClose, Audio.Stop
Video - No music.

In any case, I would use OGG instead of wma for the music as that for mat is internally supported by AMS. You can use a converter to transcode form wma to ogg. (check www.vorbis.com or DBPowerAmp).
The music will restart everytime you open the slideshow page.

As to the Video.Seek, which video format are you using? If it is Mpeg, there is a definite latency till the video finds the right spot and plays, especially if it plays from a CD. Using AVI compressed (Indeo for example) may give the fastest seeking process. Problem is how long is the video and will it fit on the CD.

Hope that helped.
Good luck
Yossi

handuma
10-08-2004, 05:12 AM
Thanks Yosik,

I'll try a .ogg for Background Music.

I may not know how to make a slideshow at all. I create a seperate page for each photo. That way, I figure, each photo can have an accompaning voice over in addition to background music. This particular slideshow has 65 pages with background music -- no voice overs. I don't know how to use, CHANNEL_USER1, CHANNEL_USER2, etc. Do you?

For Video I use compressed .wmv My computer seeks to the split second in the video track, very quickly I might add, but my customers report that it doesn't work for them. Can you think of any reason why.

yosik
10-08-2004, 08:52 AM
Michael,
Wrong strategy, I think.
You should use one page only, loading your images in an image object in a Page.OnTimer() event, launching the OnTimer action in the Page.OnShow event, deciding on the time span of your images (in milliseconds).

Put all your images in the Docs directory, and rename them in sequential order (pic1.jpg...pic68.jpg) and resize them to the SAME dimension (if they are portraits, just add background color on both sides)

Put an image object of the same dimension on your slideshow page.

Under the Ontimer tab of the page, add the following actions:

i = 0;
while i < 68 do
i = i + 1;
Image.Load("Image1", "AutoPlay\\Docs\\pic"..i);
end

Under the OnShow tab of the page, add:

Page.StartTimer(4000); --this is for 4 seconds image lifespan

So now that you have only one page, you can use the above method for the sound (load and play and stop).

As to the video, wmv....which version? could it be that you encoded it in ver 9, for example and the other machine have only a prior version?

Good luck

Yossi

handuma
10-11-2004, 05:04 AM
Hi Yossi,

I tried your script. It produced an unexpected result. Instead of every photo being displayed for four seconds, the photos flashed on the screen in rapid succession every four seconds. Surprise:)

handuma
10-11-2004, 05:30 AM
Hi Yossi,

To answer your question. I encoded a .wmv ver 7.

I think I solved the problem my client was having with AMS but I don't know which change produced the solution. a.) I changed the Background Music audio file from a .wma to an .ogg 2.) I found I'd used a .psd for the background of every photo page and changed them all to .png

After making these two small changes, I burned another version of my CD and personally dilivered it to the computer that was having trouble. The program performed wel. It including all of the fuctionality I'd hoped for. The client, however, wasn't completely convinced that all the bugs found and postponed paying me the second half until they do more testing. I hope they contact me soon with congratulation$ on doing such a fine job.

yosik
10-11-2004, 05:33 AM
OOPS!
I am sorry..got mixed up with the loops.
What you should do is:

in the OnShow Tab, put the following code:
Page.StartTimer(4000); --this is for 4 seconds image lifespan
i = 1;

The code you should use in the OnTimer tab should be:
If i > 68 then
Page.StopTimer();
end
Image.Load("Image1", "AutoPlay\\Docs\\pic"..i);
i = i + 1;

Sorry for the mixup.
Yossi

yosik
10-11-2004, 05:54 AM
Michael,
My understanding is that psd files should be used WHILE you are constructing them (with layers etc...), but as a delivery format, you should go to a smaller, a more screen friendly format, like jpg (if you do not need alpha transparency) or png, if you do.

Yossi

Protocol
10-29-2004, 11:17 PM
Love the Avatar... =)