Create Sound Spectrum in AS3

I'm trying to create a spectrum display for microphone
input/playback in ActionScript 3 but can't seem to get it to work.
I understand that the SoundMixer class does not control dynamically
created Sound objects, but surely there is a way around this! Has
anyone done this or have any ideas on how to approach this problem?
I can record and playback the sound using rtmp and net streams just
fine, but can't manage to create any form of sound spectrum from
this sound. I'm at a loss here...
Any suggestions would be appreciated!!

I have created the variable and set to 0.  However i'm not sure how to get it to add one when an item on the stage is clicked on??  What would this look like??  Any help would be great
Thanks in anticipation

Similar Messages

  • Creating a website in AS3

    I have been banging my head trying to figure out where the
    objects for a AS3 website are stored that has an empty fla. Can
    anyone clear this up for me, or at best point me to a tutorial that
    explains how to create a website in AS3 this way. I understand
    using .as files for a website.

    For assets such as graphics, images, sound, and video you
    have 2 main options. You can either put them onto the timeline of
    the fla (i.e. embed them into the swf) or you can load them at
    runtime.
    For the timeline, you can drag and drop elements from your
    file browser to the stage of the open fla. You will want to look
    into making symbols, giving them instances names, and referencing
    the instance names in your actionscript.
    For loading assets at runtime you will want to look into the
    loader class.
    If you are looking for a book or tutorials, I would start
    with the built in help in Flash. Start with the Using Flash
    section.

  • How to create a Spectrum Analyzer?

    Hello people,
    Well i need to create a Spectrum Analyzer in my application, to analyze the frequencies from a auido capture.
    Any tips? Because i don't know where to start to develop this.
    My best,
    David

    DavidHenriques wrote:
    Ok i see. But how to create the graphics, exist some kind of free library related with this?You have a lot of learning to do and the FFT is the least of your worries. Check out Java implementations of the FFT from the source forge repository. Take a look at my second post in Perform Hamming window and FFT with Java for an outline of what you have to do to create the spectrum values. Take a look at JFreeChart for the display of the results though you might find it a bit slow when running real time (I use my own very very simple but fast charting).
    You can do everything mechanically without any real understanding what you are doing but I hope your examiners are looking for more; I would be.

  • Creating a Spectrum analyser

    I'm new to Labview and am trying to create a spectrum analyser for use with a accelerometer providing an variable output of 1 volt/g. I'm using a 6024E Data aquisition card which works with other instruments. I'm having a few problems with the program i've created in that it doesn't give the expected spectrum (i've connected the accelerometer to a real spectrum analyser). I've looked at the various examples provided with labview but none seem to be able to offer any help. I've included the file and any help would be really appreciated!
    Thanks in advance
    Attachments:
    spectrum_analyser.vi ‏86 KB

    In a discrete measurement system, the Nyquist criteria requires you to sample your signal at a rate that is at least twice the bandwidth (or span) you want to measure. In praxis values like 2.50, 2.56 (or higher if oversampled) are used.
    So when you expect your span to be 20 kHz you should sample at a rate of at least 2.5*20 = 50 kHz. The same story applies to your "number of lines", so if you request your measurement span to be 800 lines wide, you should acquire data blocks of 800 * 2.5 = 2000 samples.
    I have modified your VI to reflect that. If needed you can change the constant value "2.5" to a higher value (like 5.00 or 10.0 depending on the board you are using) to reduce effects of aliasing on your measurement results.
    Attachments:
    spectrum_analyser[corrected].vi ‏94 KB

  • Sound Class in AS3

    I am still learning AS3, and I was woking with sounds. This
    was to be used to stop the cound assigned to the channel1 var. When
    I click the button the sound is just muffeled a bit, but does not
    stop playing. Does anyone know it there is an issue with flash
    running in Windows Vista?
    Here is the code:
    //Stop Function
    function stopClick(evt:Event):void{
    channel1.stop();
    bStop.addEventListener(MouseEvent.CLICK, stopClick);
    Thanks

    I figured it out. When I added the soundLoaded function, I
    thought I deleted the .play() and head of my code. Now it looks
    like this, and works.
    //Creates a var musicURL and assigns it the background
    music.mp3 location name
    var musicURL:URLRequest = new URLRequest("background
    music.mp3");
    //Creates a var sndMusic and points it to the musicURL
    location
    var sndMusic:Sound = new Sound(musicURL);
    //Creates a SoundChannel var
    var channel1:SoundChannel;
    //Plays the sndMusic and assigns the soundChannel to channel1
    function errorMsg(evt:IOErrorEvent):void {
    trace("The sound could not be loaded");
    sndMusic.addEventListener(IOErrorEvent.IO_ERROR, errorMsg);
    function soundLoaded(evt:Event):void {
    trace("Sound Complete");
    //Plays the sndMusic and assigns the soundChannel to
    channel1
    channel1=sndMusic.play();
    sndMusic.addEventListener(Event.COMPLETE, soundLoaded);
    //Stop Function
    function stopClick(evt:Event):void{
    channel1.stop();
    bStop.addEventListener(MouseEvent.CLICK, stopClick);
    //Start Function
    function playMusicClick(evt:Event):void{
    channel1.stop();
    channel1=sndMusic.play();
    bPlayMusic.addEventListener(MouseEvent.CLICK,
    playMusicClick);
    Thanks. I hope this will be useful for who ever else make the
    same mistake I did.

  • Creating Scrolling Clouds in AS3

    Hi, ive spent the last 2 hours looking online for tutorials
    and such on how to create random scrolling clouds for a flash
    project im making, and after 2 hours ive found nothing at all.
    I have a canvas of 900x600, and i want clouds to span across
    900x150 of the canvas at the top. I want the clouds to go from
    right to left and overlay on the image below.
    Can anyone point me to a tutorial that will help me, or show
    me how i can make this myself... it seems there is little to no
    tutorials on the web that explains how to do this and its quite
    annoying.

    What exactly have you done? Have you drawn any of the clouds?
    Set them as movieclips or given them names?
    Assuming you've done that, in AS3 you'd simply want to create
    a function to move the clouds from right to left via their name and
    tie that to an event listener. For this simple example, make sure
    that your clouds are off the stage on the right or wherever you
    want them to start moving.
    quote:
    function moveWaterfall(e:Event):void{
    CloudName.x -= 1;
    if (CloudName.x < 0){
    CloudName.x = 900;
    quote:
    addEventListener(Event.ENTER_FRAME, moveWaterfall);
    If you have a cloud movieclip with the name CloudName, it's x
    position should reduce by 1 pixel every frame until it's x position
    becomes less than 0 in which case it's x position will reset to
    900. Adjust those values according to where you position your
    clouds.
    To increase the speed, either increase the number of pixels
    you're subtracting from the x value or increase your FPS.
    I hope this gives you some idea... I'm not exactly sure what
    you are all looking for.

  • Best way to create 'squash' effect in AS3

    Hello all, I was just wondering what the best way to distort an object using AS3 is? I am creating a game which involves a ball-like object bouncing off several hard surfaces, ideally I'd like the ball to squash on impact (think of a soft rubber ball 'squashing' as it hits off something) and I wasn't sure what the best way to do this was? It may hit off of surfaces at any angle, so it won't simply be hitting off a horizontal plane from above otherwise I'd just use the scale funtion.
    Cheers for any help with this one!

    add the ball to an empty parent.  by changing the position of the ball (in the parent), you can use scaleX and scaleY to deform your ball in a realistic manner.

  • Creating YouTube playlists with AS3 ?

    Are there any libraries for creating YouTube playlists and creating, updating and/or deleting videos within a playlist ?
    I have googled and am in total dismay that nothing is showing up on how to do this from within Flex/AS3 projects.

    Run away, run away.
    I created a sample for the Flextras DataSorter for editing YouTube Playlists.  It was a nightmare.  None of the API documentation was any good and the XML packets you had to send[and the ones you got back] were nothing worth documenting.
    There are throttling limits, so for big updates you need to add an artifical delay or else you'll get a bunch of errors.
    This is the app:
    https://www.flextras.com/DataSorter/Samples/YouTubeSample/
    Source code for everything but the DataSorter component should be available.  ( https://www.flextras.com/DataSorter/Samples/YouTubeSample/srcview/index.html ).
    Look at the com.flextras.samples.youTube.view.PlayListDisplay.mxml component.  It looks like I documented it a lot.  Let me know if you can take the code and turn into a reusable library.

  • Creating Sound in webdynpro!

    hi to all..
    Is there any method to create or use existing sound  files in webdynpro application?
    Urs GS

    Hi Sathishkumar,
    You need to use Java code, so to manage audio you can use Java Sound API. Here smart links in order to implement the heterogeneous implemetations on Sounds:
    http://java.sun.com/docs/books/tutorial/sound/index.html
    http://java.sun.com/products/java-media/sound/
    Hope this help you.
    Vito

  • How do I create a button in AS3?

    Hello Everyone
    How do I create a button in action script 3 and handle the click event?
    Thanks

    Maybe this will help you get started.
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.display.Graphics;
    var button:Sprite = new Sprite();  //Sprite to act as the button graphic.
    //Set the color of the button graphic
    button.graphics.beginFill(0xFFCC00);
    //Set the X,Y, Width, and Height of the button graphic
    button.graphics.drawRect(10, 10, 200, 60);
    button.graphics.endFill(); //Apply the fill
    this.addChild(button);  //Add Button Sprite to stage
    button.useHandCursor = true;
    button.buttonMode = true;
    button.mouseChildren = false;
    button.addEventListener(MouseEvent.CLICK, buttonClickHandler);
    function buttonClickHandler(event:MouseEvent):void
               trace("Button clicked!");

  • What scripting language is better for creating games, AS2 or AS3?

    Just need to know the anser to the question in the title for future reference.
    Thanks!

    AS3 by a landslide and AS4 when it debuts. A better question would be which AS3 (3D) framework to write the game in. In that case check them out here:
    http://www.adobe.com/devnet/flashplayer/stage3d.html

  • Programmatically creating a ColorPicker in AS3

    Has anyone else run into issues trying to import the
    ColorPicker class into a AS3 project. I am working an AS3 project
    that requires I use a ColorPicker to change colors within the
    project. After running into error after error from within the
    project I started a new project to see if I could duplicate the
    error:
    In the new test project all I have is
    import fl.controls.ColorPicker;
    and I get this error everytime I publish or try to test the
    movie
    1172: Definition fl.controls:ColorPicker could not be found.
    Anyone got a clue to what's going on? I have contacted Adobe
    Tech Support but they were not able to help me solve the problem.
    Any help would be greatly appreciated.
    Thanks.

    Craig,
    Thanks that fixed the problem. I was trying to add the color
    picker without putting it in the Library. Never dawned on me that I
    had to put it in the Library for it to work. Do you have to do that
    with all AS3 components???
    Thanks in advance.

  • Need Help Creating Sound and Subtitle Setup Menu Scripts

    Can someone point me to a tutorial or assist me with completing this menu:
    http://www.aviewofyou.tv/mule/setupmenu.jpg
    Basically, the user gets to pick their audio in stereo or 5.1 as well as whether or not the want to see the subtitles. So it would be cool to set it up so that that after they pick, say, Surround Sound, the script tells the DVD to play the 5.1 track and then places them on the Play Concert button. Same for stereo and subtitles.

    That's easier than you think, and it does not involve scripting.
    Audio section:
    Cllick on a stereo mix button in menu editor. Go to Inspector and chose Audio stream that contains Stereo mix. Set button target to Subtitles off button.
    Do the same for 5.1 mix.
    Subtitles section
    Click on Subtitles off button. In the Inspector select an empty subtitles stream (32 for example) and set button target to Play Concert button
    For Subtitles on button select the true subtitle stream and click "SHOW" box. Set button's target to Play Concert button.
    That's all there is to it.

  • Framework for creating Flash applications in AS3

    Can anyone suggest a good framework for developing Flash AS3 applications? I have worked on two Flash frameworks till date: GAIA and PureMVC.
    While GAIA is more focused on Website development and I find PureMVC a bit complex as I was not able to find anywhere the best approach to use the framework efficiently.

    Very delayed reply on this one, but I thought still worth mentioning a year after the fact.  Over the last couple of years, working in a number of ad agencies, I've progressively built my own Flash CMS framework called Redblox (http://redblox.ca). 
    It's a framework I'm positive you've never seen the likes of before!  Redblox uses XML files as a blueprint to recursively build you're entire website.  Redblox framework concentrates on separating core functionality from behavioural functionality (see website for more info on that). Every component (ie, textfield, image, menu, layout, scrollbar, video player, everything!) is represented as an XML node within a larger XML structure and therefore its parameters, animations, behaviours and functionality can be added/updated/deleted directly within the XML. Consequently, using Redblox' integrated visual XML Editor allows users the ability to make these changes directly at runtime.  Simply CTRL+CLICK on any item/component while viewing the website in editor mode and the Redblox XML Editor tool will display all the information on that component to add/update/delete. Once users have made their changes, users can then save the XML blueprint of the website back to file.  Its really that simple.
    I've only recently made this framework open-source, wanting to take a new direction in its development.  I've used this framework to build microsites for Nike Training Canada (Olympics & World Juniors Hockey), Alexandre Keiths, Rogers, Purina to name a few.
    Just check out the site, you'll love it right away!
    Cheers,
    Jason Thomas

  • List sound devices in AS3

    Is it possible to list Sound output devices on a system.  I'd like to be able to list Sound output devices and play a sound to more than one sound device at the same time.  I.e. Internal speaker and a USB headset.
    I know you can capture sound from multiple input devices using Microphone.names and Microphone.getMicrophone(index);
    Can I play the sound to multiple sound devices?

    It's really context. If you're on a website, you can't access a webcam or microphone at all unless the user allows you to in their preferences, and they are prompted when you do so.
    In an AIR application I would like these advanced techniques but as you pointed out yourself with the link, the way the OS handles device addressing under the hood can likely change, so they don't advise even a 'workaround' for choosing where to send audio.
    On the example you listed above, while you're free to implement things like that, is it really a good idea to have a user have headphones on while you still intend them to hear (headphone muffled) sounds coming out of the speakers? I'm not sure why you'd like a setup such as that other than clearly separating communication from the application. I never came across a need such as this however. If I can pay attention to a game and 30 people on a Ventrilo server at the same time perfectly well, I don't think users should expect to listen to both the speakers and the headset. That's just my $0.02.
    As it is now, you're free to tinker with Adobe Native Extensions to see what added behavior it can extend AIR to regarding a desktop application.

Maybe you are looking for

  • Mophie juice pack helium iphone 5 case

    I want to make a review on my mophie case. I got it as a christmas gift about 3 months ago. I really enjoyed it for those 3 months until the charge started to flicker. When i turn the case on to start charging the phone it cant continuously charge th

  • Acrobat X - You have created an invalid conversion job.."

    I recently purchased a new computer with Windows 7 and have upgraded all my software. I have MSOffice 2010 and the download (trial) version of Acrobat X.  When I prepare a document in MSWord (in either .doc or .docx format) and click on the Create Ac

  • Jdbc in applets

    I get the applet panel displayed in a web page. however when the user clicks on the button contained within the panel, nothing happens. In the appletviewer clicking on the button leads to a applet window containing data retrieved from the database (w

  • System/Application startup causes error -2147220712 (and others)

    I have a developed a .NET logging application (in C#) using DAQmx and an NI USB-6210 board all running under XP Pro. All works fine when the application is launched after the host PC system has been running for some time. I have now put a shortcut to

  • Reader X don't show main window

    Sorry for http://forums.adobe.com/thread/960038?tstart=0 . I mean not acrobat but reader. That is problem following. Reader X start but don't show main window. It's present in process list, but GUI not visible. Tryed uninstall install. Without succes