A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11249 Flash Movies | 9 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: kyo
» Title: building estructure
» Description: explosion of building estructure made by swift3D
» More by kyo


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 6393 Flash Sites | 0 New Flash Links
What's New | Top 100 Flash Site

Featured Site

» Posted in the Flash Kit Links section
» Title: Webdancer's Web Site
» Comments: Webdancer's, an artistic adventure in 3d graphicsbr>


Random Links | Add your own Flash Related Links
Flash Tutorials 1197 Tutorials 7 New Tutorials Added!
What's New | Top100

» Let Photos Show Your Happy Family this Christmas and Upload YouTube
» PowerPoint show to DVD slide show--- PPS to DVD
» How to burn FLV to DVD for Mac
» How to Create Christmas Flash Greeting Ecard with photos and music
» Getting Started In Flash
» How to convert FLV video to MP3 audio for Mac OS
» Join flv videos together with just a few clicks
» How to convert flv file to avi for mac os x
» How to Create Christmas Flash Greeting eCard without programming skills
» Unknown Tag: Title10
Random Tutorial | Add Site

bbm.netBBM.net is designed to save you time and deliver the highest quality royalty-free music for your multimedia projects. Features include: over 450 Music Loop Packages from some of the best composers in the business, our music search engine to speed your selection process, alternate music versions & bonus sounds to use for rollovers or transitions, free technical support and free consulting.

Click here for details »

Senior Web Designer
Aquent
US-GA-Atlanta

Justtechjobs.com Post A Job | Post A Resume


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Audio

Categories Flash Audio Spectrum Analyser
Author: Inn Chan

 
Page 4
«prev 1 2 3 4

Using Spectrum Lab to generate spectrum data

Spectrum Lab is a specialized audio analyser, it also has many other advance features, amongst which the powerfull data logging feature. It allows you to set the interval in miliseconds at which data is written to the text file and how many frequency bands you want to log and the range.
This tutorial will only cover up to what you need to obtain the spectrum data. The rest are left for you to explore.

So here is what you do: open the Spectrum Lab program, you will see something like the following, first of all go to "option" -"audio setings" as follows:



The configuration and display control panel comes up, set the sample rate to 44100Hz or 22050Hz, just make sure it's over 16000Hz.



Then in the same panel, go to Spectrum display and type in "93" under Waterfall Scroll Intv., make sure it's in millisecond. You can try out other values for the interval, the smaller the value is the largerer the text file it generates. A 1 min track analysed with 93ms interval results in a 14K text file which took 3 seconds for a 512M Ram PII 400MHz to load the file from hard drive, just over a second in a PIII 1.2GHz, whereas 100ms interval yields a 8K txt file, and 90ms yields 27K



In the same panel again, go to the Wave setting change the speed under the "File Analysis w/o audio reply" to Fast. Choosing this setting will speed up the analysing time, it does not affect the output of the log file.



After setting up the Spectrum Laboratory, we have to define the format of the output data, go to "File"-"Text file export" then the "File Contents" section and enter the parameters as follows:



When you are ready to analyse the wave file, go to the "File Export Format" panel (same as above) and go to the "Filename & Action" section. Enter the path and file name of the data file then check the Active check box to toggle the output mode. When the box is checked, the data file is locked and ready for data logging, and only Spectrum Lab can write data to the file. Spectrum lab append data to the end of the file, so make sure the data file donesn't contain spectrum data from previous runs.



Now every thing is ready, make sure you have activated text file export then go to "File"-"Wave Files"-"Analyze input from *.WAV-file", the audio File analysis panel will pop up. Now choose 1024 pts for the FFT option and press ok, you will see the spectrum graph starts to jump. when it stops jumping, that's when it finishes analysing the wav file.



Open the data file in notepad, you should see some thing like this:



Delete the first line which says ",,,,,,,,,", that's the names of the columns, since we didn't declare it in "File Export Format", only the separaters were written to the file. Now type in "sdata=" infront of the first row of data, and add "&loadstatus=1" to the last line, make sure there are no carrage returns nor spaces after that and save the the file as "data.txt" in the track directory:



So there you are, go to your swf directory run the Spectrum Analyzer.swf and see your own flash audio spectrum analyser in action.

As you may have noticed the way in which the spectrum data are organised and that it is an external source to the movie hugely increases the processing load. One way to reduce this load is to find another spectrum analysing program that interprets data in different scale, currently Spectrum Lab only measure amplitude in db and percentages, where db ranges from 0db to -140db, the negative number means there is one "Extra" character in each data entry, and percentage ranges from 0 to some big numbers far beyond 100 which is even worse for our case. Ideally we would have used the scale 0-9 to represent the amplitude of a specific frequency band, such scale will result in a reduction of 3/4 to the current file size. Another way to achieve that is to write a mini program and use string manipulation to organise the spectrum data. And by declaring the data as a variable from within the flash movie rather than loading it from an external source, runtime performance can be noticeably boosted up.

Coming Up Next

Fed up with volume sliders? How about a volume roller like the one on your Hi-fi system? It can be used to build a scratchable vinyl turntable too.

Here is an experimental piece I created with this roller.



Tutorial coming soon.

«prev 1 2 3 4

» Level Intermediate

Added: : 2002-08-28
Rating: 8.75 Votes: 32
Hits: 3387
» Author
Multimedia Student eager to combine artistic skills, creativity and practical knowledge to innovate new concepts in interactive media
» Download
Download the files used in this tutorial.
Download (350 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Microsoft PDF: Top 10 Reasons to Move to Server Virtualization with Hyper-V
Microsoft PDF: Six Reasons Why Microsoft's Hyper-V Will Overtake Vmware
Microsoft Step-by-Step Guide: Hyper-V and Failover Clustering
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Microsoft PDF: Top 11 Reasons to Upgrade to Windows Server 2008
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
  PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
HP eBook: Guide to Storage Networking
MORE WHITEPAPERS, EBOOKS, AND ARTICLES