Examples on Drum Sim Build for iOS - ios

I'm trying to build a drum simulator in Xcode for an app for my brother in laws band. I'm having a little trouble doing this. What I'm wanting to do is use a picture of the drummer's drum set and use that as the drum you can play on the iPhone. I was thinking it could kind of be like an image map in HTML where the buttons would play a sound of the drum and everything else. If anyone has any ideas or how-tos on this it would be greatly appreciated.
Thanks

A very basic approach:
Use a UIImageView with an image of the drumkit as background.
Create a transparent UIView in front of each drum. Attach a UITapGestureRecognizer to each UIView. This gesture recognizer should call a different method for each view. Use AVAudioPlayer to play the sound.
That's just a very basic app but not so bad. After you've done with that your next tasks could be:
optimize performance. Sound should play in the moment you touch the display.
multitouch
use core motion to detect the strength of your tap and adjust the sound

A UIImageView with some nice invisible buttons (UIButton's tintColor property as in button.tintColor = [UIColor clearColor];) over the skins would be perfect. Then, take a look at how to play some audio over here: http://blogs.x2line.com/al/archive/2011/05/19/3831.aspx

Related

Add scroll playback controls to AVPlayer like in Photos app

I'm creating AVPlayer view to watch the stream from CCTV. And I want to make playback controls in a video like in Photos app at iPhone(open Photos, play some video, at the bottom, it will be UIScrollView with some screenshots of your video) like at image below.
May I ask you some help on how to create something like this?
And this is my first question here, so sorry if something wrong. =)
ScrollView playback
AVPlayer cannot do this for streaming. The suggestion made on snapshots would also not be close to your want of getting the same behaviour as on local preview of videos in the Photos App on iOS.
If you are looking for this kind of experience I would recommend heading over to movi.ai to get your hands on our cross platform solution with this ready out of the box.

Playing interactive videos with finger gestures in iOS

I am working on a kids ABC learning app which will be somewhat like this app.
Petting Zoo
The user can do these gestures... Swipe UP, DOWN, LEFT , RIGHT and TOUCH and each gesture has a small animation clip (approx duration 1 -3 secs each ) linked to it like the character jumping on Swipe UP, etc. There will also be an IDLE loopable movie which will be playing continuously when there is no input from user.
So I am trying to use videos in MP4 and M4V format for these gestures but the problem is that the videos are lagging just before playing. Means they dont play instantly upon doing a gesture but take a time of say micro second to load and play.
I am looking for output like the video above. You can see that the animations are so responsive and do not hang even for little time.
My developer once achieved such smooth output with the MP4 video clips but those clips didnt have audio embedded in them and then when he used videos with audio embedded in them, they were lagging again.
Can audio be the issue for lag here ? Or anything else you experts will like to suggest.
Please help guys. Yours inputs will be very valuable for me.
You can use - (void)replaceCurrentItemWithPlayerItem:(AVPlayerItem *)item of AVPlayer.
This methods helps you to load the new item to an existing AVPlayer.
Here is the important reference for playing multiple videos using single AVPlayer.

Auto video in iphone?

Anyone know how to add the auto playing video background in iOS? I am guessing its actually images? But the video lasts for 15 seconds so if its images then at 24fps minimum that is a lot of images.
I tried using the UIImageView swapping of images, but it seems like a hack way to do this.
See Uber's app and I think Airbnb has it also.
You can make them images as you guessed, or play video using either MPMoviePlayerController or AvPlayer. Just add any as a subview to your view and make it play at viewWillAppear. I used AvPlayer as the app home screen background before and it worked perfectly.

iOS placing and synchronizing frame by frame images over a video playing with AVPlayer

I'm trying to place an image over a video that is playing. There could be a face in the video and I want to plae a custom image over that face. I've tried to play the video using AVPlayer and tried to place the custom image using a scheduled NSTimer. It works good (not perfect) with the simulator. But When I tried it in couple of different devices it does not working well or same in all the devices. Seems like there should be some sort of synchronization to sync the video frame and the custom image.
Can anyone help me out of this issue with any tips or suggestion? Anything that is helpful will be appreciated. :)
Thanks in advance.

Play M4V in background IOS

I'm trying to figure out if it's possible to play an m4v file in the background with buttons that overlay ontop of the video? The video is basically an animation (no sound) but I need to be able to add additional navigation on top of the animation to bring in other calls in the app.
Is that possible to do? If so what is the call that would be required? I've tried hunting around but can't find an answer yet
You can use MPMoviePlayerController, set control style to none, and put your own buttons on top of it.
http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html

Resources