Sound.extract() rocks!

When Tinic Uro was implementing the dynamic audio features he was also giving us a very nice present called Sound.extract(). And it is simply awesome!

I wrote a simple experiment yesterday night using the popforge library. Yes — you can use it still with the new features and it is a great help. I just had to convert the sample data into a format for popforge.

The experiment is a simple flanger applied to an MP3. André wrote the flanger about a year ago but it is still fun listening.

The sourcecode will also show you how to loop sounds using Sound.extract(). It is a very safe way so that you get always as much data as you need.

There is only one problem right now. I wanted to use the new FileReference features so that you can load your own MP3s into the flanger. But unfortunately there is currently no easy way to do this. You would have to load the bytes, then create a SWF at runtime and inject the MP3. Then you could load that SWF with Loader.loadBytes() and once that is complete you can extract the sound. I thought doing that would be a little bit too much for a small demo :)

Related Posts

  • No related posts

11 Responses to “Sound.extract() rocks!”


  1. 1 Benz

    I had the same problem with the FileReference class and posted about it yesterday http://www.richapps.de/?p=146 .
    If just these small problems are resolved this stuff will rock so much!

  2. 2 Richard

    Hallo Joa,
    ich habe in den letzten Tagen mit 8bitboy rumgespielt und komme nun auf die Idee Geräusche damit zu machen.
    Also anhand von kurzen Mods will ich kleine Geräusche durch Mausklicks abspielen.
    Hab bis dahin auch alles hinbekommen, leider ist die Zeit zwischen Klick und Soundstart zu lang, dass’s wiederum kein Spass mehr macht.
    Wie kann ich meinen kleinen Mod in voller Länge vorher auf SWF drucken, so dass ich nachher einfach SWF.play() abspielen lassen kann?

    Falls die Erklärung dazu zu lang wird, kannst du mir auch einfach die entsprechende Klasse/n oder Funktion/en nennen.

    Vielen Dank und Lob fürs Engagement für die Community,
    Richie

  3. 3 Richard

    Ok, AudioBuffer.as ist der Anfang.
    Aber wie das Zusammenspiel zwischen AudioBuffer und Mod-Format funktioniert weiss ich noch nicht, da ich null Ahnung vom Mod-Format habe.

    Gruß,
    Richie

  4. 4 spender

    I’ve cracked the mp3 FileReference loading. Take a look here:

    http://www.flexiblefactory.co.uk/flexible/

    Gimme a shout if you want more info…

  5. 5 joa

    Hey Spender,

    that is pretty cool. Why are you not sharing your code? I think everyone would appreciate it.

    Cheers

  6. 6 spender

    Don’t worry. I’m on it!

  7. 7 spender

    Hey Joa,

    Take a look at our site now. :)

  8. 8 atom

    hey joa,

    You say “I just had to convert the sample data into a format for popforge.”

    Any chance you could outline the steps?

    tia,

    atom

  9. 9 joa

    Samples in the popforge library are represented using the Sample class. Therefore you have to read the floating point values and feed those into Sample objects. That’s about it.

  1. 1 FlashPlayer 10 is making noise (links) at Adobe, MAKE SOME NOISE
  2. 2 {Code}Trip » Astro - FileReference + Sound API

Leave a Reply






Close
E-mail It