the ever elusive sound sync question....
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: the ever elusive sound sync question....

  1. #1
    Junior Member
    Join Date
    Jan 2003
    Location
    New York City
    Posts
    10

    the ever elusive sound sync question....

    Yes Yes Yes, I know there are LOTs of posts about this issue.

    Yet despite all of the posts and reading I have done, on this and every other swish board I can find, I am still at a loss.

    Here's my senario: (file link below)
    Movie with several scenes with navigation in each scene to go to the next scene. One of the scenes has 3 short musical clips (less than 10 seconds each) But each clip has an animation that I would like to have as tightly synced as possible. (yes I know that flash is not "ideal" to do this - hence the words "as possible").

    I have compressed this file in every way possible, from the images to the scripts, trying to make it as efficent as possible for slower machines.


    This is what I *think* I know:

    By adding a silent audio swf via the loadmovienum command to the start of a scene (not level 0) I will "force the player to sync to the frame rate in that swf file.

    What I have done:

    I have used one of the "blankstream" files from swish-tutorials,
    loaded it to my webserver, and used a loadmovienum command to load the file at the onload of the critical scene. (but I don't know to know that it actually works....)

    The music clips are triggered as an event sound in a sprite.
    The volume for the sprite is then controllable via a volume slider.

    The blankstream file is a 20fps and my movie is also set at 20fps.
    This file was built using swishmax, and set to constant 20 fps rate.
    (not sure if I am supposed to do that with max, most of the tutorials and forum posts are pre-max).

    What I am seeing:

    even on very fast computer - 2.8 ghz P4 with 2 gig mem -
    the animations play at a differnt speed each time they are played.
    (the user can run a music clip over and over)

    What I don't know:

    Is the blank sound solution applicable to SWISHmax? or does the constant frame rate negate the need for that?

    does loading an swf automatically start it playing?
    (so this begs the question with the files from s-t, do they automatically start?)

    Should my music clips be made into independant swf files?
    and then loaded and played with load movie?
    (I don't know to to trigger the start of a sound in a loaded swf)

    I have uploaded all of my current working files here:
    http://www.eclecticprecision.com/flashtest/

    Just look for the HIGHEST number in the directory listing.
    (currently it is demo76-20fps)
    If you want to skip ahead, there are "invisible" skip buttons on the left side - mouse over and you can see them.
    to skip to the music section use ms_skip.

    (a possible conclusion? is that maybe the animations are too complex? but based on what I have seen, I can't beleive it.)

    I really hope that someone has it in their heart to help me out here!
    or maybe point me to a "current" tutorial. The one that everyone points to here is so old that the file links don't work anymore....

    Thanks soooooooo much
    SEPP!

  2. #2
    SWiSHer extraordinaire
    Join Date
    Dec 2000
    Location
    Australia
    Posts
    3,900
    Keep an eye out on SWiSHmax beta updates at the SWISHmax BUG forum in the next week or two.
    Roger Onslow - SWiSHmax: its here!

  3. #3
    Senior Member Dead Rabbit's Avatar
    Join Date
    Oct 2002
    Location
    Back in Tampa FLA again - and happy!
    Posts
    2,403

    Re: the ever elusive sound sync question....

    Originally posted by Spenlinhauer
    I have compressed this file in every way possible, from the images to the scripts, trying to make it as efficent as possible for slower machines.
    Keep the framerate around 20fps, which should be fine. Anything higher starts to become a problem based on what's happening on screen.
    By adding a silent audio swf via the loadmovienum command to the start of a scene (not level 0) I will "force the player to sync to the frame rate in that swf file.
    Not necessary in Max, as the Constant Frame Rate option will lock it.
    What I am seeing:

    even on very fast computer - 2.8 ghz P4 with 2 gig mem -
    the animations play at a differnt speed each time they are played.
    (the user can run a music clip over and over)
    It depends on the animations and the objects. If you have a lot of objects or even just one or two very large objects that have effects that use Alpha values below 100% (as in fading), they will cuse the system to work very hard. Flash Player calculates the pixels for the object and its alpha state, but also what's behind it, it what will be behind it soon. For instance, if you have 2 large objects fading as they move and passing over each other, Flash player has to calculate a minimum of 3 layers of data for each pixel affected. This uses a lot of system resources.
    What I don't know:

    Is the blank sound solution applicable to SWISHmax? or does the constant frame rate negate the need for that?
    Not applicable - Max does the work now.
    does loading an swf automatically start it playing?
    (so this begs the question with the files from s-t, do they automatically start?)
    Yes, and yes.

    Should my music clips be made into independant swf files?
    and then loaded and played with load movie?
    (I don't know to to trigger the start of a sound in a loaded swf)
    Not unless thay are large enough to slow down the initial load time of the movie, AND you are willing to wait for them to load (or begin streaming) once you need them. Use a Play Sound action to play a sound that is part of the movie. There is a Sound menu in the Guided Mode scripting menu.

    (a possible conclusion? is that maybe the animations are too complex? but based on what I have seen, I can't beleive it.)
    This is certainly possible, based on the response above. Most folks don't realize the aplha changes can be a problem, and should be used in moderation.

    I really hope that someone has it in their heart to help me out here!
    or maybe point me to a "current" tutorial. The one that everyone points to here is so old that the file links don't work anymore....

    Thanks soooooooo much
    SEPP!
    We're here. Digest this and post again for more details.
    Last edited by Dead Rabbit; 12-07-2003 at 09:04 AM.
    While changing my profile, I accidentally clicked the link that said
    "Add 'Dead Rabbit' to your Ignore List"
    so now I can't talk to myself anymore...

    The Repository -:- The Forum

  4. #4
    Junior Member
    Join Date
    Jan 2003
    Location
    New York City
    Posts
    10
    Thank you Dead rabbit ,

    I am not sure from your post if you looked at my files, but as part of my file reduction, I did remove all non-essential fades and replaced them with place and remove tags. (not sure how these use system resources, but there was an improvement in the speed and reliablity over the fades).
    One other thing, that I "figured out on my own" was that the volume slider command that I was using was sucking up resouces by using an onEnterFrame event. This caused the processor to constantly check the position of the slide and adjust the volume accordingly. The new command only engages while the mouse is actually dragging the volume slider. This was a MAJOR factor in my orginal speed problems.

    I will remove the silent audio swf based on your suggestion and repost that to my online working folder(see above for link) for anyone who is following this tread. (it won't be till monday).

    Another forum member on the SWISHzone forums has posted a .swi file for me to look at, and I will as soon as I can.

    You can see that post here:
    http://www.swishzone.com/forums/

    And the files that "plugnplay" is refering too in that forum post are in this thread:http://www.swishzone.com/forums/

    Thank you again for your notes,
    I will be sure to post a follow up when there is more...

    SEPP!
    Last edited by Spenlinhauer; 12-07-2003 at 02:42 PM.

  5. #5
    Senior Member Dead Rabbit's Avatar
    Join Date
    Oct 2002
    Location
    Back in Tampa FLA again - and happy!
    Posts
    2,403
    I didn't have time to look at your files, but I will in the next day or so. In the meantime, keep us posted!
    While changing my profile, I accidentally clicked the link that said
    "Add 'Dead Rabbit' to your Ignore List"
    so now I can't talk to myself anymore...

    The Repository -:- The Forum

  6. #6
    SWiSHer extraordinaire
    Join Date
    Dec 2000
    Location
    Australia
    Posts
    3,900
    Please see latest test build 2003.12.10 available from swishzone.com SWiSHmax bugs forum.
    Roger Onslow - SWiSHmax: its here!

  7. #7
    Junior Member
    Join Date
    Jan 2003
    Location
    New York City
    Posts
    10

    ALL BETTER NOW!!!!

    The Guys over at Swish have done it again!

    You can see the fruits of their labor (and mine using the new Frame syncronized sound feature) in my final flash demo:

    Open web page here - then click the DEMO link on that page



    Thank you again Guys!

    REGARDS,

    SEPP!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com