14 Replies Latest reply on Aug 28, 2014 3:19 PM by -mikey1969-

    Audio sync issues

    BuzzyToo Level 1

      I build music education material and have animation synced with taps, clicks, and other very short sounds.  In running these instructions units (swf files), the playback varies relative to the available processing capability.  So what I create as a stead tempo has hiccups, paused, jerks, and stumbles, though the audio and video are always synced because they occur in the same timeline frame.

       

      How can I lock the fps in so that I get the prescribed tempo?

        • 1. Re: Audio sync issues
          -mikey1969- Level 1

          What is your current frame rate?

          My first move would be to crank it down to the bare minimum.  If the animations are simple enough, you can get away with as little as 8 or 10 FPS and it still looks ok.

          Then I would make sure everything is preloaded, so as to avoid download delays. 

          That'd be where I'd start....   :-)

          • 2. Re: Audio sync issues
            BuzzyToo Level 1

            Mikey1969 - Thanks for your response.  My frame rate is set at 13 fps, but I use the new ability to change fps on the fly to make it possible for the user to change the tempo.  So the possible fps runs from 2.5 fps to 12 fps.  The animation is very simple, and we don't have any problems with those rates and the minimal animation I use being OK. 

             

            We download everything in advance and use the Adobe Flash Player Projector for free-standing (nonbrowser) playback.

             

            I suspect that part of the problem is that musicians need perfect timing and the slight variations are really standing out to us.

             

            Thanks again!!

            • 3. Re: Audio sync issues
              -mikey1969- Level 1

              Hmmmmm. I guess that new ability to adjust frame rate hasn't been perfected. 

              Back in the good ol' days, Flash was designed so that timeline-based animation always stayed perfectly in sync with any audio (even over multiple tacks of audio.) 

              Out of curiosity, is your animation timeline or code based?

              Sorry I couldn't be more helpful.  :-(

              • 4. Re: Audio sync issues
                BuzzyToo Level 1

                Mikey1969 - I don't think it has anything to do with the frame rate adjustment.  We have always had problems similar to this.  The animation (such as it is) is timeline-based.  It is actually a stretch to call it animation.  It is really just arrows appearing and disappearing over the beats to be sure that every student follows the music notation.

                 

                Do you think I should be on some computer processor forums to see how I can maximize - or really focus - the processor resources rather than thinking it is something that can be done in Flash?

                • 5. Re: Audio sync issues
                  -mikey1969- Level 1

                  Honestly?  No.  I'm reasonably certain there is nothing you can do outside

                  of Flash that will make Flash work better.

                  You said this is a stand-alone exe that runs as a Windows desktop program?

                  Have you played with the publish settings? (specifically the hardware

                  acceleration settings?)

                  Would you like another pair of eyes on the file?  I'm happy to take a peek.

                  • 6. Re: Audio sync issues
                    BuzzyToo Level 1

                    Mikey1969 - I wouldn't mind your taking a look.  How do I get that to you?  It is a pretty big file.  (30 to 40 MB)

                    • 7. Re: Audio sync issues
                      -mikey1969- Level 1

                      I set up a folder on dropbox you can use, but I need an email address to

                      share the folder with.

                      • 8. Re: Audio sync issues
                        BuzzyToo Level 1

                        I did the same and came back today to ask you for yours.  My email is count@rhythmbee.com

                        • 9. Re: Audio sync issues
                          BuzzyToo Level 1

                          Mikey1969 - An example of the fla is uploaded to your dropbox BuzzyToo.

                           

                          Thanks for looking it over.

                          • 10. Re: Audio sync issues
                            -mikey1969- Level 1

                            Ah! Now I see!  Your issue isn't too many frames.  It is too few.

                            I would suggest you will have better results if you set your base frame

                            rate to 52 FPS and multiply the number of frames comprising each animation

                            by 4.

                            It will be painful to "F5" in all of the new frames, (and I don't know what

                            the implications are for your code) but I think you will find that your

                            beat will be far more consistent. 

                            • 11. Re: Audio sync issues
                              BuzzyToo Level 1

                              That will put me in the neighborhood of 4,000 frames on the main timeline and another scene of 7,800 frames that I think I can leave as is.  Is that too many for any reason that you know of?

                              • 12. Re: Audio sync issues
                                -mikey1969- Level 1

                                Not even in the ballpark of some of my big ones.  Go for it!  

                                • 13. Re: Audio sync issues
                                  BuzzyToo Level 1

                                  Thanks - I am in process now.

                                  Can you tell me what it is that will cause the swf to run smoother at faster fps?

                                  • 14. Re: Audio sync issues
                                    -mikey1969- Level 1

                                    When it comes to animation, if you want more precision, you want a higher frame rate and more frames of animation. At the size you are running, as a desktop app, your program can go screamin' fast on any computer built after about 2002. You don't need to worry about graphics updating bogging down the CPU.  Get as close to the maximum of 60 FPS as you can if you want animation to stay on beat. 52, (the current rate of 13 x 4) keeps the math simple for the update. That should be plenty.

                                    That being said, you may want to run a test if you can, before updating everything.  ;-)

                                    1 person found this helpful