4 Replies Latest reply on Oct 16, 2007 7:21 AM by Henrik_Kjelsberg

    Static spectrum

      I'm exploring the computespectrum method and trying to make it compute faster than realtime.
      Is it possible to fastforward sound and still compute it.. Or might there be another way around?
      Input the file as raw data and use some algorythm to compute..?
      Any ideas on the subject matter is greatly appreciated..
      Thank you
        • 1. Re: Static spectrum
          I also met problems with the computeSpectrum method.
          I found intesting example in the help document showing the spectrum of a sound
          as the sound plays.
          My problem is rather stupid, what is the definition of spectrum?
          it consists byteArray data of length 512, but what is the meaning of each data?
          forgive my studpid question
          I really need someone to help me with this.. :)

          I also met a similar question as the post.
          Can I show the volume of a song in advance?
          I mean faster than realtime.
          thanks very much for any help.
          • 2. Re: Static spectrum
            Henrik_Kjelsberg Level 1
            If I understand your question, my answer would be:

            High and low frequencies.. Use readFloat on your bytearray and you end up with a float that easily can be used to transform any shape, sprite movieclip or whatever after your liking..
            • 3. Re: Static spectrum
              Level 7
              The 'spectrum' is just the frequencies of the sound - broken down into
              discreet wavelengths - the first 256 is left channel / second group of 256
              is right channel...

              To the other question - precomputing the sound. I don't think there's a way
              to fastForward and compute, but I'd think you could load the sound and play
              it without any volume so as to use computeSpectrum as needed on it.

              Dave -
              Head Developer
              Adobe Community Expert

              • 4. Re: Static spectrum
                Henrik_Kjelsberg Level 1
                Playing it threw without sound works, but it's not fast enough to play it threw.
                We've found a solution using a commandline app to compute.. Not prefered, but it seams to work fine..
                Thank you both for such quick replies!