Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

DJ PRO - Play your music

Discussion in 'Assets and Asset Store' started by Stefan-Laubenberger, Nov 1, 2017.

  1. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    DJ

    If you ever wanted to listen to your own music within your game, you can do so now.
    DJ is, simply put, the missing link between Unity and your music-library.

    As the name promises, it’s a solution to build the music player of your dreams – just like a real DJ.
    It adds and plays audio files from anywhere inside your application, it’s very configurable and you can add as many records, sets and turntables as you wish.

    DJ is a must for everyone who loves music!


    Features:
    DJ and turntables

    • Support for those audio formats on any platform:
      • MP3
      • OGG
      • XM
      • IT
      • MOD
      • S3M
      • WAV
      • AIFF
    • Export audio from a turntable or the whole session
    • Read the lyrics of the current record!
    • Open Spotify with the current record!
    • Tune into multiple turntables at the same time (and blend between records)
    • Reads tags like ID3
    • Reads and saves M3U, PLS and XSPF files
    • Crossfade between turntables and records
    • Loop between start and end position
    • Events for certain positions
    • Cache records to play them with no delay (e.g. a piano)
    • History of all played records!
    • Watchdog for file system changes
    • Performance: Very low impact on performance!
    • No limits: Does survive changing scenes! The music is not interrupted even during a load operation if necessary!

    Filter & order
    Filter
    and order (ascending/descending) the records by:
    • Name
    • Title
    • Artist
    • Album
    • Genre
    • Rating
    • Year
    • Duration
    • Path
    • Size
    • Format

    Documentation & control
    • Test all audio records inside the editor!
    • Powerful API for maximum control!
    • Detailed demo scenes!
    • Comprehensive documentation and support!
    • Full C# source code

    Compatibility

    • Supports all build platforms (except WebGL & WSA)
    • Works with Windows, Mac and Linux editors!
    • Compatible with Unity 2018.4 – 2020
    • Supports AR and VR!
    • C# delegates and Unity events!
    • OnRadio integration for song art!
    • Works great with Radio
    • Works with Online Check
    • Works with File Browser

    Integrations:

    Some impressions:

    01-Play.PNG

    CT_Screenshot_18-01-2018-13-07-37-3.png

    CT_Screenshot_18-01-2018-12-47-37-1.png

    CT_Screenshot_18-01-2018-12-50-05-1.png

    07-RecordList.PNG

    Video:



    AssetStore:

    DJ PRO
    Audio Suite Bundle
    All Tools Bundle

    Our other assets


    Demos:
    Windows
    Mac
    Linux
    Android


    Changes


    Feel free to download and test it.
    Any constructive comments are very welcome!


    Cheers
    Stefan
     
    Last edited: Aug 28, 2020
    arteria likes this.
  2. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,340
    Amazing work Stefan. Downloaded the demo on my mac and gave it a test drive.
    Looking really awesome. Great work.
     
    Stefan-Laubenberger likes this.
  3. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,340
    Question about the "Cache tracks to play them with no delay (e.g. a piano)".
    Is it feasible to support a full size keyboard on a mobile app?
     
  4. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Hi

    Yes, you can do what ever you want. DJ can play infinite Turntables (records) at the same time :)
     
  5. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,340
    Cool, I am envisioning one possible use case for a sampler/synth with sampled sounds. Performance and no delay is crucial. How would having a large number of cached tracks affect the memory and performance on mobile devices. Is there an efficient pooling system for storage/retrieval of sounds to and from the cache. Also how is the cached sounds stored on mobile devices.
     
  6. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Atm, it works like that:
    You enable "Cached" on the turntable and it will cache the current record. The size used in memory is equals the record.
    An example: if you have 20 turntables with samples of 1MB each, then it would use 20 MB of RAM.
    The record (sample) is cached after the first usage and is instantly available (= no delay).

    Currently, DJ doesn't save/load the cache itself, but I have planned a much more sophisticated caching system in the future.
    However, I think you could easily build such an app with the current version.
     
  7. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    191
    Does this system have a way to report the bpm of a track/turntable?
    Can it support altering the bpm playback of a turntable without altering pitch?
    Does it support an auto sync option to match the playback speed of two different tunes via different turntables?
    Basically can it be used to create a typical modern day DJ application?
     
    StaggartCreations likes this.
  8. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    BPM detection is planned for an upcoming release.
    Auto-sync with BPM is also planned ;-)

    And yes, you should be able to create a DJ application with it.
     
    blacksun666 likes this.
  9. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    191
    I've just had a quick look at the demo(windows), checking out the spotify integration. Not sure if it is a limitation of the demo, or the asset, but although it launched spotify, spotify tried to locate the 'demo song'. Is there a way to get the demo to load up a specific track or playlist from spotify? Once the bpm/auto sync feature is available will this work with tracks from spotify too?
     
  10. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    No, it's not possible to play tracks from Spotify inside DJ. They use DRM to protect their audio.

    But you can choose your own directory or add a playlist with music files.
     
  11. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,340
    Awesome work Stefan. Party On.
    Cheers
     
    Stefan-Laubenberger likes this.
  12. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    We've created a tutorial video:



    Cheers
    Stefan
     
    Last edited: Apr 27, 2018
  13. Treacle-Games

    Treacle-Games

    Joined:
    Aug 24, 2015
    Posts:
    23
    Hi Stefan
    I purchased this kit yesterday andhave spent most of today playing around and getting to know it.
    First impression is it is probably one of, if not the best thing I have purchased from theapp store so far.
    Being a professional DJ I have a number of ideas and have made a test bed to try out at tomorrow night's Disco. So I'll let you know how it performs and I'm sure a few questions on how to add elements.

    Regards
    Mark
     
    Stefan-Laubenberger likes this.
  14. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Hi Mark

    Thank you very much for the flowers! ;)

    Please let me know about your real-life experience, I am eager to improve DJ based on your feedback!

    I hope it won't let you down!


    So long,
    Stefan
     
  15. ChillX

    ChillX

    Joined:
    Jun 16, 2016
    Posts:
    12
    Its freezing the editor for me.
    Example. Load demo "Play" scene
    Put in a folder.
    Hit Play.
    Stop Editor.
    Editor is now frozen
     
  16. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Hi

    How many audio files are in your folder?
    This happens normally if you add hundreds of files and use not the right settings.
    Please try it with this config:
    upload_2018-7-7_11-52-44.png

    "Load Tag" and "Read File Size" are very time consuming operations and "Auto Update In Editor" could be the reason for your freeze.

    On the other hand, you could leave those settings enabled and enable "Use Music Library". This way, it could freeze your Editor for the first scan, but creates a DB with the information for every file and is afterwards blazing fast. Disabling "Slow And Save" could also improve the speed and lead to more responsiveness.
    This first "scan" needs time if you have a lot of files - this is unfortunately how it works and can't be prevented.

    Please let me know if it helps you further.


    So long,
    Stefan
     
  17. ChillX

    ChillX

    Joined:
    Jun 16, 2016
    Posts:
    12
    Thanks for that. There is something in the demo scene (play.unity) that is causing the freeze.
    When I use the prefabs in my own scene everything is all sweet.

    Different question. How on earth does one adjust the master volume. I know I can access the audio source on the turntable and do it but really maybe a volume property on Simple Player might make a lot of sense ? or is it already there and I am just not seeing it.
     
  18. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Ok, this is a bit strange... No errors in the Editor?

    About the master volume: we thought it makes more sense to control it directly via the AudioSource, like pitch, spatial blend etc.
    We could expose those properties to the Turntable, but I think it would not help a lot and overload the already packed component. Convince me otherwise ;)
     
  19. CelsoMdeMelo

    CelsoMdeMelo

    Joined:
    Jul 16, 2016
    Posts:
    2
    Hi Stefan,

    This asset looks promising. The documentation says that it "supports AR", but did you try it with the Hololens?

    Thank you,
    Celso M. de Melo
     
  20. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Hi Celso

    Thank you for your interest in DJ!

    Unfortunately, DJ doesn't support WSA (UWP) and WebGL as build targets.
    We're currently evaluating how-to make our assets working there, but it's unclear, if and when we can provide support for those platforms...
    We will keep you informed in this thread.

    Cheers
    Stefan
     
  21. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Important notice for all "standard" customers:

    We constantly try to push our assets to the next level by adding new features and deliver the best support for our customers. In the past we've kept updating the asset in a 2-month cycle. However, after careful consideration, we feel like this needs to happen at a faster pace. We've received numerous input from the community that a faster pace would help out a lot. Because Unity is ever evolving and we want to keep our assets relevant we need to be able to keep up the fast pace that is Unity's second nature. Packaging and maintaining a separate DLL-version poses a problem in regards to this goal.

    With this in mind, we decided to phase out the DLL-version by the end of August 2018.
    Besides being able to update the asset more often, we are convinced that phasing out the DLL-version in favor of the PRO version will also bring these improvements for our customers:
    1. More functionalities and supported platforms due the source code (e.g. Linux)
    2. Less frictions with different Unity versions within the same company
    3. Fast hotfixes and high priority support

    We understand that this may impact you negatively. However we hope with the upgrade-path we offer to you - our loyal DLL-customers - can alleviate your concerns and win you over once more:
    PRO edition

    Please rest assured we will continue to support and improve the PRO version over the years to come.

    I hope you understand our decision.


    Cheers
    Stefan
     
  22. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Update regarding the deprecation of the standard package:

    The standard package is planned to be available (but no longer maintained) until December 2018. This will allow the transition to PRO with a 50% reduced upgrade-price for our existing customers.
    Afterwards, the package will vanish from the store and the upgrade path will become inaccessible.
     
  23. maidengaming

    maidengaming

    Joined:
    Feb 15, 2016
    Posts:
    3
    Can you provide more details on what discord channel added means?
     
  24. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    It's just that we now provide a Discord channel for our users and implemented it inside the asset:
    upload_2018-8-27_17-48-3.png

    No big thing :)
     
  25. Treacle-Games

    Treacle-Games

    Joined:
    Aug 24, 2015
    Posts:
    23
    Hi Stefan
    how do I upgrade to the pro version and get the discount.

    regards
    Mark
     
  26. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Hi Mark

    Simply go to the PRO-version and choose "Upgrade".

    Thank you for your trust in us!


    Cheers
    Stefan
     
  27. Treacle-Games

    Treacle-Games

    Joined:
    Aug 24, 2015
    Posts:
    23
    Hi
    Thanks for your reply.
    I can't see anything that has an upgrade link on the pro version asset store page? can you point me in the right direction.

    regards
    Mark
     
  28. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    First, make sure you're logged in with the account you bought DJ in the AssetStore, Then go to the PRO-version and there should be a button called "Upgrade". The upgrade itself is $30.


    Cheers
    Stefan
     
  29. Aske_S_K

    Aske_S_K

    Joined:
    Mar 9, 2014
    Posts:
    13
    Hi Stefan

    As far as I can see the asset does not support users to browse for and select local audio files themselves if it's build for Android or iOS, is this correct? I can see DJ Pro works well with your File Browser asset but this doesn't work for Android and iOS either right?

    Otherwise it looks very promising :)
     
  30. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Hi

    DJ scans the official, local "Music"-folder under Android, but yes, there is currently no file browser available. But the user could enter the path manually.

    We're working on a generic solution that will work on all platforms (except iOS) for the PRO version of our FB asset, that will be released later this year.


    Cheers
    Stefan
     
  31. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,340
    Thanks for the update.
    Btw, will there be support for the new DSPGraph in future updates.
     
  32. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    You're welcome!

    I can't make any promises about DSPGraph, but we keep a close eye on it.
     
  33. LisaBrown

    LisaBrown

    Joined:
    Feb 29, 2020
    Posts:
    1
    Many thanks! It seems like a useful tool. Is this tool compatible with the local MP3 files that downloaded from Spotify via AudFree?
     
  34. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    I don't know AudFree, but DJ works with every local standard MP3-file.
     
  35. JessieQ

    JessieQ

    Joined:
    Mar 17, 2020
    Posts:
    1
    Do you mean the converted MP3 files? DJ can work with those files. I have tried DRmare, probably a similar product as yours.
     
    Stefan-Laubenberger likes this.
  36. Pode

    Pode

    Joined:
    Nov 13, 2013
    Posts:
    119
    @Stefan-Laubenberger I have a question. I'm currently developping a soundboard-like app. In it I have a few mp3 files (less than 15), but each one of them is around 80 mb (around 1h per file). This app is built for Android.
    I have a GUI with a button per track. When the user clicks on one track, the associated file should be loaded and playerd. The size of the mp3 files prevent them to be properly loaded on Android, switching between files and loading them is, of course, too long.
    Is it possible to use DJ Pro to load the file really quickly ? I don't know if the MP3 format allows it, but does your asset 'preload' some part of the file at the beginning, and load the rest in the background while playing ?
     
  37. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Hi

    DJ streams the data and is therefore really fast. A small delay may happen for the first time, but DJ allows to cache the data, so it's lightning fast the second time.

    I hope this helps you further.
    Stay safe!


    Cheers
    Stefan
     
  38. Pode

    Pode

    Joined:
    Nov 13, 2013
    Posts:
    119
    Thansk a lot for the quick answer !
     
  39. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    47
    Code (CSharp):
    1. rpFile.Files.Clear();
    2.         foreach (data t in rpf)
    3.         {
    4.             rpFile.Files.Add(t.FullfileName);
    5.         }
    loading the files into RecordProviderFile at runtime, results in the first song being played every time SimplePlayer.Next() is called. populating the rpFile.Files prior to runtime functions as expected.

    Is this a bug or am I missing something?
    Thanks
     
    Last edited: Apr 19, 2020
  40. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    47
    I call this after altering and is seems to work now:
    Code (CSharp):
    1. RocordProviderFile.cs
    2.  
    3. public void forceChange()
    4.         {
    5.             isChanged = true;
    6.             currentFilesSize = CurrentFiles.Count;
    7.             Load();
    8.         }
     
  41. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
  42. NiVision

    NiVision

    Joined:
    Sep 14, 2015
    Posts:
    2
    Hi Stefan,

    I need help. I need a none-streamed version of an audio clip.
    When I changed code in Turntable.ctPlayAudio(byte[] data, bool cache) line 1442
    from
    ac = AudioClip.Create(record.FilePath, totalSamples, Channels, SampleRate, true, readPCMData);
    to
    ac = AudioClip.Create(record.FilePath, totalSamples, Channels, SampleRate, false, readPCMData);
    I have error during clip creating.

    Record {FilePath='D:\3DS\Rammstein - Sonne (Official Video).mp3', Rating='0', Name='Rammstein - Sonne (Official Video).mp3', Title='Sonne (Official Video)', Artist='Rammstein', Album='', Genre='', Year='0', FileSize='6070158', HasTag='True', HasID3Tag='True', HasXiphComment='False', HasAiffTag='False', Format='MP3', IconUrl=''SpotifyUrl=''}
    Could not read audio after 4:12! This is typically a sign of a buffer underun:
    System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
    at System.Buffer.BlockCopy (System.Array src, System.Int32 srcOffset, System.Array dst, System.Int32 dstOffset, System.Int32 count) [0x00097] in <fb001e01371b4adca20013e0ac763896>:0
    at Crosstales.DJ.Turntable.readPCMData (System.Single[] data) [0x000bd] in D:\Projects\X-BOOSTER\X-BOOSTER\Assets\Plugins\crosstales\DJ\Scripts\Turntable.cs:1101
    UnityEngine.Debug:LogError(Object)
    Crosstales.DJ.Turntable:logDataError(Exception) (at Assets/Plugins/crosstales/DJ/Scripts/Turntable.cs:994)
    Crosstales.DJ.Turntable:readPCMData(Single[]) (at Assets/Plugins/crosstales/DJ/Scripts/Turntable.cs:1109)
    UnityEngine.AudioClip:Create(String, Int32, Int32, Int32, Boolean, PCMReaderCallback)
    Crosstales.DJ.<ctPlayAudio>d__151:MoveNext() (at Assets/Plugins/crosstales/DJ/Scripts/Turntable.cs:1442)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

    Can you help us ?

    Best regards.
    Janusz
     
  43. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Hi Janusz

    Since we create the AudioClip for our internal decoders on the fly, it has to be "streamed".
    Why exactly do you need a non-streamed version of the clip?

    You could try it by disabling "Force Internal Codecs":
    upload_2020-7-23_12-10-8.png

    Does that help?


    Cheers
    Stefan
     
  44. NiVision

    NiVision

    Joined:
    Sep 14, 2015
    Posts:
    2
    Hi Stefan,
    I found the source of the problem.
    D:\Projects\X-BOOSTER\X-BOOSTER\Assets\Plugins\crosstales\DJ\Scripts\Turntable.cs:1101
    I changed line to:
    System.Buffer.BlockCopy(Util.Helper.ConvertByteArrayToFloatArray(buffer, count), 0, data, 0, count * 2);
    and all works great.

    Best Regards
    Janusz
     
    Stefan-Laubenberger likes this.
  45. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Thank you very much!
    We changed that for the next release.
     
  46. Faxix

    Faxix

    Joined:
    Jul 4, 2020
    Posts:
    1
    Hi,

    I’m new to DJ PRO, but it seems there is some bug in TD - Test-Drive.

    When I try run local song (no spaces or special chars in file-path) in Test-Drive it return Error (NullReferenceException - more bellow), but same song directly in turntable plays fine.


    Occurred in DJ PRO 2020.3.0 (in Unity 2020.1.2f1)

    NullReferenceException: Object reference not set to an instance of an object
    Crosstales.DJ.BasePlayer.onPlaybackStart (Crosstales.DJ.Model.Record record) (at Assets/Plugins/crosstales/DJ/Scripts/BasePlayer.cs:268)
    Crosstales.DJ.Turntable.onPlaybackStart (Crosstales.DJ.Model.Record record) (at Assets/Plugins/crosstales/DJ/Scripts/Turntable.cs:1983)
    Crosstales.DJ.Turntable.ctPlayAudioInEditor () (at Assets/Plugins/crosstales/DJ/Scripts/Turntable.cs:2117)
    Crosstales.DJ.Turntable.<ctPlayInEditor>b__162_0 () (at Assets/Plugins/crosstales/DJ/Scripts/Turntable.cs:2093)


    Thank you and have a nice day

    Faxix
     
  47. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    Hi Faxix

    Thank you for your problem report!
    We will investigate this behaviour and fix it for the next version.

    Stay safe!


    Cheers
    Stefan
     
  48. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    We've just released version 2020.4.0 of DJ.
    This is a major update and brings many new functions and changes:
     
  49. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,515
    The new version is in the store!
     
  50. JAMJAMT

    JAMJAMT

    Joined:
    Sep 8, 2020
    Posts:
    1
    Hi Stefan
    Can I import Spotify music directly or I have to use some tool like Tunelf Spotify music converter/AudFree to convert Spotify to MP3 / WAV etc to use the DJ ?
     
unityunity