Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9148307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:14:14+00:00 2026-06-17T11:14:14+00:00

So basically i have a soundboard made in Flash CS5, is it possible to

  • 0

So basically i have a soundboard made in Flash CS5, is it possible to alternate the sound of the library’s audio files with using Flash only? Like make the clips sound deeper or faster, thats the point. But if it’s not pissbile

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:14:17+00:00Added an answer on June 17, 2026 at 11:14 am

    You cannot do it in AS2. But yes, you can change the pitch and playback speed of a sound in AS3. In fact you can do more than that (search for Audiotool) but this demonstrates how it is done:
    http://plasticsturgeon.com/2012/05/changing-the-pitch-of-a-looped-sound-at-runtime-with-actionscript/

    And in case my blog goes down or something, here is the relevant class that changes the pitch of a sound.:

        package sound
    {
        import flash.events.Event;
        import flash.events.SampleDataEvent;
        import flash.media.Sound;
        import flash.media.SoundChannel;
        import flash.media.SoundTransform;
        import flash.net.URLRequest;
        import flash.utils.ByteArray;
    
    /**
     * @author Andre Michelle (andr...@gmail.com)
         * Modified by Zach Foley aka The Plastic Sturgeon
     */
    public class MP3Pitch
    {
        private const BLOCK_SIZE: int = 3072;
    
        private var _mp3: Sound;
        private var _sound: Sound;
    
        private var _target: ByteArray;
    
        private var _position: Number;
        private var _rate: Number;
        private var repeat:SoundChannel;
        private var _volume:Number = 1;
        private var byteArray:ByteArray;
    
                // Pass in your looped Sound
        public function MP3Pitch( pitchedSound: Sound)
        {
            _target = new ByteArray();
            _mp3 =  pitchedSound;
    
            _position = 0.0;
            _rate = 0.0;
    
            _sound = new Sound();
            _sound.addEventListener( SampleDataEvent.SAMPLE_DATA, sampleData );
            repeat = _sound.play();
        }
    
        public function get rate(): Number
        {
            return _rate;
        }
    
                // Also added a handy volume setter
        public function set volume( value: Number ): void
        {
            _volume = value;
            repeat.soundTransform = new SoundTransform(_volume);
        }
    
                // use this to set the pitch of your sound
        public function set rate( value: Number ): void
        {
            if( value < 0.0 )
                value = 0;
    
            _rate =  value;
        }
    
        private function sampleData( event: SampleDataEvent ): void
        {
            //-- REUSE INSTEAD OF RECREATION
            _target.position = 0;
    
            //-- SHORTCUT
            var data: ByteArray = event.data;
    
            var scaledBlockSize: Number = BLOCK_SIZE * _rate;
            var positionInt: int = _position;
            var alpha: Number = _position - positionInt;
    
            var positionTargetNum: Number = alpha;
            var positionTargetInt: int = -1;
    
            //-- COMPUTE NUMBER OF SAMPLES NEED TO PROCESS BLOCK (+2 FOR INTERPOLATION)
            var need: int = Math.ceil( scaledBlockSize ) + 2;
    
            //-- EXTRACT SAMPLES
            var read: int = _mp3.extract( _target, need, positionInt );
    
            var n: int = read == need ? BLOCK_SIZE : read / _rate;
    
            var l0: Number;
            var r0: Number;
            var l1: Number;
            var r1: Number;
    
            for( var i: int = 0 ; i < n ; ++i )
            {
                //-- AVOID READING EQUAL SAMPLES, IF RATE < 1.0
                if( int( positionTargetNum ) != positionTargetInt )
                {
                    positionTargetInt = positionTargetNum;
    
                    //-- SET TARGET READ POSITION
                    _target.position = positionTargetInt << 3;                      //-- READ TWO STEREO SAMPLES FOR LINEAR INTERPOLATION                   l0 = _target.readFloat();                   r0 = _target.readFloat();                   l1 = _target.readFloat();                   r1 = _target.readFloat();               }                               //-- WRITE INTERPOLATED AMPLITUDES INTO STREAM              data.writeFloat( l0 + alpha * ( l1 - l0 ) );                data.writeFloat( r0 + alpha * ( r1 - r0 ) );                                //-- INCREASE TARGET POSITION               positionTargetNum += _rate;                                 //-- INCREASE FRACTION AND CLAMP BETWEEN 0 AND 1                alpha += _rate;                 while( alpha &gt;= 1.0 ) --alpha;
            }
    
            //-- FILL REST OF STREAM WITH ZEROs
            if( i < BLOCK_SIZE )
            {
                while( i < BLOCK_SIZE )                 {                   data.writeFloat( 0.0 );                     data.writeFloat( 0.0 );                                         ++i;                }           }           //-- INCREASE SOUND POSITION            _position += scaledBlockSize;                        // My little addition here:            if (_position &gt; _mp3.length * 44.1) {
                _position = 0;
                _target.position = 0;
            }
        }
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

basically have two questions. 1. Is there a c++ library that would do full
I basically have a splitview controller and immediately I would like to show a
I basically have the same problem in this questions: Flash Video still playing in
I basically have an image of a world map and i would like to
I have been using the code in http://opensebj.blogspot.com/2009/04/naudio-tutorial-5-recording-audio.html to record audio. Basically this code:
I basically have a form inside of Flash that I need to submit to
I basically have a layout like this: <body> <div style=height: 150px; width: 200px; background:
I basically have a whole list of data that looks like this: text', 0,
So I basically have two files. At the end I would have more, but
I basically have 3 important files right now. I want to use a function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.