Actionscript 3 :: Using ComputeSpectrum() Call On Arbitrary Data?

Mar 28, 2011

i have some arbitrary signal data which i'd like to get a frequency analysis of. it's not audio data. is there a way to coerce AS3's computeSpectrum() call into doing this work for me ?

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Flash ComputeSpectrum: How Often Does The Data Change

Jun 25, 2010

I am executing a computeSpectrum function every 1/10 of a second (the speed I should be sampling the sound frequency to obtain a data bit). However the computeSpectrum seems to be giving me the same output every two or three times I call it.

Take a look at the source code and check the Binary read. Notice the binary read is repeating numbers, and the lack of single '0' or '1' bits? There should be some single '0's and '1's in there! I even made arrays of all of the input to check if the uncompressed ByteArray data was repeating and sure enough, the samples were quite often IDENTICAL every 2 or 3 calls...

PS: The audio sample data [More audio samples available there] I'm using is Peceptive Development's 'How to talk to Tin Can' [More info on reading audio as data there]. The audio sample provided in the archive is 'Low speed', which means the data is being sent at 100 baud (100 baud / 1000 ms = 10 bits per second)

View 2 Replies

Flash :: Translate FFT Data To Match ComputeSpectrum FFT Output

May 30, 2011

I'm used to using SoundMixer.computeSpectrum, but I need to get some data on-the-fly from the microphone (and I can't use the SoundMixer with the microphone).

I'm having trouble translating the FFT data (from this class) as shown in this excellent spectral analysis example to match the ByteArray output from computeSpectrum. My existing code is built to handle the data received from computeSpectrum (with FFT set to true).

View 1 Replies

Flex :: Arbitrary Number Of Anonymous Loader Handers With Individual Data?

May 12, 2009

I have an arbitrary number of files that I need to load in an AIR app.I want to iterate through an array of File object and create and launch Loaders for each one's File.url.When they are done (event COMPLETED or IOErrorEvent.IO_ERROR), I want to stuff their data somewhere. If they fail, I want to make an exception report. I cannot find any way to reference the File object from the event listener (certainly not the IO_ERROR)The best way would be to create individual event handlers for each Launcher that had the File information "hard-coded" into it. At the very least, I could use the function itself as an index to a Dictionary:

foo(fileToLoad : File) : void
{
var theCompletedHandler : Function =
{

[code]....

Can I use event.currentTaget and use the Loader instance as an index? Will that have any weird dependencies ?

View 1 Replies

Actionscript 3 :: Mute The Sound And Still Get Sound Data From SoundMixer.computeSpectrum?

Jun 25, 2011

I wrote something to capture sound from my microphone. I can visualise the sound data with SoundMixer.computeSpectrum.is there a way to mute the sound and still get sound data from SoundMixer.computeSpectrum?Now I have this:

sc=son.play();
var t:SoundTransform = new SoundTransform(0, 0);
sc.soundTransform = t;

but I do not get any data. if I pump up the volume, data comes through again(I need to mute it because it will echo otherwise).

View 1 Replies

Data Integration :: Use Flash To Dynamically Load XML Data Via A FlashVars Call In The HTML?

Jul 18, 2007

Im new to placing external data into Flash. I just got CS3 and Im trying to use Flash to dynamically load XML data via a FlashVars call in the HTML.

The problem is I have followed the very straight forward AS2 Help files for using FlashVars and URL variables.I have placed the code directly from the Help file into the Html between
<noscript> <noscript>and i keep getting undefined.I have tried saving the file as flash 8 and i am publish flash 8.

View 1 Replies

Actionscript 3 :: FLEX Data Manipulation Separating Data For Bargraph Display From A PHP Call

May 25, 2011

I want to separate the data from the PHP call to Different CollectionArrays So that I can use the data for a bar-graph;

I created a static version of the bar-graph and separated the Collection array manually I don't want this done manually I need to do it dynamically. So what I am trying to understand is where to put the event-listener how to add to a collectionArray then once the collection array(s) are built. use that information to build the bar graphs...

/*
*
36, > 2 years, Compliance
6, 0-90 Days, Compliance

[Code].....

View 2 Replies

ActionScript 3.0 :: Border Around An Arbitrary Shape?

Feb 13, 2009

is possible to draw a border around an arbitrary Shape (or Sprite) dynamically with ActionScript? From the IDE is really easy, just select the line color and click the Shape with the paint tool (S).How can we the same with Actionscript?

View 0 Replies

ActionScript 3.0 :: SoundMixer.computeSpectrum Seems Off?

May 21, 2009

Using the example found in the class documentation, you'll notice the bass frequencies are crammed on the low end too much, and the higher frequencies will sometimes register even in the bytearray.position = 0 float.  Is this a problem with the design of the computeSpectrum class?  Because I can take the same file, put it in another spectrum analyzer and see the bass and treble spread more evenly.[URL]

View 4 Replies

ActionScript 3.0 :: ComputeSpectrum If Volume Is 0?

Jul 31, 2009

I'm building a media player with a sound visualizer using computeSpectrum(). When I adjust the volume, there is no longer any data for the visualizer. Does anyone know a way to adjust the volume of audio, but still access audio data using computeSpectrum() as if the sound were still audible?

View 3 Replies

ActionScript 3.0 :: ComputeSpectrum 100 Times Per Second?

Jul 4, 2010

Just wondering how often Flash (as3) will allow me to computeSpectrum? I am currently attempting to computeSpectrum 100 times per second, but I am finding that the data repeats every few times.

View 1 Replies

ActionScript 3.0 :: Drawing Border Around Arbitrary Shape?

Feb 12, 2009

Is it possible to draw a border around an arbitrary Shape (or Sprite) dynamically with ActionScript? From the IDE is really easy, just select the line color and click the Shape with the paint tool (S).

View 3 Replies

Professional :: Rectangle With Arbitrary Number Of Rectangles?

Mar 27, 2012

I'm trying to figure out how to tile a rectangle (the stage) with an arbitrary number of rectangles. Simple tiling where all the tiles are the same size and simply stacked in a grid.I'm doing this with a resizable layout and a number of tiles that is arbitrary and will change over time.

Given a more or less 4:3 or 16:9 monitor I would like a solution that tends toward minimizing the perimeter of the tile and being similar in aspect ratio to the screen. I realize that if I have a prime number of tiles that I won't be able to make a nice grid, but other than that it seems there should be some way to do this.Lets say I have 231 tiles I need to arrange. The factors are 1, 3, 7, 11, 21, 33, 77 and 231.If the screen is really, really wide 1 x 231. Wide but not not as crazy wide as before 3 x 77. And most likely 11 x 21 is what I would need.So is there an easy way to do this on the fly? Is there a pre-calculated way to make it easy?

View 1 Replies

Actionscript 3 :: Convert A String To An Arbitrary Number?

Mar 8, 2011

I want to seed a number generator using a string input. What function would be best for simply turning the string into a number to do this?

View 2 Replies

Flash :: Access Stage From Arbitrary Location?

Sep 2, 2011

Say I've got a utility class in which I would like to access the stage (in order to get the frameRate).

I don't particularly want to force the user to pass in the stage to each method or set a static property on my class before using it.

Is there any way to get ahold of the stage without it being passed in? All I need is the frameRate!

View 2 Replies

Arrays :: Prevent This Arbitrary Text Truncation?

Dec 28, 2011

Below is code that populates a menu. Everything seems to work great, with no errors thrown, except for one crucial part. My megaPages array has the values ["HOME","BABIES","BRIDALS","MISC","WEDDINGS","ABOUT"], but the actual text that displays on screen (which is produced by megaPages) is like this:

As you can see, some of the text is arbitrarily being truncated. I've traced the text strings as they get passed through the various functions at various stages of the menu-build, and they are always right, but somehow when each DisplayObject make it on screen, letters get ommitted (notice though that 'HOME' abd 'ABOUT' are fine). I don't even know where to start with this problem.

[Code]...

View 1 Replies

Flash :: Converting An Arbitrary Drawing Into An Interactive Map?

Feb 7, 2012

I have a floor plan of a building in PDF that I want to visualize as a map, using tools like MapBox, FusionMaps, or AmMap. I am willing to redraw the floor plan if needed. What format should the map data be in? What kind of tool can I use to create that data?

View 3 Replies

ActionScript 2.0 :: Arbitrary Expressions In Function Calls?

Nov 25, 2009

I have several custom functions that I import as .as files, but I frequently have to modify them to suit projects, which makes standardization and version tracking harder.Is there a way to pass arbitrary expressions to a function when it's called? For example, if I write the function,

Code:
function foo(){
for(i=1; i<=1; i++){
trace(i);
}
}

would there be some way to attach an additional expression after the trace function during the function call? As in,

Code:

foo(do_stuff_here);

where the function would act as if it had said,

Code:
function foo(){
for(i=1; i<=1; i++){
trace(i);

[code]....

but without modifying the original function?I realize I could add an expression to the original function within a conditional, and toggle it via an argument within the call, but since I don't know what I'll add next, or whether I'll need it next time, this would become impractical quickly.

View 0 Replies

ActionScript 2.0 :: CS3 Computespectrum Failing Randomly

Apr 17, 2008

am trying to make a mp3 player by using actionscript3.In this , am trying a upload a mp3 file and play that particular file. Am also using the computespectrum() to display the graphics.Now the problem am facing is with the computespectrum . Randomly , the computespectrum is failing for the same file and is throwing error.The error is as follows [code]Am actually uploading the file into a folder named "mp3files". The "mp3files" folder and the swf are lying in the same domain.

View 1 Replies

ActionScript 3.0 :: Youtube Api And SoundMixer.computeSpectrum?

Mar 31, 2011

I connect to the sound of youtube website, how can I bond SoundMixer.computeSpectrum

[Code]...

View 6 Replies

ActionScript 3.0 :: Possible To Run ComputeSpectrum On Multiple Files

Dec 8, 2009

Since there's (obviously) only one instance of SoundMixer in any given file, is it not possible to run computeSpectrum discreetly on different soundfiles loaded into an application? Basically I want to visualise each sound differently. Anyone come across any workarounds?

View 4 Replies

ActionScript 3.0 :: Remaking SoundMixer.computeSpectrum()?

Jul 8, 2009

For the past couple of weeks I've been wracking my brains over SoundMixer.computeSpectrum(), arguably the coolest method in ActionScript 3. It's the one that spits out the last 256 (or so) audio samples that hit the speakers, with the option of viewing that data in the time domain (waveform) or the frequency domain (Fourier transform). It's great for visualizing music, but its major drawback is that it only operates on global, playing audio, which means you cannot visualize different channels or preprocess the visualization.

Sound.extract(), a new method in Flash Player 10, gives you a Sound object's entire waveform at any time you want; I've managed to line up the waveform in Sound.extract() perfectly with the waveform in SoundMixer.computeSpectrum(), so they are literally neck-in-neck. In this SWF I'm drawing two lines- a blue line, which uses data from SoundMixer.computeSpectrum(), and a red line, which uses data from

[Code]...

View 11 Replies

ActionScript 3.0 :: ComputeSpectrum On Sound Class?

Jul 31, 2009

I'm trying to do some beat detection on a sound, but I want other sounds playing at the same time, and I don't want those to be included in the beat detection. Is there anything like SoundMixer.computeSpectrum for individual Sound or SoundChannel instances ?

View 2 Replies

Flex :: Convert An Arbitrary String To Float In Range 0 And 1?

Aug 22, 2011

I'd like to convert an arbitrary string (or for easier process a string hash) to a float number between 0 and 1. The purpose is to create a function that returns a color code for a given string so the user always sees that entity in the same color that is generated from its name.OP included this code in comments (included here for readability):

var hashed:String = MD5.hash(input); // creates a 32 long hexa
const max:Number = Number("0xffffffffffffffffffffffffffffffff");
var hashedHexa:Number = Number("0x" + hashed);

[code]....

View 1 Replies

JavaScript :: Comparing Undefined / Null Or NaN With Arbitrary Number

Dec 15, 2011

In ActionScript 1 and 2, if you compare undefined, null or NaN with an arbitrary number using >= or <= operator, the result is always true. Test code:

var x, n, range = 1000;
for (var i = 0; i < 3; ++i) {
switch (i) {
case 0:
x = undefined;
[Code] .....

Furthermore, isNaN(null) return true. These are contrary to JavaScript and may not conform with ECMA standard.

View 1 Replies

ActionScript 3.0 :: Rotate A Sine Wave To An Arbitrary Angle?

Aug 5, 2011

I want to be able to take a general sine wave y=Math.sin(x) and rotate it around some other angle, so instead of going strictly left-to-right, I'd like to go from, say, the top left corner toward the "center," or from the bottom right to the center, or any other arbitrary angle. Like this: I want to be able to use that wave as a "path" for enemies in a game, but I cannot seem to wrap my head around it. I've tried matrix transformations, but I was missing something there, too, because the origin was wrong.

View 1 Replies

ActionScript 3.0 :: Youtube Api And SoundMixer.computeSpectrum Does Not Work

Mar 31, 2011

I managed to run my youtube api and SoundMixer.computeSpectrum.SoundMixer.computeSpectrum are online, positionBar, player.getDuration (), player.getCurrentTime () does not work.Everything is running on localhost.I do not know is the security issue,

View 4 Replies

Flash :: Flex: ComputeSpectrum With Streaming Media?

Jan 18, 2010

I have a Flex3 app I wrote and I'm streaming audio over RTMP from a Red5 server. I'd love to be able to use SoundMixer.computeSpectrum(), but the spectrum data is all zeros. In one location, Adobe writes that SoundMixer.computeSpectrum() does not work with RTMP data:

"For media loaded from RTMP sources, you cannot use the BitmapData.draw() and SoundMixer.computeSpectrum() methods to extract run-time graphics and sound data." [URL] Clear enough. Except, there's the actual documentation for computeSpectrum(): "In addition, this method cannot be used to extract data from RTMP streams, even when it is called by content that reside in the same domain as the RTMP server. [...] This method is supported over RTMP in Flash Player 9.0.115.0 and later and in Adobe AIR."

View 4 Replies

ActionScript 3.0 :: SoundMixer.computeSpectrum With Loaded FLV Movies?

Aug 31, 2009

I'm trying to use the code below to show a graphical representation of the sound from externally loaded FLVs, as they play.The code I have is below, can I change this to listen for whatever sounds Flash is playing at the moment and computeSpectrum from tha

Code:
var url:String = "song.mp3";
var request:URLRequest = new URLRequest(url);

[code]......

View 5 Replies

Actionscript 3 :: Execute Arbitrary Code In Flash Like Javascript's Eval()?

Apr 1, 2010

Is there any way to execute arbitrary code in Flash, like javascript's eval()? I'd like to take some code as a string and execute it, if possible

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved