3 Replies Latest reply on Aug 16, 2013 8:32 AM by palenoue

    Sound Animation?

    palenoue

      Is there a way to animate sound in Edge?  Two examples of what I need to do for the project I'm working on:

       

      Panning, zooming and tracking sound: Say I want to insert a loop of bird songs to track with an image of a tree.  As the tree moves from left to right the bird song plays from the left speaker to the right.  When the tree is zoomed in the bird gets louder, and as it zooms out the bird gets quieter.  This is for a web game of exploration where mp3 sound files are used

       

      Separate instruments:  Imagine the screen filled with instruments.  You click on the guitar icon and midi music plays while small sliders appear below and along the side of the icon.  The bottom slider controls which speaker the sound is played while the side slider controls the volume.  You assemble your band/orchestra by clicking on the instruments and placing them in the audio field.  This is for a web site where visitors can input musical scores with a keyboard along the bottom that records in midi format so the tunes can be swapped between instruments and adjusted, such as tweaking a piano score so it sounds better on a banjo.

       

      Is there any way to do this in Edge?  I'm not that proficient in Edge, keep getting distracted by work on other projects, and I can't figure out how to make it work.

        • 1. Re: Sound Animation?
          YOSHIOKA Ume Level 3

          Hi, palenoue.

          I tried.

           

          http://ciruelo.jp/js/edge/se/soundEffect.html

          src:  http://ciruelo.jp/js/edge/se/soundEffect.zip

           

          It's works fine on my PC.

          I use the SoundJS lib for play sounds.

          http://www.createjs.com/#!/SoundJS

           

          SoundJS can play sounds, can control pan, volume, etc..

           

          But, as you know, sound-playing environment is depend on the browser.

          (So, this sample will not work on some of the browser)

           

          If you are interested. try.

           

          Thanks.

          Ume.

          • 2. Re: Sound Animation?
            SEIF BH Level 2

            put this in CompositionReady :

             

            i=0;

             

             

            sym.$('btn').click(function(){

            i++;

            sym.play("p" + i);

             

             

            });

             

             

            sym.$('btnStop').click(function(){

             

             

            EC.Sound.stop("Sound");

             

             

             

             

            });

             

             

            and this in CreationComplete :

             

            // creation complete

            try {

                      yepnope({

                                load: "http://simonwidjaja.github.com/EdgeCommons/live/EdgeCommons-0.6.0.js",

                                callback: function() {

                      // Load sound manifest (e.g. in creationComplete)

                      var assetsPath = "sounds/";

                      EC.Sound.setup(

                                 [

                                                    {src: assetsPath + "Sound.mp3|" + assetsPath + "Sound.ogg", id: 'est'},

             

             

             

             

                                 ],

                                 function(){ EC.info("Sound setup finished", "Sound with Edge Commons"); }

                      );

             

             

             

             

                                          }

                      });

            }

            catch(error) {

                      console.error("sw", error);

            }

             

             

            c = 1;

            b = 1;

             

             

             

             

             

             

             

             

             

             

            and if you want to play the sound in some button , use Action after make this :

             

             

            EC.Sound.play("Sound")

             

             

            SEIF,

            1 person found this helpful
            • 3. Re: Sound Animation?
              palenoue Level 1

              Thanks!

               

              Following your leads I discovered where I went wrong in my attempts.