IntroloopAudioasset file. If you would like to use multiple pitches of the same audio, you can just copy the asset file and have different pitches. It can reference to the same actual audio file. Works fine with pause, resume, automatic memory management.
IntroloopAudio.Instance.Preload(yourIntroloopAudio)beforehand to pre-consume memory, and then call
Playas usual afterwards.
In Unity if you select "Loop" in
AudioSource, the song will loop to beginning when it reaches the very end.
With Introloop, you can specify 2 time point "Intro Boundary" and "Looping Boundary" in your audio. Playing with this plugin and it will now loop back to Intro Boundary when it reaches Looping Boundary, effectively make the section before Intro Boundary an intro section that plays only once and the rest will be looping.
Those two points are stored in a separated asset file called
IntroloopAudio file, think of it as an instruction accompanying your original audio which you will then use the singleton class to play it - as simple as
IntroloopPlayer.Instance.Play(myIntroloopAudio). No need to place any special
GameObject manually on your first/any scene, so you can start the play mode from any scene like usual.
Your original audio file will remains intact, no need to cut it up to 2 files like some solutions. Updating songs from your composer is as easy as overwriting the audio file. As long as the song structure doesn't change, your
IntroloopAudio will still works.
It is a common practice used in many commercial games. Intro adds huge value to music, turning into a powerful tool for directing player's feel and blends more into gameplay. Maybe if you haven't noticed, in the next section I will show various examples from games I liked.
Let's recall memorable moment from favorite games you have played. A destined fight with arch rival? Roaming over world map for the first time? An opening stage that really hooks you that you can't put down the joystick?
Wondered why they stuck well in your memory?
Many commercial game music has certain charm when you are listening to it in game because they're programmed to have a nice intro that sets the mood of that particular scene, before transitioning seamlessly to a music loop, never having to play the intro again. This is the source of immersive feeling you never get when you listen to the song again in an OST.
Maybe it is easier to explain with examples!
If you have played RPGs there is a "random encounter" right? In theory it should get really boring after a while, but I think it works so well and always so exciting to RPG gamers because of music's intro that really tell you "let's fight!" but at the same time never loop to that intro again, keeping the intro powerful. Intro also make the music more memorable.
Probably some of you have played Pokemon. When you run into some wild pokemon or even trainers the intro ("Wadadadwadada...!") will play, then some sick bassline follows which is also part of intro. This is one of the iconic thing in Pokemon. Without it Pokemon would not feel the same.
In situation like a fight in tactical turn-based RPG game or final boss fight, perhaps the music will loop multiple times. Why not begin with something a bit different? Music in this example is quite long, nevertheless when it reaches loop point you will see that if you have to begin the song at that point it would not be as effective.
You don't have to think of "Intro" as a long musical passage. Merely single-melody synth stab or one bar of attention-grabbing rhythm at the song's start can dramatically add memorable cue and makes player come back for more. This technique is also used in scene that will be visited often like character select screen in fighting genre.
How about a menacing tone at the start and then picking up the tension later? In normal looping your composer would have to find a way to reduce the tension again in order to seamlessly loop the music. You can give your composer a lot of creativity freedom here. Even tempo difference is possible - slower BPM only at start, increase speed later and never loop back to that part again.
An opening stage with epic begin, a field music that starts with worldly intro, or how about conveying feel of ease when finally arriving at the village with some gentle melody? It's not just about battle, any feeling you would like your player to feel, use music intro to direct him/her to that direction right from the start then keep it going with your gameplay.
Your tune (and in turn, your game) will be much more memorable and less boring. Exaggerate certain feel in your scene more by incorporating song intro into design.
Actually I'm surprised that I haven't seen any audio plugin doing this, something so prevalent on commercial games. It's about time to appreciate the intro, really.
I have made a simple demo on various platforms, with several songs you can play with. The demo is basically a bunch of buttons, each button represent one C# method call.
If you wanted to see Introloop in real application, my own game Duel Otters which you can freely download to your iOS/Android device is heavily powered by it. Introloop has gone through many frustrating bug fixes throughout this game's development so I am quite confident now that it is working well.
In that game all BGMs are Introloop, and the actual length is quite short (only 5-10 seconds) but with Introloop they sounded longer than it actually is. This is great because I can conserve space while still having many songs.
Let's get started on how to play your first Introloop by clicking here!