Search Unity

[RELEASED] SoundManagerPro: Easy Game Music Plugin

Discussion in 'Assets and Asset Store' started by AntiLunchBox, Jun 12, 2013.

  1. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    471
    perfect
    many thxxx

    Last Request i have is: fade in fade out

    thank you very much for quick Reply!!!
     
  2. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Actually badbod,

    I'm an idiot, there's overload methods for this. You can play an SFX directly on a gameobject with:
    or this:
    They will add an audio source if one doesn't exist on the gameobject. It's all in the documentation.

    But to answer your question, no it will not mess up the pooling. Just don't add any children to it, and they won't get deactivated as well.

    -ALB
     
  3. Dosetsu

    Dosetsu

    Joined:
    Dec 22, 2011
    Posts:
    39
    Grabbed this since its on sale now, i hope to see this project fully mature.

    #1. reason is this Developer seems incredibly responsive.

    #2. hoping for some official uscript integration

    #3. awaiting proper implementation of random sfx pools (i.e. playsfx("explosion") will play a random explosion from a set of explosions)
     
  4. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey Muckel,

    You can fade in and fade out! (at least for music). SoundManager.Stop will fade out and any of the Play functions will fade in. Just make sure the cross duration (you can find it on the prefab) isn't 0.
     
  5. GPSchnyder

    GPSchnyder

    Joined:
    Mar 23, 2013
    Posts:
    45
    Hi, just saw that your Package is 50% off right now, and it sounds like a grabber. One thing thou, is there a way build in to have loops sound and change the loops for the next instance to another loop? And/Or can we have more loops, and have them change randomly every x loops? Or at best a mix of that? Like playing a set of loops randomly and change it to another group at the next looppoint?

    If that is a yes, it's a sold copy.

    George
     
  6. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Haha, that was a bit confusing. You're probably going to have to explain it further. Are you talking about loops of one song? Loops of a playlist? or are you talking about SFX? Assuming you are talking about music tracks and not SFX, you can do what you're asking with the flexibility, but it's not built-in completely right out of the box. The tools for what you need to do are though.

    I can provide more info once I totally understand what you're asking =]

    -ALB
     
  7. GPSchnyder

    GPSchnyder

    Joined:
    Mar 23, 2013
    Posts:
    45
    Okay. I'll try.

    It's about music. I want to have my backgroundmusic being changed by the position in the level. And for every area I want to have some loops that are played randomly one after another, but then change the loops when the player enters a new area of the level. And not just have the same loop play all the time, or even worse, a song with build in emotions that don't match the stuff the player goes through on loop.

    Hope that helps. And one thing which would be cool, but is no need, as it would only be a cool thing to play with, can we have more loops, which all have the same length, play the same time in sync, at best with the features asked about up there?

    And just to let you know, I'm no programmer. I can change scripts to work the way I want, but not write them.

    Ah, btw, thanks for the fast answer,
    George
     
  8. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Ah ok,

    Well that's what custom SoundConnections are for! You can create them in the SoundManager, BUT you have to call them manually with SoundManager.PlayConnection. If you're using a nifty visual scripting tool like PlayMaker, it's as simple as using the PlayConnection action. So with the custom SoundConnections, you can set a list of songs to a certain playmethod (continously play through, play through once, shuffle through, have a delay in between songs, etc). And whenever you play those custom SoundConnections it will use those settings.

    So if you enter a different part of a level, call SoundManager.PlayConnection("thislevelpart");

    So yes, you can do that but it does require knowing when to call them.

    -ALB
     
  9. GPSchnyder

    GPSchnyder

    Joined:
    Mar 23, 2013
    Posts:
    45
    Sounds good to me, bought :)

    George
     
  10. Dosetsu

    Dosetsu

    Joined:
    Dec 22, 2011
    Posts:
    39
    Is cross fade duration fixed to a single value on the prefab or can you vary it per song or in code ?
     
  11. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    You can very it in code. At the bottom of the documentation there is a section on useful instance variables. You can access it with:
    SoundManager.Instance.crossDuration

    When you need specific variables, more often then not you can find them on the instance.

    -ALB
     
  12. Kdhyne

    Kdhyne

    Joined:
    Jul 23, 2012
    Posts:
    2
    Hello, I'm interested to know if this plugin allows one to alter the playback speed of an audioclip. I'm currently making a game where the better the player performs a given task set to music, the faster the music will play to encourage the player. Similarly, the music will play slower if the player is doing poorly. Is this currently a feature in SoundManagerPro or possibly a feature you might add in the future?

    Thank you for your time.
     
  13. Shiffty

    Shiffty

    Joined:
    Jul 20, 2012
    Posts:
    5
    Hey ALB,

    I purchased SoundManagerPro today and have been playing around with it. I'm liking what I'm seeing so far but I'm having issues playing a simple custom SoundConnection as you described above. I always hit the exception:

    Code (csharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. SoundManager.CheckWhosPlaying () (at Assets/SoundManagerPro/Scripts/Managers/SoundManager_Internal.cs:131)
    3. SoundManager+<CrossoutAll>c__Iterator1B.MoveNext () (at Assets/SoundManagerPro/Scripts/Managers/SoundManager_Internal.cs:569)
    4. UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
    5. <PlaySoundConnection>c__Iterator1D:MoveNext() (at Assets/SoundManagerPro/Scripts/Managers/SoundManager_Internal.cs:740)
    6. UnityEngine.MonoBehaviour:StartCoroutine(String, Object)
    7. SoundManager:_PlayConnection(SoundConnection) (at Assets/SoundManagerPro/Scripts/Managers/SoundManager_Internal.cs:90)
    8. SoundManager:PlayConnection(SoundConnection) (at Assets/SoundManagerPro/Scripts/Managers/SoundManager.cs:234)
    thrown from the call to PlayConnection like so:

    Code (csharp):
    1. SoundManager.PlayConnection("NameOfConnection");
    The only SoundConnection I have in my SoundManager GameObject is the custom SoundConnection that I reference by name. I have also tried to use ReplaceSoundConnection (replacing an autoplay SoundConnection set up for my scene) with the same results. I could very well be doing something stupid. Let me know if any other information would help.

    Thanks!
    Adam
     
  14. Shiffty

    Shiffty

    Joined:
    Jul 20, 2012
    Posts:
    5
    I figured this out. I was calling PlayConnection() from an Awake() call. I assume some of SoundManagerPro's internals weren't initialized yet. Calling from Start() fixed my issue.
     
  15. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey Kdhyne,

    Yes you can alter the playback speed of music AND sound effects. However, the only drawback is that the pitch has to change as well. Otherwise it would be very expensive for Unity to track an audio clip at multiple rates. It is the desired effect you're looking for though. You can use SetPitch, SetPitchMusic, or SetPitchSFX.

    -ALB
     
  16. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Ah yes, you want to avoid making calls in Awake =]. It's at the top of the documentation in red

    -ALB
     
  17. Kdhyne

    Kdhyne

    Joined:
    Jul 23, 2012
    Posts:
    2
    Thank you very much for your quick response! I am very glad to be able to still take advantage of the sale. If I have any other questions or suggestions for improvement, I will certainly let you know. Thanks again!

    -Kyle
     
  18. gruddlebug

    gruddlebug

    Joined:
    Mar 11, 2013
    Posts:
    65
    Hello,

    Just updated and Version is 2.4 (August 08, 2013)

    Last was 2.5.1

    Am I in a Time Warp:confused:


    Cheers

    Paul
     
  19. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey!

    To those people who just bought the package (today), for some reason the asset store thought I published a previous version of SoundManagerPro. What's up there is version 2.4, when it should be 2.5.1. I just emailed them about it so hopefully they can fix it soon.

    -ALB
     
  20. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Yeah, just noticed! I emailed the asset store team. I knew something was fishy when I got an email saying my update got approved when I didn't submit any update :3
    -ALB
     
  21. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Turns out there was a crazy glitch in the latest asset store update, they are looking into fixing it! Will be back to version 2.5.1 soon!
     
  22. damelin

    damelin

    Joined:
    Jul 3, 2012
    Posts:
    65
    Great plugin!

    Hope the warnings will be fixed in the next update :)
     
  23. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey damelin,

    Which version do you have? There is a problem in the Asset Store that put an old version up for download today. They are trying to fix it, but the version 2.5.1 should not have warnings. Let me know if you still have them.

    -ALB
     
  24. acriticalstrike

    acriticalstrike

    Joined:
    May 25, 2013
    Posts:
    75
    I've installed sound manager pro and i'm looking for the actions in playmaker but i dont see them. What exactly can i do with sound manager via playmaker actions and state machines?


    :confused:
     
  25. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    @acriticalstrike
    You have to extract the PlayMaker-Actions from the Unitypackage which is in the Extensions-Folder of SoundManagerPro.
     
  26. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Thanks Mayhem! articalstrike, he's exactly right.
    -ALB
     
  27. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Also you may want to keep checking for the new update. The Unity Asset Store accidentally uploaded an old version yesterday, while the actual newest version has more playmaker actions. They are still looking into fixing it.

    -ALB
     
  28. Playlectric

    Playlectric

    Joined:
    May 22, 2013
    Posts:
    27
    Is there a way to specify SFX cap values for individual sounds instead of relying on a single global cap value for all SFX?
     
    Last edited: Aug 9, 2013
  29. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Not currently, no. I did this by choice, but it wasn't a permanent solution. I didn't have a clean way to do it while being intuitive, so for now you'll have to implement your own if you want it. However, next up on my list for implementation is grouped SFX. I'll add individial cap values as a feature of grouped SFX (along with play at random, etc). It will fit with the design I have to implement them.

    -ALB
     
  30. Playlectric

    Playlectric

    Joined:
    May 22, 2013
    Posts:
    27
    Glad to hear that! :)

    By the way, everything works great on iOS - I also tested .xm, .mod and .it files on an iPad mini, and if the files are loaded in memory, crossfading from one song to the next has virtually no impact on the framerate.
     
    Last edited: Aug 9, 2013
  31. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Yup! I'm a mobile developer myself, so I originally designed it for iOS =]. Glad you're enjoying the product. I'll hopefully have the grouped sfx feature submitted by the end of this weekend.

    -ALB
     
  32. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey all,

    The Unity Asset Store team fixed it and the SoundManagerPro current version is back to normal now! It is 2.5.2 as it includes the hot fix for NGUI integration, but everything else is the same as the original 2.5.1

    -ALB
     
  33. acriticalstrike

    acriticalstrike

    Joined:
    May 25, 2013
    Posts:
    75
    I've imported the files in PLAYMAKER_SMPRO_INTEGRATION. Located in assets/soundmanagerpro/scripts/extensions/ but when i create a game object, open the playmaker editor and create a state I do not see the actions in the action list. I'm not sure why they're not there. Do i need to manually add each action script to playmaker? That doesnt seem right I have plenty of other addons that automatically add all of their actions to playmaker. I would think if i had to add each script manually it would be difficult to update the addon. Is this just me? Just FYI the PLAYMAKER_SMPRO_INTEGRATION file created the following folder assets/PlayMaker soundmanagerpro/actions...


    :confused:

    Looks like there are plenty of actions I just wish they'ed show up on my action list
     
  34. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hm that's strange, it should definitely show up on your actions list. I know a bunch of people have used the PlayMaker actions, so it is definitely weird. What version of PlayMaker are you using? It is supposed to create that new folder, but that is irrelevant to how PlayMaker finds the new actions. Have you tried restarting Unity? PlayMaker may just need to reload.

    -ALB
     
  35. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    P.S. - they are not in the Audio category, they are in their own 'SoundManagerPro' category.
    -ALB
     
  36. gruddlebug

    gruddlebug

    Joined:
    Mar 11, 2013
    Posts:
    65
    Hello,

    I only get four warnings - SoundManagerPro 2.5.2 - Unity 4.2.0f4

    Easily fixed with these changes:


    DemoTwo.cs Line 28 FindSceneObjectsOfType Change to: FindObjectsOfType


    Line 348 (Twice) mainCamera Change to: main

    Singleton.cs Line 24 FindSceneObjectsOfType Change to: FindObjectsOfType


    Cheers

    Paul
     
  37. acriticalstrike

    acriticalstrike

    Joined:
    May 25, 2013
    Posts:
    75
    Looks like all i needed to do was restart unity! Thanks for the quick replies :-D If I have any other questions I'll be sure to ask! :D
     
  38. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Ah OK, I'll put those in the next update. Publisher's have to submit with the lowest version of Unity they support, so I often just do updates straight in Unity 3.5. That's probably why I haven't seen them, but I'll put them in the next update! Thanks for the detailed problem and solution.

    -ALB
     
  39. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey guys!

    Just finished implementing the new feature, SFX Groups, coming up in the next update.

    You will be able to assign each SFX to a group, which allows you to do a couple things with it right now (they are implemented in a way so that its easy to add future attributes to SFX Groups):

    -Load a random clip from a group
    -Set a custom SFX cap amount for a group (or set it to use the default value, or ignore the cap all together)

    And it can still all be done in the editor as well!

    Here's a preview:
    $forum info new sfx group feature.png
     
    Last edited: Aug 11, 2013
  40. Playlectric

    Playlectric

    Joined:
    May 22, 2013
    Posts:
    27
    That's awesome! Thanks for sacrificing your weekend on this ;)
     
  41. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey guys,

    I'm currently working on a new plugin that will be a godsend to iOS developers (something long awaited I feel like), but that's going to take a while. I'll reveal more information as it comes together. However in the meantime, I was wondering what you guys would like added to SoundManagerPro?

    I'll try and do what I can while working on the new project, but so far I plan to add:
    -Event Triggers; Currently the SoundManager calls events, but I'm planning to add components you can attach to game objects that will fire SoundManager calls. And it can all be done in the editor. So you can attach a component to your "player", and whenever OnTriggerEnter gets called, it could call SoundManager.PlaySFX. That kind of stuff.
    -Customizable Amount of Audio Channels (added to the SFX Groups feature); You can set a group to have it's own volume/pitch controls, etc.

    So what else would you like to see? I'm interested to hear what you guys want. Smaller implementations could be added sooner than others.

    -ALB
     
  42. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422

    Uhh, Event Triggers would be really neat. +1 to that! :D
     
  43. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,783
  44. ostone88

    ostone88

    Joined:
    Jul 25, 2013
    Posts:
    5
    Yup +1 to that too!
     
  45. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    noted! Luckily that's at the top of my implementation list. Will keep you guys updated

    -ALB
     
  46. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Ahhh

    Almost forgot the reason I came on here :D. The update just got delayed a little bit. I made a mistake in submission and it got declined. It's re-submitted and they'll vet it through faster this time since the code was fine.

    -ALB
     
  47. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    hey hey hey,

    Due to popular demand, I will be making more videos. This time however, I will split them into smaller videos that take each aspect into further detail. In the original video, there just wasn't enough time to go through everything. I had to gloss over everything very quickly so I'm getting a lot of the same questions in PMs. With this new set up, you'll be able to watch the video you need without having to wait 8 minutes to get to a section you're interested in.

    Hope it will be helpful for you all!
    -ALB
     
  48. Playlectric

    Playlectric

    Joined:
    May 22, 2013
    Posts:
    27
    Just adding a couple of +1s here - I think your roadmap looks great, and it's definitely a good idea to make a few shorter videos that focus on individual aspects of the plugin. The tower defense video is what convinced me to buy it, so a few more in-depth videos may help persuade users who are still on the fence.

    Would it be useful to be able to specify individual crossfade durations for the SoundConnections?

    Examples:
    Crossfade duration from an in-game level to the main menu/settings menu and vice versa: 1 sec
    Crossfade duration from one in-game level to another: 5 sec
     
  49. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Ah I thought about that and ended up leaving it up to you guys. I thought it would be really confusing assigning individual crossfades for SoundConnections. What if the previous SoundConnection has an individual crossfade of 2 seconds, while the SoundConnection you are going to has an individual crossfade of 4 seconds? Which one would take priority?

    So I decided to leave it up to you guys to just modify the crossDuration variable yourselves when you want to (with SoundManager.Instance.crossDuration, it's one of the 'useful instance variables' labeled at the bottom of the documentation). If you have a cool idea though, I'm all ears.

    -ALB
     
  50. Playlectric

    Playlectric

    Joined:
    May 22, 2013
    Posts:
    27
    You're right - setting that variable just before loading the main menu or different levels shouldn't be a problem.