Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

[RELEASED] AutoMusic : Procedural Music Generation

Discussion in 'Assets and Asset Store' started by SchnauzerCorp, Mar 30, 2024.

  1. SchnauzerCorp

    SchnauzerCorp

    Joined:
    Oct 1, 2014
    Posts:
    8
    AutoMusic is a tool for procedurally generating music directly in Unity. Generates music in real-time, on device, on demand. Easy to set-up & fully customisable to the musical needs of your project.



    Store Link : https://u3d.as/38Zm

    Need your game to have endless hours of music, without taking a lifetime to create? Got you covered

    Want the music in your game to continually evolve within the vibe you set, without having gigabytes of your build dedicated to it? Not a problem

    Want to be able to combine pre-made loops with procedurally generated content? Yep, here you go

    Want the music in your game played back as separate instruments to allow for dynamic gameplay interaction? Easy

    Want to dynamically modify core attributes such as musical key, or BPM? Peasy

    Want a music system with a straightforward framework, allowing you to add your own unique instruments? Lemon Squeezy


    Whether you’re a seasoned music pro, or a game developer who would rather just press play, this system contains tools & instrumentation for procedurally generating music directly in Unity in real-time, on device, on demand.

    The package is fully documented & source code is provided. All included instruments are written in a straight-forward & readable manner that makes it possible for you to further expand the system for your own purposes.

    This is the most fully featured music generation system available on the asset store, and is still actively developed with more features to come.

    Store Link : https://u3d.as/38Zm
     
    Unw1se and Mark_01 like this.
  2. SchnauzerCorp

    SchnauzerCorp

    Joined:
    Oct 1, 2014
    Posts:
    8
    This tool is designed with long-form music creation in mind so here's a 4 hours and 46 minutes long demonstration.
    This is what the tool sounds like we've these input samples/settings : you can make it sound completely different.
     
    Unw1se likes this.
  3. Unw1se

    Unw1se

    Joined:
    Apr 4, 2022
    Posts:
    1
    Really cool! Just purchased to give it a shot. Sent an email on this as well but is there an easy way to raise an event when a specific sound module gets played per the procedural music settings and is there an option to free play a sound module and have it fit in the procedural music based on the settings in the harmonic hub?
     
  4. SchnauzerCorp

    SchnauzerCorp

    Joined:
    Oct 1, 2014
    Posts:
    8
    Hi,
    Just found your email, here's my response pasted in case it's of interest to others :

    I'm not quite sure what you mean by ' free play a sound module' ? happy to help on that if you can clarify. Perhaps you're aiming to 'inject' additional notes into the stream, in which case you could either do that through the relevant PlayScheduled method (correct one depends on what your instrument outputMode is) to play the sound asap / in free-time, or you could manually call the AddNoteToBeatInstance() method and get a note into the queue in musical time.

    For raising an event when an instrument is played : I think I can see why your timing would be off.
    Beatcore gets run at the start of each musical beat, but it process notes in 'chunked' time, so a whole beats worth of notes get processed at once so you need to also assess the 'noteOffset' to get the true timing
    the 'noteOffset' is recorded as a fraction of a beat. so if the noteOffset is 0.5, that means the note should be played at masterClock.nextBeatStartTime + (masterClock.beatLength * 0.5)
    if you look in MasterClock.cs, there's a method called PlayScheduledDirectSound() : this is the logic the audio system uses to trigger sounds in musical time and you should be able to copy the same logic to spawn events/objects synced to the same clock. It'sonly really the startTime logic in that method that is relevant here, the rest of the parameters are more sound-generation specific
    You might need to account for the global latency value (or other temporal offsets in your game / rendering) in your scene master clock to get an absolute sync


    What you're trying to do sounds super cool and I hope automusic can help you get there! on the schanuzercorp youtube channel I have some visualised videos where objects /fx are being spawned in time with beats, which is done essentially with the same process as described above but without the gameplay impact.
     
  5. SchnauzerCorp

    SchnauzerCorp

    Joined:
    Oct 1, 2014
    Posts:
    8
    Here's a short demo video highlighting a feature recently added to AutoMusic : Realtime synths !
    The synths receive procedurally generated note data (as with all instruments in AutoMusic) but they can have all of their parameters modulated in real-time by your game/player.
    The synths are written in a straightforward C# manner, you can create your own to add to the system, either from scratch or repurpursing components (oscillators/filters/envelopes/etc) that are already included.