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
- This project uses an amazing C# script template by Sarper Soher.
- This project influenced by Unity Metronome example.
- Further contributions are welcome.
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.
- Set audio file to Sequencer.
- Set Bpm of Sequencer Group
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 can also be used without a Sequncer Group or Sequencer Driver
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.