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
- 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 ![]()

11 Comments
Flashbulb rocks!
nice one
scraatch
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!
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.
Very cool Kris, I wonder if you have tried doing the same using streaming audio?
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
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.
we want more!
we want more!
we want more!
we want more!
@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!
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!
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
[...] Christoph released a nifty little extension of Flash10´s regular Sound class wich allows you to pitch the [...]