Skip to main content
Inspiring
January 10, 2021
Question

adapt a class to an internal sound

  • January 10, 2021
  • 5 replies
  • 409 views

 

//create an MP3Pitch instance and load a sound
var mp3:MP3Pitch = new MP3Pitch("/path/to/your/file.mp3");
//change the pitch via rate setter
mp3.rate += 0.5

 

this is the code to adapt the MP3Pitch class  to a loaded sound. Could someone tell me how i adapt it for an internal sound?

thanks

    This topic has been closed for replies.

    5 replies

    kglad
    Community Expert
    Community Expert
    January 10, 2021

    no one can answer that unless they're familiar with the MP3Pitch class. 

     

    but, if you mean the class here, cambiar el pitch de un sonido para una app con as3 - Adobe Support Community - 11645350

    you'll need to edit the class to accept a switch (some variable to indicate a sound to initialize via linkage id instead of load path) in the constructor, or some other way handling loading vs linkage id outside the constructor.

     

    if you mean some other class, the answer could be different.

    Inspiring
    January 10, 2021

    Hi. Thank you very much for the reply. I don't mean that class. It has nothing to do with the question you are referring to. This code I got from here:

     

    https://stackoverflow.com/questions/2345630/controlling-sound-pitch-with-actionscript-3-0


    here comes the whole code and how to apply it in animate cc (which is what I sent to the community). What happens is that this code is designed for an mp3 that is loaded (external) and I want to apply it to an internal mp3 in my library.

    I am trying without success. If you could help me it would be great Thank you very much !!

    kglad
    Community Expert
    Community Expert
    January 10, 2021

    constructor looks the same, so same answer.