4 Replies Latest reply on Apr 27, 2007 3:59 PM by charlestrent

    how do you time when 2nd mp3 starts playing

      I have a client who built a Java app to compose music tracks. They have mp3 files broken down into segments (intro, verse, chorus, turnaround, etc) that the user can piece together to form complete songs.
      My job is to find a way to preview their selections in a Flash player. Their Java app does a great job at building the composed mp3's, but they still need a way to preview their selections when the user is composing.

      So far I've been unable to get the mp3's to playback seamlessly. I've tried to preload progressive downloads and I've tried streaming. I can get the mp3's to preload but I can't get the player to play them without a pause.

      Any ideas?
        • 1. Re: how do you time when 2nd mp3 starts playing
          SymTsb Level 2
          I don't think Flash is the way to go here. I'd stick with Java and if necessary look at a 3rd party sound tool for Java's API.

          In order for Flash to play the sound like you want, you need Java to have created a temp file of the current composition. This file would not be a break down of the individual parts but a rastered final of the current state of the comp. If you can get it this far, my question would be why would you need Flash? If Java can raster the separate tracks together, why can't you save the comp into memory and build a sound player in Java that previews the selection?

          Is there more to the project that you aren't explaining?
          • 2. Re: how do you time when 2nd mp3 starts playing
            Level 1
            you're right, Java is the way to go. The Java application they've created does a great job at producing the final mp3 file.

            The probem is that they are in the process of loading the Java app on Akamai's server and can't have it ready for a demo next week.
            I talked to another Flash developer that said you can start mp3 B for mp3 A is finished playing. If I can get the timing down I might be able to make this work.

            Do you know how to start mp3 B before mp3 A is finished playing?
            • 3. Re: how do you time when 2nd mp3 starts playing
              Avi Kessner
              use mySound.duration and mySound.position

              When mySound.position > msound.duration - 10 then do
              loadSound(mySound2)

              You will have to use setInterval or Onenterframe for this, as I don't think the sound has any events outside of completion.
              • 4. Re: how do you time when 2nd mp3 starts playing
                Level 1
                thanks for the help

                If I sent you 3 mp3 sound files and paid you for your time would you try to make it work?