As all mobile app developers know, making an app that relies on audio response isn't an easy task to do, due to Mobile Audio Latency.
Hopefully my steps on how I approached the challenge will help other Unity developers.
Improving Audio Latency
iPhones and iPads, in most cases, are just fine and will have great response by using the normal Unity Audio engine, but Android in the other hand, is quite a challenge.
First Phase Test
Create a normal button with an AudioSource Component and loaded AudioClip
Add a touch event to simply play the AudioClip with the AudioSource component
Build Android and iOS
You will notice that iOS will be fine and Android is quite disappointing.
Second Phase Test
After a lot of research & hair pulling, I managed to find a couple of gems.
Superpowered SDK - A good read & understanding
Android's Native Sound Pooling
If you don't have time to write your own Android plugin to get access to Android's SoundPool - you can always buy this super handy asset from the Unity Asset Store : Android Native Audio
Add an audio file to the StreamingAssets folder
Create an audio pool via the SoundPool and add Audio file
Create a normal button
Add a touch event to play the audio file via the Android Plugin's SoundPool
You will notice that the response time has greatly improved.
Even by using Android's Sound Pool it will still have some latency, due to the hardware's "round-trip" issue...
(Image Reference Superpowered SDK)
If any one has a better approach please let me know (firstname.lastname@example.org).
I hope the above will be handy :)
Guitar UI & UX Design
I had no idea to approach this, but all I knew was that I didn't want to struggle with resizing, scrolling and fitting the guitar on a mobile device - a solution that fits all.
Series of attempts
Get screen resolution and adjust scale by ratio
Resolution and DPI
Calculate screen Inch size by resolution/DPI and set images by actual inch size
After a lot of testing I realized that I could never get a perfect fit for everyone - so instead of automatically setting the guitar for the user, I created a Scene where the User has full control.
I removed all my previous attempts and by using Unity's new UI Canvas I was able to create
Entire Guitar neck
Added required UI Layout Components to frets, strings and touch points.
Added scroll feature to move up and down the fretboard
Added 2 scrollers to enable user to adjust fretboard size and resize the entire guitar manually - adjusting values on the UI Canvas Scaler Component.
This was the best and easiest way I could suite all user requirements hence better User Experience & happy user.
Design - Before & After
After replacing all prototype assets with random assets found on the web, I could safely send it of to a designer. I always try to give designers some sort of reference to what I had in mind by using random assets and 'sticking' them together.
What an amazing transformation, from something that you can clearly see was put together by a developer, to something great!