Search Unity

Audio Changing audio speed without using AudioSource.pitch

Discussion in 'Audio & Video' started by Hermonirr, Apr 27, 2017.

  1. Hermonirr

    Hermonirr

    Joined:
    Dec 23, 2013
    Posts:
    56
  2. mtytel

    mtytel

    Joined:
    Feb 28, 2014
    Posts:
    84
    This is a very difficult thing to implement well. There are closed source implementations you can license but they are expensive. You could probably find an open source project that does it with some minor problems, but even then you'll need to run the audio stream through a native plugin because it's cpu intensive.
     
  3. Hermonirr

    Hermonirr

    Joined:
    Dec 23, 2013
    Posts:
    56
    Thanks. Do you have some leads to the closed source solutions?
     
  4. mtytel

    mtytel

    Joined:
    Feb 28, 2014
    Posts:
    84
  5. rorywalsh

    rorywalsh

    Joined:
    Apr 10, 2015
    Posts:
    114
  6. mtytel

    mtytel

    Joined:
    Feb 28, 2014
    Posts:
    84
    The GPL is incompatible with anything built in Unity unfortunately.
     
  7. rorywalsh

    rorywalsh

    Joined:
    Apr 10, 2015
    Posts:
    114
    I have always assumed that if you make the source code open and available to anyone on request then there shouldn't be any problem mixing GPL stuff with whatever you create in Unity. If someone writes a Unity plugin that interfaces with PaulStretch, why couldn't they release it as open source? I can't see how it would be any different, but I'm no expert.
     
  8. mtytel

    mtytel

    Joined:
    Feb 28, 2014
    Posts:
    84
    The GPL is what you call a copyleft license. It's open source and free (as in freedom). The catch is, if you use it in your software and release your software to people, you must do it under the same conditions (e.g. also under the GPL).

    In other words, you can't use a GPL licensed piece of software in a closed source program that you distribute.

    The Unity engine is closed source. If you make something in Unity and distribute it, it has closed source pieces even if you make your code open. In that way you can't include a GPL licensed piece of software in a game you distribute that was made in Unity, because the GPL requires the derivative to be also GPL.
     
  9. rorywalsh

    rorywalsh

    Joined:
    Apr 10, 2015
    Posts:
    114
    Thanks, you're absolutely right. If it was LGPL things would be different right?
     
  10. mtytel

    mtytel

    Joined:
    Feb 28, 2014
    Posts:
    84
    Yeah, then you could link the binary it into your program. You couldn't change the source to your own needs though.

    Also, I should mention I'm not a lawyer or legal expert. This is a way better source than I for any questions regarding the GPL/LGPL:
    https://www.gnu.org/licenses/gpl-faq.en.html
     
  11. CaptainKirby

    CaptainKirby

    Joined:
    Dec 12, 2011
    Posts:
    36
    You can do this somewhat by offsetting the pitch with an audiomixer (pitch shifter effect) - although it is far from perfect
     
  12. mtytel

    mtytel

    Joined:
    Feb 28, 2014
    Posts:
    84
    Oh dang I didn't realize they built one into Unity. I'll have to try it out.