tickytickyturntable

actually sound pitching was the first thing i did as soon as the flash 10 beta came out. now that there were some changes in the sound api i wrote it new from scratch.

the finetuning took a while so that there are no more hickups and noises when changing the pitch fluently as you can hear in the provided example.
well, at least i think so. it’s only been tested with my local beta standalone player yet. the release version is out since yesterday or so and the bad news already spread - there are again changes to the sound api causing huge latencies depending on your operating system and your hardware apparently.

whatever. be sure to get the fresh flash 10 player - no more beta :D - and check out the little turntable.

the new SoundPitch class is to really easy-to-use: it extends the regular Sound class and the access works just the same:

  • load a sound via .load(myURLRequest) or .load(mySoundObject)
  • play the sound via .play()
  • pitch the sound via .pitch = 0.7
  • you can also change the buffer’s length via .bufferLength = 6

get it here! (going to clean the code up soon ;)

This entry was posted in Actionscript. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

11 Comments

  1. Posted October 17, 2008 at 5:19 am | Permalink

    Flashbulb rocks!

  2. Posted October 17, 2008 at 7:20 pm | Permalink

    nice one :) scraatch

  3. Romperstomper
    Posted November 30, 2008 at 9:24 am | Permalink

    This works great!! awesome job! Do you have any suggestions for getting it to play embedded internal sounds. I can get it to load external MP3 great. but library sound not so good. It stops as soon as you set the pitch.

    Thanks for the great work!

  4. Romperstomper
    Posted November 30, 2008 at 9:36 am | Permalink

    I guess to be more exact it breaks on the loop. I have a short engine sound im trying to loop and pitch at the same time.

  5. JGarrido
    Posted December 5, 2008 at 10:12 pm | Permalink

    Very cool Kris, I wonder if you have tried doing the same using streaming audio?

  6. kris
    Posted December 6, 2008 at 12:02 am | Permalink

    sorry, haven’t been here for a while.. :)

    @romperstomper: i haven’t really tested it in the flash ide or with any kind of sound. maybe you can supply the one you’re trying to loop? just drop me a mail!

    @jgarrido: thanks. actually recently i have been trying to create a memory-friendly stream-player via Sound-objects in which it would integrate easily. the provided code relies on a given sound length - so maybe it wont work ;D

  7. Posted December 6, 2008 at 1:15 am | Permalink

    I’m currently working on one and have made good progress, except when it comes to the point of removing the metadata from the incoming stream and sending the remaining bytes to the channel for output.

  8. con
    Posted December 24, 2008 at 2:28 pm | Permalink

    we want more!
    we want more!
    we want more!
    we want more!

  9. kris
    Posted January 2, 2009 at 8:46 pm | Permalink

    @jgarrido: so you work via socket streams? my approach was via the streaming of the native Sound-class.. gave up on that. there is one working streaming solution over at flexiblefactory, quite cool!

  10. Hugo
    Posted May 28, 2009 at 5:17 pm | Permalink

    Hi,

    nice example but how do I get it to work? Where should I put your as-file in order to get it to work? Is import needed? Please tip me off how to get started here. Cheerio!

  11. kris
    Posted June 2, 2009 at 3:44 pm | Permalink

    hugo, you either have to put it in directories de/kris/sound so it matches the package structure (first line of code) or you change this package structure line as it fits you ;)

One Trackback

  1. By actionscript microcosmos » SoundPitching. on October 16, 2008 at 8:38 pm

    [...] Christoph released a nifty little extension of Flash10´s regular Sound class wich allows you to pitch the [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*