/Unity-Audio-Sequencer

A precise audio sequencer for Unity

Primary LanguageC#MIT LicenseMIT

Unity-Audio-Sequencer

A precise audio sequencer for Unity3d

Features

  • Seamless and Stable Audio Sequencer.
  • Stable even in high metronomes.
  • Ability to change Bpm or Sequence at runtime.
  • Works with Unity3D 5+ since it uses OnAudioFilterRead to access Audio Buffer.

Acknowledgments

Components

  • Sequencer: Basic and main component that actually plays the audio files.
  • Sequener Group: Manages child sequencers.
  • Sequencer Driver: Manages any list of Sequencer Groups or Sequencers.
  • Sequencer Base: Base class for all of the classes above. Should not be used by itself.

Setup

Sample

  • Use Sample Prefab provided or open the Sample Scene to see a working example.

Step by Step

  • Import and set your audio files to Decompress on Load.
  • Create a Sequencer Group. It will automtically create a Sequencer as child. Create Sequencer Group
  • Set audio file to Sequencer. Set Audio File
  • Set Bpm of Sequencer Group
    Set Bpm

Alternative Usages

  • Sequencer Driver can be used instead of Sequencer Group but you should manually set which Sequencer or Sequencer Grops it should manage.

    Sequencer Driver

  • Sequencer can also be used without a Sequncer Group or Sequencer Driver Sequencer Only

Changelog

  • 0.41
    • Sample now has a seek bar to control start percentage.
  • 0.3
    • CurrentStep and NumberOfSteps added for position tracking.
    • CurrentStep and NumberOfSteps are now included in onAnyStep and onBeat events.
  • 0.2
    • Audio channel support.
    • BackBuffer pooling.
    • Performance improvements.
  • 0.1
    • Initial features set.