Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

[RELEASED] SoundManagerPro: Easy Game Music Plugin

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

  1. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    $small smpro forum.png

    "Your Asset has been published! And quite an impressive asset it is :)"
    -- Unity Asset Store

    SoundManagerPro is a powerful and easy-to-use sound and music system for Unity, both Pro and Free (3.5.4f1 or higher).

    This plugin features it's own music managing AI to make sound integration into your project quick and easy. Not only is it easy, but it is done with style to add that extra UMPH. Forget about saving programming music for last, make it quick, easy, impressive and FANCY with SoundManagerPro. All with minimal overhead.

    SoundManagerPro works in an interesting way which separates itself from the competition. It uses its own SoundConnection class. SoundConnections tie a list of AudioClips, a method to play them, and various other variables to a scene. Then, the AI will take it from there. Each time you enter a scene, it will just know what to do. Don't worry, SoundManagerPro is flexible and this setup is not required. It just helps you quickly set up a backbone for your project. SoundManagerPro gives you the option to still use it's AI however you want to.

    Available HERE on the Unity Asset Store.

    If you want to try it for FREE, download the Free Version!

    Features:
    • Full Inspector Integration, Setup, and Editing
    • Sound Managing AI
    • Sound Effects (SFX) Management and Pooling System with extra versatile modification real-time
    • Sound Effects Capping System to prevent too much of the same sound playing at once
    • NGUI, PlayMaker, 2d Toolkit and DF-GUI integration included
    • ALL CODE AVAILABLE to see. Modify it as you please
    • MonoDevelop method comments included. Know what functions do as you type so you don't have to constantly check documentation
    • It's own AudioClip Loading system for efficiency and flexibility
    • Crossfading
    • Option of Code-Free Implementation
    • Common play methods found in Audio Players: Repeat, Shuffle, Delay (among many)
    • Developer Options to turn off music or show more information
    • An elaborate Demo Scene to show you what you can do
    • Flexible Event System
    • Scripting Reference Available on our site.
    • Plugin Support and Updates
    • Possible 5-minute music integration
    • C# and JS compatible
    • Mobile-friendly
    • Singleton Perfect included for Free. Make any script a Singleton easily. It will always work, even if it doesn't exist.
    • And much more!

    Use the set up demo to see how the basic implementation of SoundManagerPro works! Switch scenes by clicking the colored buttons.

    Watch the HD Video Tutorials








    For more information, please visit the website.

    $forum1.png
    Changelog in v3.6.1
    • Fixed crossout bug
    • Organized generated SFX Objects underneath the SoundManager
    • Further fix to Win 8 Phone/Windows Store Apps builds
    • DF-GUI integration update to include clip type (like ngui integration)
    • NGUI integration update
    Changelog in v3.6
    • Revamped UFPS integration.
    • Added SoundPocket functionality, in editor control loaded SFX at certain points in your game.
    • Added ability to add base volumes to SFX and individual tracks in SoundConnections.
    • Added tooltips to help understand SMP. Each variable in the editor is explained.
    Changelog in 3.5:
    • Track Sync implemented
    • Switch between SoundConnections and start where the previous soundconnection left off, at any track you want.
    • New Demo Scene to show off Track Sync

    Changelog in v3.4.3:
    * ALERT * SOME PARAMETERS FOR SFX FUNCTIONS HAVE CHANGED SLIGHTLY!

    • Rearranged parameters for some PlaySFX functions for consistency (loop and delay on one overload changed)
    • Added string overloads to PlaySFX functions so there is no need to use SoundManager.Load manually

    Changelog in 3.4:
    • Fix to file rename issues
    • Added Crossfade, Crossin, and Crossout functionality for any audiosources.
    • Delete sfx feature easily available now
    • Remove sfx from SFXGroup easily available now
    • Added functionality to set volume and set pitch to only certain sfx
    • Implemented ducking feature for both volume and pitch
    • Added run-on-end functions for sfx as well
    • Added delay for sfx
    • Added more to the demo scene

    Changelog in 3.3.1:
    • Added ability to view sfx with different sorting, by group or by time added
    • Fixed bug with missing files
    • Ability to ignore level load is not settable on the soundmanager prefab

    Changelog in 3.2:
    • Greatly improved SFX performance from O(n) to O(1)
    • Fixed audio subscription bug that would remove subscription after disable

    Changelog in 3.1:
    • bug fix for song callbacks calling early
    • Added tag, layer, and name filters for AudioSourcePro event triggers

    Changelog in 3.0:
    • Added a new class, AudioSourcePro, that extends AudioSource to load clips from SoundManager or SFXGroups
    • AudioSourcePro has the ability to set event triggers, like OnTriggerEnter, OnEnable, OnDisable, OnStart, etc.
    • AudioSourcePro has the ability to query scripts on the same object for events. It can then bind actions to those custom events.
    • Added extension methods to AudioSource to play SFX functions
    • Added a new class, AudioSubscription, that ties events to SoundManager actions
    • Namespaced the Singleton class
    • Removed unnecessary editor classes
    • Greatly improved editor performance
    • Greatly improved in-game performance
    • Gave option for lo-impact editor performance
    • Added option to turn off automatic update checks
    • Fixed bug with prefab serialization. Can now treat the SoundManager as a regular prefab
    • Added DF-GUI and UFPS integration from menus
    • Greatly improved audio pooling
    • Added prepooling per clip
    • Added lifetime to sfx objects over the prepool amount
    • Added easier access to commonly used instance variables like: muted, volume, pitch, crossfade duration, current sound connection, default resources path, etc.
    • Added additional developer settings
    • Added Demo Part 2 to highlight AudioSourcePro features

    Changelog in 2.8.0:
    • DF-GUI integration included along with audio system
    • All other integrations are updated to reflect latest releases

    Changelog in 2.6.8
    • Fix to setting volume to 0 at start
    • Added new 'audio preloading' feature that helps gapless music playback. WAV files are recommended unless you have software to create gapless MP3s.

    Changelog in 2.6.7
    • Fix for event system ( which in turn also fixed the event system in the PlayMaker integration )
    • Added SFX Group actions to PlayMaker support

    Changelog in 2.6.2:
    $forum info new sfx group feature.png
    • New feature: SFX Groups! Current SFX Group features include: Pick SFX at random from within group; Set individual SFX caps per group;
    • Unity 4 warnings removed
    • Added a 'Check For Updates' feature in the AntiLunchBox menu. It will take you directly to the Asset Store page to update. If a new update is available, it will also automatically debug update alerts to you when you open your project.

    Changelog in 2.5.1:
    • 2d Toolkit Integration added
    • Added "Setup for JS" option in 'Window/AntiLunchBox' menu
    • Added addtional functions in 'Window/AntiLunchBox' menu, including all integration methods (NGUI, PlayMaker, TDTK), links to documentation and forums, etc
    • Added custom SoundConnection functionality in the inspector. You can now create custom SoundConnections, and play them via level name
    • Removed limitation on SoundManager.PlayConnection. It now leaves the level setup intact
    • Added an overload to SoundManager.PlayConnection that takes a level name. Can be used to play regular and custom SoundConnections
    • A minor UI change to show which SoundConnections you have selected
    • Added SoundManager.CreateSoundConnection so you can easily make SoundConnections in one line
    • Updated PlayMaker actions for the new CreateSoundConnection and PlayConnection methods
    • Updated the DemoScene to show off the new changes
    • Hotfix for NGUI integration

    Changelog in 2.3.6:
    • Fixed playback issues in the Editor on Mac's
    • Fixed playback issues with 'Maximize On Play' enabled
    • Disabled SoundManager prefab if not in scene
    • Fixed issues with changing volume during crossfading
    • Fixed issues with setting volumes to 0
    • New logo

    Changelog in 2.3.2:
    • PLAYMAKER integration included. Custom actions for everything.
    • New functions including: Stop, Stop Music, StopSFX
    • UI Facelift, removed extra steps in process to make it easier to make SoundConnections
    • More variables are exposed in the inspector like: default resources path, and SFX cap amount
    • Moved everything to one folder so future updates will only need 1 folder to be replaced (Old users just delete your 'Editor/SoundManagerPro' folder before updating)
    • Couple small bug fixes

    Changelog in 2.2:
    • FULL CODE RELEASE
    • NGUI integration included
    • Singleton Perfect package included Free
    • MonoDevelop Method Comments included! You no longer have to check documentation repeatedily, function descriptions are available as you type in MonoDevelop

    Changelog in 2.1.1:
    • Removed unneccesarry scripts in the Components menu
    • Fixed issue with Mute Music actually calling Mute All
    • Revamped code structure (prepped for exposure in the Paid Version)
    • Application.LoadLevelAsync support (additive will not be supported)
    • Ability to Pause everything
    • Ability to get current playing song easily
    • Ability to get full current scene playlist easily
    • Ability to go to Next or Previous song in scene playlist
    • Fixed issue with minimizing unity
    • Added more to the demo scene, 2 pages of functionality now
    • Fixed issue with callbacks

    In 2.1.1, the structure of the code is different so you'll have to at least reimport a couple things:
    DemoTwo.cs (if you're using it)
    SoundManager.dll
    SoundManager.prefab

    FYI, a change like this most likely won't happen again.

    Just in case, I would click 'view all' on your current SoundManager prefab and take a screenshot of your SoundConnections and SFX. Worst case scenario, you'll have to recreate the SoundManager prefab and add the component from Component > AntiLunchBox > SoundManager.

    Let me know if you have issues updating.

    Changelog in 2.0:
    • New inspector layout
    • Added a Sound Effects Management and Pooling System
    • Added ability to cap sound effects so not too many will play at once (to prevent something playing 10 times at once and drowning everything else out)
    • Added ability to just play a clip without having to make a SoundConnection
    • Added ability to play a clip immediately and have it loop
    • Added ability to set music and/or sound effects enabled
    • Added ability to get a SoundConnection for a certain level
    • Completely removed excess components
    • Fixed issue with setting the volume to a higher volume not working instantly
    • Added callbacks for crossfading
    • Modified system to be able to handle temp change when the pitch is changed
    • Fixed issue with crossfade time changing forever if the clip length was less than the crossfade length
    • Fixed issue with volume not updating when the crossfade duration was 0, causing a new track to sometimes start at maximum volume
    • Fixed issue where if you played another track manually, but switched while it was crossing in-- it would finish the cross in before successfully crossing out
    • Clips will now be removed if you select none
    • Fixed issues with Unity4 deprecatd functions
    • Fixed issues with people who pause the game with Time.timeScale
    • Fixed Issue with LevelLoad sometimes being called twice in some people's games


    Upcoming Features in Future Updates:
    • Customizable amount of AudioChannels (SFX Group feature)
    • More info coming soon!
     
    Last edited: Jun 29, 2014
  2. madflyskills

    madflyskills

    Joined:
    Jan 9, 2013
    Posts:
    9
    looks pretty cool and impressive! Definitely a time saver, but I'm curious about something before setting any money down.

    I've found that using AudioClip.time is terrible and inconsistent across platforms. Does this plugin have these problems or account for it?
     
  3. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    @madflyskills,

    Hey,
    The plugin indeed takes that into account. It does not use AudioSource time. Instead, it uses the samples of the clip and divides it by the sampling rate in order to get the exact time in seconds regardless of platform or compression.
     
  4. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,545
    How does it "know just what to do". Can you do a demo on what's the special feature?
     
  5. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    The HD video shows a demo, but in order to keep the video from not lasting too long -- I didn't let songs finish. I'll put up a web player demo soon so you can try it out for yourself.

    I will update the post when I have that up.
     
  6. madflyskills

    madflyskills

    Joined:
    Jan 9, 2013
    Posts:
    9
    Sweet, thanks. Awesome!
     
  7. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    @imtrobin,

    I updated the post with a link to the demo
     
  8. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hi all!

    A big update is coming with:

    - Sound Effects Management/Pooling
    - More robust event system
    - Tempo change handling
    - Exposed code (as per request)
    - A facelift
    - Bug fixes

    I am also including:
    - A new video showing implementation into a pre-existing project
    - A new, better, and more organized demo

    Stay tuned.
     
  9. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    2.0 is almost done review. In the meantime, you can check out the new 2.0 on youtube

     
  10. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    2.0 is FINALLY RELEASED!!!!!! WOO!

    As noted above, here is the changelog:

    Changelog in 2.0:
    • New inspector layout
    • Added a Sound Effects Management and Pooling System
    • Added ability to cap sound effects so not too many will play at once (to prevent something playing 10 times at once and drowning everything else out)
    • Added ability to just play a clip without having to make a SoundConnection
    • Added ability to play a clip immediately and have it loop
    • Added ability to set music and/or sound effects enabled
    • Added ability to get a SoundConnection for a certain level
    • Completely removed excess components
    • Fixed issue with setting the volume to a higher volume not working instantly
    • Added callbacks for crossfading
    • Modified system to be able to handle temp change when the pitch is changed
    • Fixed issue with crossfade time changing forever if the clip length was less than the crossfade length
    • Fixed issue with volume not updating when the crossfade duration was 0, causing a new track to sometimes start at maximum volume
    • Fixed issue where if you played another track manually, but switched while it was crossing in-- it would finish the cross in before successfully crossing out
    • Clips will now be removed if you select none
    • Fixed issues with Unity4 deprecatd functions
    • Fixed issues with people who pause the game with Time.timeScale
    • Fixed Issue with LevelLoad sometimes being called twice in some people's games
     
  11. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    The free version is also available.

    The first 20 People who reply to that thread or PM me will get this Full Version for free!
     
  12. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    4,923
    Looks good. There are now FOUR packages like this that I know of. Master Audio, Audio Toolkit, Wingrove Audio and yours - one of which was written by my company. You may be smart by categorizing this under Scripting / Audio, whereas the other 3 are under Editor Extensions / Audio. Or that may be a bad move, I'm not sure :) Anyway it's good to have competition, so welcome!
     
  13. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Why thanks, but I don't consider SoundManagerPro in the same vein, really.
     
  14. AntiLunchBox

    AntiLunchBox

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

    Here's what I have planned for the next update:

    • Full source code released if SoundManagerPro gets enough downloads!
    • AudioSource pre-editing manager (configure and save AudioSource settings to apply to any sound)
    • Ability to play a new music track within a currently playing SoundConnection (without stopping it)
    • Ability to get current playing song easily
    • Ability to get full current scene playlist easily
    • Ability to go to Next or Previous song in scene playlist
    • AI support for Additive and Async loading
    • More info coming soon!
     
  15. RayWolf

    RayWolf

    Joined:
    Mar 24, 2012
    Posts:
    87
    dunno what to choose, this new one looks real good, ehehe.
     
  16. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Well give it a shot, the free version has all the same functionality. The only difference is the watermark.

    You can download it here.
     
  17. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Just came up with a new exciting feature! It will be released for the Full Version only! (Sorry Free Version users!) More details to come as I flesh it out.
     
  18. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Just pushed an update with some fixes and small features, will let you guys know when it's live.
     
  19. AntiLunchBox

    AntiLunchBox

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

    Thanks to Yusuf AKDAG for alerting me of this issue.

    In the recent release there was a build issue. I have fixed this and the new version (2.1.1) is on the Asset Store.

    The structure of the code is different so you'll have to at least reimport a couple things:
    DemoTwo.cs (if you're using it)
    SoundManager.dll
    SoundManager.prefab

    FYI, a change like this most likely won't happen again.

    Just in case, I would click 'view all' on your current SoundManager prefab and take a screenshot of your SoundConnections and SFX. Worst case scenario, you'll have to recreate the SoundManager prefab and add the component from Component > AntiLunchBox > SoundManager.

    Let me know if you have further issues.

    AntiLunchBox Studios
     
    Last edited: Jul 9, 2013
  20. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Thanks to a fast response to from Unity Asset Store Team (thanks!), the update with the fix is now on the Asset Store. You can download it regularly from there.

    Changelog in 2.1.1:
    • Removed unneccesarry scripts in the Components menu
    • Fixed issue with Mute Music actually calling Mute All
    • Revamped code structure (prepped for exposure in the Paid Version)
    • Application.LoadLevelAsync support (additive will not be supported)
    • Ability to Pause everything
    • Ability to get current playing song easily
    • Ability to get full current scene playlist easily
    • Ability to go to Next or Previous song in scene playlist
    • Fixed issue with minimizing unity
    • Added more to the demo scene, 2 pages of functionality now
    • Fixed issue with callbacks

    In 2.1.1, the structure of the code is different so you'll have to at least reimport a couple things:
    DemoTwo.cs (if you're using it)
    SoundManager.dll
    SoundManager.prefab

    FYI, a change like this most likely won't happen again.

    Just in case, I would click 'view all' on your current SoundManager prefab and take a screenshot of your SoundConnections and SFX. Worst case scenario, you'll have to recreate the SoundManager prefab and add the component from Component > AntiLunchBox > SoundManager.

    Let me know if you have further issues.

    AntiLunchBox Studios
     
  21. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    In the two week time span, SoundManagerPro got a total of over 150+ downloads! Exciting!

    As I said I would, the next release of the Full Version will include a full code release. It's already submitted to the Asset Store. The Free version will be getting a small update, but that's about it. This is where the two packages separate from each other. So now you can fiddle around with the code as you please.

    ALONG with full code release, I will be releasing a couple new features:

    -NGUI integration included. There is a package in SoundManagerPro that will update your NGUI to support NGUI sounds as SoundManagerPro sound effects. They will respect all SoundManagerPro features (SFX enabled, SFX volume and pitch settings). You can choose whether or not to use it. It does not work for Free Version users of NGUI. NGUI Free code is wrapped in a DLL.
    -Free inclusion of a new package, Singleton Perfect, on it's way to the asset store. Turn any script you have into a singleton that will:
    *Create itself if it is referenced (by function or variable) and it doesn't exist. Will name itself accordingly to your singleton name.
    *Use itself if it's in a scene
    *Deal with multiple instances of itself perfectly. (Thats how SoundManager creates itself if you call any of it's functions when it doesn't exist)​
    Use this in your project for all your singleton needs, with a snap of a finger, all you have to do is inherit from the Singleton class!

    Happy gamemaking,
    AntiLunchBox Studios
     
  22. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,045
    Yey, now I don't know what do buy, this or WingroveAudio :D

    So I'll give you the same questions I asked there:

    - is this Plugin mobile-friendly (iOS/Android) ?
    - has it PlayMaker-Support?

    I just want to have some "small" audio-task within in my game, but want to have the option to "mess" around with some functions, so I hope this small tasks are possible with your plugin AND in combination with PlayMaker:

    - playing a Background-Song for a Level
    - repeating Sounds (for example when an Enemy is attacking the whole time)
    - changing Song or Sound on demand

    Thanks in Advance for the answer :)
     
  23. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Hey Mayhem! I appreciate the interest!

    Yes, SoundManagerPro is mobile-friendly. I primarily work in mobile games so that was important for me. I stayed away from libraries that tend to crash on mobile (Linq, etc)

    Unfortunately, there isn't PlayMaker support right now. However, it's definitely something I'll look into. As you can see, I update and improve pretty often. The main reason there isn't PlayMaker support is because I personally haven't used PlayMaker. Integrating into NGUI was fairly easy though, I explained it in the README. If PlayMaker is as organized, you can do the same type of change. It is probably easy to find.

    With the full code release, you'll be able to do anything you want. The code is organized into partial class files so you can find what you need. There's also monodevelop descriptions on every function. So you can see what it does by looking at it OR when you start typing it. All to help you use SoundManagerPro better and with flexibility.

    Short Answer: Most definitely, absolutely, yes.
    This is SoundManagerPro's specialty. It will automatically do this for you per scene. You can turn off this feature and manage it yourself if you want as well.

    Short Answer: Yes!
    This is accounted for in the SFX part of SoundManagerPro. I tried to think of every relevant way to want to use a sound effect. You can:
    -play one shot sound effects
    -play looping sound effects
    -cap sound effects to a certain amount so it doesn't sound congested if too many request to be played
    -play sound effects attached to game objects
    -play sound effects attached to nothing
    -force an audiosource to be 2D
    -force an audiosource to be 3D
    -play sfx at their own pitch / volume independent of global setting
    -have extreme flexibility with your audiosource as the method call returns the audiosource it will be playing with
    +more

    Short answer: Yes.
    This is available in SoundManagerPro in a couple different ways:
    -You can go to the Next or Previous song in your song list
    -You can completely change the songlist or replace it
    -You can play a specific song
    -You can play a specific song and have it run a function when the song ends or when the song starts crossfading out -- THIS, can lead to endless possibilities.

    And you can do all these with the crossfade feature or not! It's pretty much up to your imagination. If you want a new feature--just request it!
     
  24. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    You could also, just try the free version on the asset store and see if it's what you're looking for. It won't have the code release, ngui integration, or the singleton class though.
     
  25. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,045
    Great, thank you for the detailed answer. Would Instantbuy it, when it would have PlayMaker-Support :p
    For now I'll dig in the FreeVersion and fool around. Thank you very much again.
     
  26. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    No problem! I'll put playmaker support in the queue.
     
  27. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    For everybody else who's curious, I'm also looking into uScript support as well.
     
  28. AntiLunchBox

    AntiLunchBox

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

    Version 2.2 of SoundManagerPro is released! A couple new features have been included, especially the one most of you have been waiting for:

    Changelog in 2.2:
    • FULL CODE RELEASE
    • NGUI integration included
    • Singleton Perfect package included Free
    • MonoDevelop Method Comments included! You no longer have to check documentation repeatedily, function descriptions are available as you type in MonoDevelop

    Upcoming Features:
    • PlayMaker integration
    • uScript integration

    Happy gamemaking,
    AntiLunchBox Studios
     
  29. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,045
    Remind me paying you 45$ when PlayMaker-Support is finished :D
     
  30. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Version 2.3 was just submitted to the Asset Store. It should be available in the Asset Store soon.

    Additions include:
    PlayMaker integration
    New Functions
    UI Facelift
    More exposed variables in inspector
    Couple bug fixes
     
  31. kauaiBlake

    kauaiBlake

    Joined:
    Feb 28, 2013
    Posts:
    34
    Hi there. If I understand correctly, you can read external music files at run time, by specifying a filepath to them, and calling your audioClip object load function? Can you then get access to the music data in the audioclip to process for music visualization such as FFT analysis? I want to visualize the music ahead of time to be able to create gameplay around that.
     
  32. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Unfortunately, that's not what it is. BUT I have extensively looked into that (for reasons other than this plugin) so maybe I can help.

    What you can look into is check out Visualizer Studio, it seems to have pretty good FFT analysis. Now Unity isn't really great at letting you do analysis on a song that's not playing-- at least I haven't been able to find anything on the matter. The one analysis it can do isn't the one you're looking for. So what you can do is load the file in Unity(using either Resources.Load or import System.IO and use the File class to open an audio file on the device).

    You can then try to turn off the sound while playing to song for your FFT analysis. You can either try muting, putting the volume to 0, changing the listener volume, or plainly just removing the AudioListener from the scene while this happens. One of them should work.

    So the downside is that could take a while... So I would suggest trying to change the pitch while its playing. Because Unity has only one sampling rate, changing the pitch also changes the tempo. It'll go through the song faster and you can set it to a point where you don't lose that much data.

    You can track the download progress / base your analysis on the current length of the song. And additionally, you also want to make sure you aren't using clip.length or audio.time. Do the time calculation with clip.samples, audio.timeSamples, and audio.frequency. It will be accurate to the device you are using.

    I haven't tried it out so I don't know what affect it'll have on the data but I hope that helps.

    AntiLunchBox Studios
     
  33. kauaiBlake

    kauaiBlake

    Joined:
    Feb 28, 2013
    Posts:
    34
    Hi there AnttiLunchBox, Thanks for the reply. Yes I did look at Visualizer Studio, would be great to make use of it. I was trying to somehow get the song data and feed it into Visualizer Studio, before I play it, was hoping your plugin could help. I do appreciate your idea about playing silently and changing the pitch. Thanks for your help.
     
  34. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,597
    Hi,

    I just purchased this - so far great, but i have this weird issue.

    If I run the game in Unity and have the SoundManager object selected the playlist plays fine.

    If I run the game also within the editor, but with Scene maximised and nothing selected the first track plays, but none of the others do.

    Am running version 2.2 on OSX with the latest version of Unity. Some advice on what I need to do to resolve this would be much appreciated.

    Cheers,
    Adam.
     
  35. AntiLunchBox

    AntiLunchBox

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

    I was able to pinpoint the bug. It appears to be an issue with 'Maximize On Play' enabled. I did a quick google search and it seems that other custom editors have issues with Maximize On Play as well. I'm only seeing the bug happen in Unity 4 right now. I have a couple options as quick fixes for you.

    The first option is to just turn 'Maximize On Play' off for now. It's a Unity Editor bug.

    The second option (not thoroughly tested and not a good fix, but will get the job done) is to go to SoundManager.cs, and in the "CommonHandleApplicationFocus" function, add this to the beginning:

    Code (csharp):
    1.  
    2. #if UNITY_EDITOR
    3.         if(UnityEngine.StackTraceUtility.ExtractStackTrace().Contains("FinalizePlaymodeLayout"))
    4.             return;
    5. #endif
    6.  
    The problem has to do with Unity "losing focus" when it goes into 'Maximize On Play'. This matters to SoundManagerPro because unfortunately, Unity doesn't play audio right away when you come back from "losing focus" (this mainly happens when you minimize). So when the SoundManager resumed from "losing focus", Unity didn't have any audio sources playing yet. It would think that the current song was finished and move on the next one. I didn't want that to happen so I had to put in a check that would listen for when the application went out of focus.
    Now, this relates to your problem because when you have 'Maximize On Play' enabled, the UnityEditor is always "out of focus." Boo. So, SoundManager isn't doing any checks until the focus comes back. So fortunately, this is only an Editor issue. The code fix I pasted above should fix it, but I'm going to look into a more appropriate fix for the next update. I may have to consult Unity support. Let me know if it works for you.
     
  36. AntiLunchBox

    AntiLunchBox

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

    Version 2.3.2 of SoundManagerPro is released on the Asset Store! Some big changes in this release:

    Changelog in 2.3.2:
    • PLAYMAKER integration included. Custom actions for everything.
    • New functions including: Stop, Stop Music, StopSFX
    • UI Facelift, removed extra steps in process to make it easier to make SoundConnections
    • More variables are exposed in the inspector like: default resources path, and SFX cap amount
    • Moved everything to one folder so future updates will only need 1 folder to be replaced (Old users just delete your 'Editor/SoundManagerPro' folder before updating)
    • Couple small bug fixes

    I'm excited to get PlayMaker out, as one of the only audio PlayMaker add-ons!

    Happy Game Making!
    AntiLunchBox Studios
     
  37. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    @AdamGoodrich,
    As a follow up, I just heard back from Unity about the issue. They unfortunately do this by design but provided an alternative to get around it. Will be posting it in the next update.
     
  38. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    HEY ALL,

    For Mac Users there's been some iffy behavior in the editor where it doesn't continue a playlist in certain conditions. I'm posting the fix in the next update. I'll try and have the fix go through approval faster (will be posting fix in free version as well).

    If you want to fix it yourself for now (and have the full version), just go to SoundManager.cs and remove the OnApplicationFocus function. It should work after that. Sorry for the inconvenience.

    -AntiLunchBox Studios
     
  39. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,597
    Awesome support from ALB. Prompt and helpful, and sorted out the Mac issue. Top product and top support!!!
     
  40. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Thanks!

    Also, the documentation has been updated on the website to the most recent version of SoundManagerPro.
     
  41. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,045
    Hey there, so I bought it just now and imported it. Just want to mention, that there are some Obsolete-Function-Warnings like:

     
  42. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Ah yes, they shouldn't be a problem for now though. Unity plans to replace it in the future. One of my earlier updates got overwritten (where I fixed this). I'll re-add it in the next update. If you're interested in removing the warnings you can replace a line like this:
    Code (csharp):
    1. gameObject.active = true;
    with
    Code (csharp):
    1. #if UNITY_3_4 || UNITY_3_5
    2.     gameObject.active = true;
    3. #else
    4.     gameObject.activeSelf = true;
    5. #endif
    And you can replace lines like:
    Code (csharp):
    1. gameObject.SetActiveRecursively(true);
    with
    Code (csharp):
    1. #if UNITY_3_4 || UNITY_3_5
    2.     gameObject.SetActiveRecursively(true);
    3. #else
    4.     gameObject.SetActive(true);
    5. #endif
    Then those warnings will go away.
     
  43. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,045
    Aye, I knew that, just wanted to mention it ;)

    Anyway. After some playing around with the full version, it's interface and the PlayMaker-Actions I can't stress enough how I love this Plugin :D
    I talked with our Audio-Guys about the features and the ease of using.
    I already posted in the PlayMaker-Forums about your PlayMaker-Support and the very well documented PlayMaker-Actions (hoping that a lot of PM-Users will use this plugin, as far as I know there is none Audio-Plugin which has full PM-Support but only some custom-made actions like "Play Track" and "Stop Track"...)

    So, I'm looking forward for new updates and appreciate your great support. Going to write a 5 Star Review in the Asset Store later :)


    PS: Is there a way to NOT crossfade a Clip? Meaning: my Level has only 1 track which I want to loop, but when it's set to loop (ContinousPlayThrough), it's crossfading (I don't need to explain you what that means I guess :D), so it sounds a little bit odd the moment it's ending and starting again since the last seconds and the first seconds overlap. There a way to start the track right after the last second?
     
  44. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Thanks! I really appreciate it!

    Yes there is. There are a couple different ways to do this. You can either set the cross duration to 0 in the inspector or set the cross duration to 0 in code (SoundManager.Instance.crossDuration = 0). I unfortunately don't have a PlayMaker action for it, but I can add it.
     
  45. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,045
    Ah, yeah, of course, totally overlooked that in the Inspector...
    You don't have to make a PM Action for that, one can simply use the Standard-"Set Property"-Action for that.

    So, for now, everything is working great!
     
  46. AntiLunchBox

    AntiLunchBox

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

    The new website is up!
     
  47. AntiLunchBox

    AntiLunchBox

    Joined:
    Jun 6, 2013
    Posts:
    470
    Just submitted an update that fixes the issue brought up with using SetVolumeMusic(0f);
     
  48. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,045
    Hey AntiLunchBox.

    I got a question:

    So, I made a quick PlayMaker-FSM where I just hit a Button in order to play a Soundeffect. Working great, and I know it's intended for every hit on the Button that a new instance of the Sound is made, but they only deactivate themself after finishing. If I hit the Button nonstop it's creating instances over and over again. Is there a way to pool them within your plugin or should I do that myself?
     
  49. AntiLunchBox

    AntiLunchBox

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

    I think I understand what your asking, but let me know if I'm wrong.

    The sounds are currently being pooled and they do re-enter the pool once they are done playing. So if you have a long sound effect and hit the button a bunch of times, it will add new SFX objects to accommodate none being free yet. As soon as that first SFX object gets free (and you're still pressing the button), then it'll start reusing sfx objects.

    Thats why the PlayCappedSFX function is in there (it also uses pooled sfx objects). You can set it to cap a certain sfx(or group of sfx) to an string ID, say "button sound". If the cap is set at 3, no more than 3 sfx pooled objects will play sfx with the "button sound" string ID -- no matter how many times you click that button.

    Now is the function you were looking for 'PlayCappedSFX'? Or were you looking for an overload that would cap the sfx, but restart them each time?
     
  50. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,045
    Ah, yeah, great! This was the droid I was looking for :)

    But one generel question regarding Music/Sounds and Performance: should one pay attention NOT to overload the running scene with too much soundeffects? I can't foresee the future scenes, but I guess we'll have one Background-Song and around 10-30 SFX-Instances playing simultaneously.