Imagine you are in a comedy store which focuses on jokes on various disabilities, by individuals with disabilities. The business is running pretty well it seems, it's a full house, drinks are abundant, people are happy and laughing. Jake, the blind comedian can be heard tapping his cane around to find the microphone. He bumps into it, and starts to introduce himself. The crowd claps, and Jake's stream of jokes generates laughter from all over the room... Don't you wish things were just as light hearted as in this comedy store?
In this tutorial, you will learn:
• Data type operators
• Vector math and trigonometrical concepts
• More complex object retrieval using indices (The fly factory pattern)
• More advanced audio editing using the AVURLAsset class
• Simplified states
• The state pass using the renderer
• The trackpad event handlers
This is a rather big one, and requires about 400 lines of code in total to achieve the immersion, but after this, you can have a good grasp on moving objects around you, smoothly rotating your listener around itself and translating your object's position with the new rotation angle.
Here is the link to the repository. You will need to download tutorial6.zip as well as the media files here which should be extracted into your ~/Music/tutorial6 folder. These are 46 megabytes so I preferred separating the code files and the media files, and you can have some fun adding more folders and getting different results.
Again, if you have any difficulties running the project, drop me a line through the contacts page and I will do what I can to help you going.
Enjoy the comedy show :)
This one is a long one so we've included some extra resources.
Here are some places to get your hands a bit dirtier to understand the process of the audio engine, tapping into the mic, adding more mixer nodes and understanding the flow of the audio graph:
The AVAudioEngine documentation on Apple's developer website:
Here is the WWDC 2014 presentation of the AVAudioEngine capabilities:
Here is a youtube video which explains the concept of unit vectors. These videos from Khan academy are quite useful and I find them to be understandable without sight:
Here is a video explaining vectors and scalars and how they interact:
Finally, here is a video explaining magnitudes: