Record Sound in Cocoa Example Please! - objective-c

I've been scouring both this site and the net in general for an example cocoa app that uses QTKit or Audio Queue and actually works.
Unfortunately, I can't find anything that fits the above description.
All I want to do is get a simple audio recording app so I can learn how it works!
Please, I have put alot of time into this already so don't point me to Apple Dev. It is just too dense for my simple brain.
And yes, there is a dupe or two here, but none of them actually produced a satisfactory outcome.
I am desperate! I feel like this should be WAY easier. I am starting to worry about getting deeply into Cocoa because the developer documentation is really not good.
Help!

It's not reasonable to ask people not to point to the documentation, especially when there is a step-by-step tutorial for creating a simple recording app with QTKit therein. It's titled "Creating a Simple Capture and Recording Application" with about ten steps (with code). If that's not enough, the Sample Code section gives you "MyRecorder," which is a ready-to-go media recorder using QTKit.
It's far easier to get help if you a) don't limit people by telling them not to refer you to a resource and, b) start with some standard resource and explain what it is that's confusing you or that's not working for you, so we have a starting point from which to offer help.

Related

Fundamental Architecture of an iPhone App: what does exactly happen?

I am new to iPhone-Programming and I am probably asking a beginner's question, but I really couldn't find a satisfying answer to this:
I would like to understand the underlying architecture or structure of an iPhone App. What comes first, what are the parts that a starting template usually does automatically? In C-Programms, you know the program always jumps into main and then everything starts like you coded it. In iPhone-Programming, we start also in main and then something like the event loop starts and etc.there is a lot going on under hood, which I would like to understand so I feel more confident writing code and actually being aware of all consequences that my code causes.
I would be happy about any answers or are there any good references that are compact and only focussed on the coding architecture?
Read this for example ... http://www.technolike.com/archives/86/core-application-architecture-for-iphone.html ... and Google for more. There are many resources how to iPhone application starts, what's going under the hood, how event handling cycle does work, etc. Also when you read these resources, try to ask more specific questions. It's too broad question to answer everything.
I suggest that you browse through Apple's documentation on iOS development: http://developer.apple.com/library/ios/navigation/
If you want to learn the low level stuff first, perhaps you should look into how Objective C works and then move to learn about UIKit (which is the central framework/library for iOS app development).

Sencha touch app building

I was put in charge of learning this and well I have read and tried to understand it all. I am lost in how to get it started and optimized. I need to achieve a window at startup that is menu based and takes you to different components. I think I have the photo galleries sorted out just now sure how to link to the startup window.
examples
I used this tutorial when I was trying to learn - http://miamicoder.com/2011/writing-a-sencha-touch-mvc-application/
The learning curve is quite steep but once you understand it it's a really good bit of kit to know your way around.
If you don't already understand the MVC (Model View Controller) architecture then it's going to be a bit tricky but the tutorial explains it all pretty well.
My advice would be start following the tutorial. Stick to it, get it working and THEN adapt it.
Good luck.
With Sencha Touch 2, the team have created a bunch of guides which hopefully help ease the pain when trying to learn the framework.
I suggest you first take a look at the Getting Started Guide, and then move onto the Building your first App Guide. These both should give you a kick start on where to start.
After that, I would definitely recommend you take a look at the code of their various examples, and then try modifying it. When I was first learning the framework (and JavaScript in general) I found that taking existing code and modifying it was definitely the easiest way of learning. Obviously this varies from person-to-person, but it is always a good step.
Much of their documentation have previews and examples which you can actually edit the code inline, which I have found very useful in the past. You can view an example of this here.
The Touch Forums are very active. Almost all topics get responded to within hours, and I have never seen a post which was never responded to.

ideas for a unique (or semi-unique) application of audio fingerprinting

I am a final year computer undergrad student looking for a unique (or semi-unique) application for audio fingerprinting, for my finally year project. My original idea was to have a program to figure out what song a user was humming, thru the use of audio fingerprint. But I did a search, and found out somebody had already implemented it (perfectly I might add). Any suggestions on how I can tweak it (it doesnt have to be TOTALLY new) or derive some thing along similar field will be VERY MUCH appreciated.
P.S. Thank you in advance.
(P.P.S. I don’t have to do a full implementation, just the core part or an essential part of my choosing)
Last.fm has an amazing API and song fingerprinting script. Maybe you could extend their app to do something different?

Any code samples open-source-engines, or open source hex tile games, references for writing Hex Tile based Games?

Using other questions on here I found Amit's Page on Games including a section on Hex Tiles which also links to a game coding wiki here.
I am looking for suggestions:
(a) libraries, engines or code samples in any language. I have found one in python, PGU+pygame, but looking for more.
(b) open source hex-tile tactics or strategy games.
Because google can find things for me, what I'm hoping is that you have actually used one. So if you googled and then posted, then this is nothing better than let-me-google-that-for you. Much appreciated if (i) you have used it, (ii) seriously, any language at all is okay, C/C++, python, java, flash/flex, whatever.
Related question and another related question but .net
Battle For Wesnoth is a complete, open-source, turn-based strategy hex-based game. Its written in C++. Quite a good game too.
I'm sure there would be something valuable in there, although I've only have a brief browse of the source myself.
I used PGU a number of years ago to make a hex based game for PyWeek, you can take a look at the code if you want to. :)
http://www.pyweek.org/e/PySwec/
I've got a more updated version at home which is quite a bit better but unless you actually want to play the game you should be fine with that. :)
Based on another question here on stackoverflow, there is XConq, an open source turn based tile game.

Learning Cocoa. Should I delve into Apple's documentation?

I have built some basic apps for iPhone and Mac with a general understanding of Cocoa, but haven't had a detailed understanding. Now I want to go deeper.
I have just finished the Objective-C documentation at MacDevCenter. It was great to get in-depth look but took far too much time, specially because a lot of it is conceptual, and it's hard to build detailed examples to make use of the concepts.
Now I am on to Cocoa, but feel like it would be too much work to go through 250 page documents for Cocoa itself, then KVC, Cocoa Bindings, and Core Data.
Would I be better off at this stage picking up a good book on Cocoa (Hillegass' is too sparse I think) or should I just bite the bullet and go through the docs?
Apple's documentation is generally excellent. The API reference in the very least is some of the best I've read (right up there with Java's API reference), and is a very valuable asset.
I'd suggest reading the overview pages for topics you're interested in to get a general "feel" for how they work and a starting point, and then just start writing code. You can refer to the documentation to fill in blanks that you encounter while writing code.
Writing a small project to exercise your use of APIs you'd like to learn is a great way to get started.
I've found Hillegass's book to be far from sparse. In fact, I've found it to be one of the most dense books on programming I've read. I've re-read most of the chapters at least 4 times, and each time understood more. By re-reading, I've understood the reason he included a certain paragraph and how it fits with the bigger picture. He spells everything out very clearly and doesn't waste words. I'm amazed at the amount that's contained in that book.
You mentioned that you want to learn by doing, instead of by reading. The Hillegass book has a section at the end of each chapter where you put what you've learned to the test, by building an application.
Of the three things you talked about, KVC, Cocoa Bindings and Core Data, the first two are covered very well. I did find the Core Data chapters to be a lot more sparse. That's the only part of the book that I haven't been able to understand without other documentation. The Pragmatic Programmers book covers it much better.
Anyway, the answer to your question is: it depends. If you've managed to work your way through the Mac Dev Center documentation, it may be that you're the kind of person who learns easily from that style of resource. If you like learning from books, the best one is Hillegass.
I'd recommend an excellent book released some time ago: ‘Cocoa Design Patterns’ by Erik M. Buck and Donald A. Yacktman.
Of course you can dive into Apple's documentation, but to me, I found Hillegass' book is a good start for learning Cocoa. The value of the book, I think, is the introduction of the conventions and idioms of Cocoa.
Is it really clear for a new Cocoa developer to find out information on issues like when and when not to send message autorelease to an object? You can argue that a single Googling will do, but how do you know there are these kind of issues in the first place?
Go get a good book, look through it and take notes. It could save your time. For me, on Cocoa, the book is Hillegass'.
Hillegass' book will drive you to the free documentation every time he fails to make sense in order to be "funny" (i.e. every other paragraph) anyway, so unless you just want to give him $40, you will be much better off sticking to what Apple gives you au gratis. At the very least you won't pick up any of his horrible UI design habits.
You don't really need to go through ALL the bindings and Core Data docs page by page--half of it is stuff you'll likely never use. Knowing where to look for more information is far more valuable a skill than memorizing APIs.
The reference is great and invaluable, but might not be the easiest way to start coding (as people have mentioned).
I started looking at the stanford lectures on iphone development, then coded as I went along. I've actually used them as reference once or twice as well... They are available on itunes for free.
It depends on what other programming experience you have and how you learn best. If you're fairly new to programming in general, I'd recommend Hillegass to start. If you're fairly competent at OOP but don't know Objective-C, you can go for Apple's "Introduction to The Objective-C Programming Language" to learn ObjC's language features. If you've programmed using paradigms other than OOP, you could look for general OOP book recommendations here on SO (e.g. "Best Referece to learn OOP independent of languages?"). I also second Jonatan's recommendation to check out what programming videos iTunes University offers. They are recordings of lectures from top-tier universities and generally of good scholastic quality (I only qualify this with "generally" because I haven't seen them all; the ones I have seen invariably were of quality). No matter where you go to learn ObjC and Cocoa, you'll still yourself using Apple's docs as reference.
As you learn, you might also find CocoaDev a useful ancillary source.
Aaron Hillegass's book is the text for his one-week cocoa development seminar, and it has been revised over several years of teaching Cocoa to beginners. Aaron's course is where Apple sends their own employees, now that they don't do the Cocoa course in-house anymore.
Apple's documentation is an excellent reference, but I agree that it's a huge resource to try to learn Cocoa from in the first place. Besides, you probably don't need to know the whole API up front -- just learn each part as you need it.
When I started learning, I just picked a project, sat down and started trying to code. When I ran into something I didn't know, I just googled it, which led to a tutorial and/or the relevant page of Apple's documentation.
In my experience, the best way to learn something like this is, well, experience.
Apple's documentation generally contains excellent API references, but (in my opinion) lacks equivalent topical guides. This makes it a bit hard to follow for beginners (Jacob Kaplan-Moss in the link I just gave makes the point that Python's documentation is like this, but I think Apple's is much more).
My recommendation would be to pick up Hillegass's book, alongside a project. The first few chapters explain fundamentals, so make sure to read those (and do the exercises!), or you won't be able to get far. Then try and implement your project idea; when you reach a wall, look through the Table of Contents and the glossary of the book and see if there's something that covers it. If you find something, use this as an excuse to read it fully and understand it. When you're finished, you'll have both a greater understanding and a project to show for it. Furthermore, you'll know what to search for in Apple's API references next time you try to implement something. This helped motivate me to finish the book, maybe it'll be helpful for you.[1]
[1]: (disclaimer: I have an odd learning style)