Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Script to create interactive/adaptive background music

Discussion in 'Audio & Video' started by Marma, Jan 16, 2015.

  1. Marma

    Marma

    Joined:
    Nov 7, 2014
    Posts:
    269
    Hi Unity Devs!
    I've just finished coding a script to help developers make interactive/adaptive background music for their video games. Don't know if this has been done before by another dev... If you have any suggestions or ways to make it work better, don't hesitate! I'm a self-taught coder so I really don't know what I'm doing... :p
    Here is the demo video, and the script should be available for download soon on the Unity Asset Store (for free).
    (submitted today for update)



    LINK TO THE SAMPLE PACKAGE ON THE UNITY ASSETSTORE:

    https://www.assetstore.unity3d.com/en/#!/content/23837
     
    Last edited: May 20, 2015
    Harinezumi and laurentlavigne like this.
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Looks cool! Master Audio and PSAI do adaptive music as well, depending on what you mean by "adaptive". But not for free :)
     
  3. Marma

    Marma

    Joined:
    Nov 7, 2014
    Posts:
    269
  4. bosone

    bosone

    Joined:
    Sep 13, 2011
    Posts:
    375
  5. Marma

    Marma

    Joined:
    Nov 7, 2014
    Posts:
    269
    bosone likes this.
  6. bosone

    bosone

    Joined:
    Sep 13, 2011
    Posts:
    375
    thanks for the suggestion! :)
     
  7. Marma

    Marma

    Joined:
    Nov 7, 2014
    Posts:
    269
    Hi Unity Devs!
    Just released an updated and fully operational script that does everything for you!
    Check it out!

     
  8. Marma

    Marma

    Joined:
    Nov 7, 2014
    Posts:
    269
    Deleted User likes this.
  9. scbionicle

    scbionicle

    Joined:
    Sep 21, 2018
    Posts:
    1
    Hello, I just tried out your script. However, on a clean/blank project, this script is causing my RAM to be eaten up. I'd have to close and reopen the project to get that RAM freed up. I'm not sure how to fix this myself, what would be a good way to fix this issue?
     
  10. Marma

    Marma

    Joined:
    Nov 7, 2014
    Posts:
    269
    Hi Scbionicle!
    Did you use it as is with the included samples or did you try to include other samples?
    I haven't updated it in a while, but most probably, it's the method for playing the samples that needs fixing by flushing the samples once they are played, using the "playoneshot" method instead of the "play" one. Other than that, I can't think of anything else eating up RAM. The samples need to be loaded inside an Array, which also may be part of the problem.. Hope that helps! ;)