<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Tasty Pixel » Blog &#187; iPhone</title>
	<atom:link href="http://atastypixel.com/blog/tag/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://atastypixel.com/blog</link>
	<description></description>
	<lastBuildDate>Tue, 24 Jan 2012 10:40:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Presenting TPAudioController, the iOS audio engine library</title>
		<link>http://atastypixel.com/blog/presenting-tpaudiocontroller-the-ios-audio-engine-library/</link>
		<comments>http://atastypixel.com/blog/presenting-tpaudiocontroller-the-ios-audio-engine-library/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 20:50:47 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Geekspeak]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[TPAudioController]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/?p=2387</guid>
		<description><![CDATA[TPAudioController is a flexible, easy-to-use and complete audio engine for iOS, built upon Core Audio, which handles all setup and management of the low-level Remote IO audio unit system, with support for capturing input via the microphone, automatic mixing of multiple audio signals with per-channel volume and pan controls, and capturing audio system output for [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://atastypixel.com/blog/wp-content/uploads/2011/12/icon-medium.jpg" alt="Icon medium" title="icon-medium.jpg" border="0" width="183" height="147" style="float:right;" class="alignright" />
<a href="http://atastypixel.com/code/TPAudioController/">TPAudioController</a> is a flexible, easy-to-use and complete audio engine for iOS, built upon Core Audio, which handles all setup and management of the low-level Remote IO audio unit system, with support for capturing input via the microphone, automatic mixing of multiple audio signals with per-channel volume and pan controls, and capturing audio system output for session recording.</p>

<p>The library, which is also the engine behind our popular live looper app <a href="http://loopyapp.com">Loopy</a>, defines protocols for recording, playback, and audio output capture for easy inclusion with existing or new projects.</p>

<p>It&#8217;s designed to be really easy to work with, in order to get new audio projects off the ground  quickly, and to dramatically cut down the iOS audio learning curve.</p>

<p>Find out more, download an evaluation version of the framework and a complete sample synth app <a href="http://atastypixel.com/code/TPAudioController/">here</a>.</p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2387" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/presenting-tpaudiocontroller-the-ios-audio-engine-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Circular (ring) buffer plus neat virtual memory mapping trick</title>
		<link>http://atastypixel.com/blog/circular-ring-buffer-plus-neat-virtual-memory-mapping-trick/</link>
		<comments>http://atastypixel.com/blog/circular-ring-buffer-plus-neat-virtual-memory-mapping-trick/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 13:13:20 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Geekspeak]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Optimisation]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/?p=2370</guid>
		<description><![CDATA[I&#8217;ve just updated my C circular buffer implementation, adopting the trick originally proposed by Philip Howard and adapted to Darwin by Kurt Revis: A virtual copy of the buffer is inserted directly after the end of the buffer, so that you can write past the end of the buffer, but have your writes automatically wrapped [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just updated my <a href="http://atastypixel.com/blog/a-simple-fast-circular-buffer-implementation-for-audio-processing/">C circular buffer implementation</a>, adopting the trick originally proposed by <a href="http://vrb.slashusr.org/">Philip Howard</a> and <a href="http://www.snoize.com/Code/PlayBufferedSoundFile.tar.gz">adapted to Darwin</a> by <a href="http://www.snoize.com">Kurt Revis</a>: A virtual copy of the buffer is inserted directly after the end of the buffer, so that you can write past the end of the buffer, but have your writes automatically wrapped around to the start &#8212; no need to manually implement buffer wrapping logic.</p>

<p>This dramatically simplifies the use of a circular buffer &#8212; you can use chunks of the buffer without any need to worry about where the wrap point is.</p>

<p>See the new implementation, which is thread-safe with one consumer and one producer, with no need for locks, making it perfect for use with high-priority Core Audio threads, on <a href="https://github.com/michaeltyson/TPCircularBuffer">GitHub: TPCircularBuffer</a>.</p>

<p>There&#8217;s a basic example of its use over on the <a href="http://atastypixel.com/blog/a-simple-fast-circular-buffer-implementation-for-audio-processing/">original post</a>.</p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2370" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/circular-ring-buffer-plus-neat-virtual-memory-mapping-trick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experiences with some app promotion strategies</title>
		<link>http://atastypixel.com/blog/experiences-with-some-app-promotion-strategies/</link>
		<comments>http://atastypixel.com/blog/experiences-with-some-app-promotion-strategies/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 17:09:37 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Geekspeak]]></category>
		<category><![CDATA[Advertising]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[Apps]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[PR]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/?p=2327</guid>
		<description><![CDATA[In the dim and distant past, while in a moment of neglecting my PhD to work on the very first version of Loopy (which is now currently one of the most popular music apps on the iPad!), I had grand visions of an almost totally passive income, making apps. I love the creative initial product [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://atastypixel.com/blog/wp-content/uploads/2011/10/buy-my-thing.jpg" alt="Buy my thing" title="buy-my-thing.jpg" border="0" width="240" height="240" style="float:right;" class="alignright" />In the dim and distant past, while in a moment of neglecting my PhD to work on the very first version of <a href="http://loopyapp.com">Loopy</a> (which is now currently one of the most popular music apps on the iPad!), I had grand visions of an almost totally passive income, making apps.  I love the creative initial product development process and, with naive optimism, I pictured pumping apps out and then sitting back and watching the money roll on in.  Tim Ferriss&#8217;s <a href="http://www.fourhourworkweek.com/">4-Hour Workweek</a> had me enthusiastically lifestyle-designing and dreaming of all my free moneys.</p>

<p>I bet I&#8217;m not the only one, but of course reality struck and we realised that the App Store aint that kind of beast. Like any other product, an app needs to be actively presented to the world on a regular basis, and needs to be nurtured to keep it fresh and relevant.</p>

<p>I say &#8220;we&#8221; because at this point, my partner <a href="http://nelliewindmill.com">Katherine</a> joined me after this particular revelation, and became A Tasty Pixel&#8217;s part-time marketing director and PR strategist &#8212; it&#8217;s taken two of us to keep A Tasty Pixel&#8217;s wheels turning smoothly, and we still have a <em>lot</em> to learn.</p>

<p>I thought I&#8217;d take a moment to reflect on some of the lessons we&#8217;ve learned in the past year, in which we&#8217;ve released a relatively successful travel planning and travel assistant app, <a href="http://cartographer-app.com">The Cartographer</a>, a very successful live looping app, <a href="http://loopyapp.com">Loopy</a>, and its big brother <a href="http://loopyapp.com">Loopy HD</a>, and tried a bunch of promotion strategies, some successful, some not, and some that haven&#8217;t yet run their course.<span id="more-2327"></span></p>

<h3>Stating the obvious: It&#8217;s not enough to just build it</h3>

<p>Just for the record, and I&#8217;m sure we all know this now, but &#8220;build it and they will come&#8221; doesn&#8217;t cut it on the App Store.  Maybe it did in Month One, but now, you might as well not start if you&#8217;re not going to devote a goodly amount of time to promoting your app, because it just won&#8217;t get anywhere amongst the hoards of other apps.</p>

<h3>Don&#8217;t expect everything to work</h3>

<p>Perhaps the biggest, or at least most helpful, lesson we learned was not to expect everything to go as planned, and not to get too down if a strategy didn&#8217;t pan out.</p>

<p>It&#8217;s often impossible to predict which things will be successful and which not, but we found it helpful to consider the payoff for the successful strategies being spread around amongst all the strategies, successful or not &#8212; that way, we could be pleased about the ones that paid off, and philosophical about the ones that didn&#8217;t!  The trick is just to keep at it, and keep being creative.</p>

<h3>High quality attracts attention</h3>

<p>Please excuse a moment of immodesty: I&#8217;d like to think my apps have a fairly high standard of quality, and it would appear that making &#8220;premium&#8221; apps really does pay off!</p>

<p>It&#8217;s not entirely &#8220;build it and they will come&#8221;, but having an app that looks great and that customers love gives you a big head-start in the PR game.  Word of mouth is huge on the App Store, and the mouths in question produce more words about great apps.</p>

<p>What&#8217;s more, a feature by Apple, which generally only happens to high-quality apps, can make a massive difference, both in the short and long term, and gives an app a great &#8220;social proof&#8221; bump.</p>

<p>Incidentally, this goes for the app site too. Sites like <a href="http://appsites.com">App Sites</a> reward beautiful designs, and you can get picked up on various design blogs too &#8212; we&#8217;ve had quite a bit of traffic lately from <a href="http://www.blogduwebdesign.com/webdesign-inspiration/20-webdesign-efficaces-pour-presenter-une-application-mobile/522">Blog Du Webdesign</a>, for example.  And the same goes for demo videos. The Cartographer&#8217;s demo got a huge response, and got a lot of word of mouth, <em>just about the video itself</em>:</p>

<iframe width="539" height="274" src="http://www.youtube.com/embed/H1CbO1zgNXY?rel=0" frameborder="0" allowfullscreen></iframe>

<p>So: Put in the extra sweat-and-tears. It&#8217;s worth it.</p>

<h3>Influencers</h3>

<p>Sometimes, depending on the nature of the app, a good word from an influencer in the area can be huge.</p>

<p>For example, when Loopy was in pre-release, I made contact with a musician I&#8217;m a big fan of, <a href="http://dubfx.net">Dub Fx</a> (you might know him from <a href="http://www.youtube.com/watch?v=8F6EoMdn95E">this video</a>, which went viral a couple of years ago). Ben was very interested in the app, and threw his not inconsiderable support behind it, unleashing this amazing demo video:</p>

<iframe width="539" height="274" src="http://www.youtube.com/embed/7GgiVhTB_yA?rel=0" frameborder="0" allowfullscreen></iframe>

<p>…our jaws were dangling around our knees when I found that in my inbox!  We&#8217;ve since decided to work together &#8212; look out for the Dub Fx app some time next year!</p>

<p>That was the success story &#8212; our experience with The Cartographer was quite different, though. Katherine spent months upon months getting to know travel bloggers, interacting on their blogs and via various social media, hoping to make connections and get to introduce the app to some of them.</p>

<p>The good news is that we made some really good new friends out of the process, which makes it all worthwhile as far as I&#8217;m concerned.  But as a marketing strategy, it was a total bust. As it turns out, many travel bloggers seem to be  quite unresponsive &#8212; some of them, despite lots of friendly comments and other interactions, never even noticed us!  Some did, and kindly give us a mention on their blogs, but this didn&#8217;t seem to have any effect!</p>

<p>It turns out, as Katherine discovered in an industry report, the places that travellers (our target audience) go on the Internet: Not travel blogs!  Travellers visit airline sites, hotel websites, TripAdvisor and forums, Lonely Planet&#8217;s forums…all places that we have no hope of exerting any influence at all (those forums, by the way, are <em>militantly</em> moderated for anything that even loosely resembles product mentions).  So, we did the best we could, given the options, but it&#8217;s a really difficult market.</p>

<p>So, I suppose the lesson there is tread carefully, do your research, and spend the time strategically &#8212; be aware that the payoff might be huge, or it might be nil.  If we&#8217;d known in advance how poorly the months of work Katherine put into meeting travel bloggers would turn out, we might have invested less time in it.  We may have even decided to find an alternative target market.</p>

<h3>Reviewers</h3>

<p>There are a <em>lot</em> of app review sites out there, now. It&#8217;s just insane &#8212; it seems like every man, his dog, and several of his goldfish have app review blogs.  Back at the start, Katherine put in a huge number of hours and built us a spreadsheet of the most important reviewers.  With that done, whenever we do a release, she spends half a day (that&#8217;s how long it takes, or more!) emailing and filling out web forms of reviewers.</p>

<p>Most of them never respond, especially the big ones &#8212; they get such a barrage of review requests, it&#8217;s not hugely surprising.  Many blogs offer paid reviews, but we haven&#8217;t gone down that track yet, so, nothing to report there.  But many have responded, and every review helps, both for the social proof and word-of-mouth, and for the SEO.</p>

<p>Honestly, we haven&#8217;t yet collected hard stats about the proportion of reviewers who contact us in response to our initial contact, and how many are contacting us of their own accord.  Many of the significant reviews we&#8217;ve had have happened independently of us tracking down and contacting the reviewers in question, though.</p>

<p>So, we&#8217;re still undecided about whether the amount of time invested in telling reviewers about our products is really paying off.  I think we&#8217;ll always do it for initial releases, and possibly for major, major updates, though.</p>

<h3>Journalists</h3>

<p>This is something we want to do, but haven&#8217;t really pursued a whole lot &#8212; finding relevant journalists and contacting them directly.  We&#8217;ve found contacts for a few, but they always seem to be out-of-date and emails just bounce.</p>

<p>So, this seems like a good thing to do, but still TBD.</p>

<h3>Press releases</h3>

<p>Press releases seem to have two main benefits &#8212; they help with SEO, which helps users find your app &#8212; and they marginally increase the likelihood of getting picked up and getting some free media.</p>

<p>We&#8217;ve been doing regular monthly <a href="http://www.prweb.com/releases/2011/10/prweb8853583.htm">press releases</a> via PRWeb (a.k.a. Vocus) for a few months now, after previously only doing a big one (via PRWeb) for launch, and a couple smaller ones (via the much cheaper PRMac service) for updates.</p>

<p>Vocus talked us into signing up for a 12 month subscription (for a thousand-and-something $), which includes one release a month, and a representative who helps suggest topics, and checks over our drafts.  Our representative Rebecca has been great with both, and has been very responsive with answering our dumb questions along the way.</p>

<p>We&#8217;ve been <a href="http://www.sfgate.com/cgi-bin/article.cgi?f=/g/a/2011/10/06/prweb8853583.DTL">pseudo-picked up</a> by a few nice sites like the San Francisco Chronicle, although it&#8217;s automated and I don&#8217;t know how much of a direct difference it actually makes.  At the moment, loopyapp.com&#8217;s page rank is at 4, which is not bad at all, some of which is presumably thanks to our releases, and we seem to rank fairly well with most of the google searches we want to be associated with.  An interesting side note is that quite a lot of our referred web traffic is coming straight from PRWeb, which surprised me.</p>

<p>As with a lot of these strategies, I can&#8217;t say for sure whether it&#8217;s been a huge success so far &#8212; it&#8217;s hard to determine the cause of a good page rank, for example &#8212; but my gut feeling is that it&#8217;s worthwhile; it makes sense.</p>

<h3>Social media</h3>

<p>I never &#8220;got&#8221; Facebook up until quite recently, but now I can&#8217;t get enough &#8212; after being a staunch Twitter user for quite a long time, I&#8217;ve discovered that Facebookers are amazingly engaged.  I remember hearing somewhere that one Facebook follower (…&#8221;like&#8221;-r?) is worth several Twitter followers, and that rings true. I have a great time hanging around on the <a href="http://facebook.com/ATastyPixel">A Tasty Pixel Facebook page</a> and interacting with people there, as opposed to Twitter, which is sometimes a little bit like shouting into a black hole.</p>

<p>Google+? I have no bleeding idea. Anyone?</p>

<p>Anyway, it&#8217;s important to engage with your customers on both, but particularly Facebook, and there&#8217;s lots of scope for interesting interactions with customers.  For example, I&#8217;m about to start building effects into Loopy, and I was curious about what people most wanted to see.  So, I created a <a href="http://www.facebook.com/home.php?sk=question&amp;id=219136051461469&amp;qa_ref=qd">poll</a> on the Facebook page, and got a great response (&#8220;More Cowbell&#8221; coming right up…).</p>

<p>I quite like being able to &#8220;be me&#8221; on Twitter and Facebook, to show what I&#8217;m up to, get feedback on stuff as I&#8217;m making it, and to respond straight away to people.  I get to present a personal face, instead of being A Company.</p>

<p>As Loopy is a music-creation app, it also hooks straight into SoundCloud, and has a very active <a href="http://soundcloud.com/groups/loopyapp">SoundCloud group</a> which I find myself trawling every morning &#8212; a great entertainment.  One of the unexpected benefits is that I&#8217;ve met quite a few talented and lovely people though SoundCloud, some of whom have gone on to become testers and advisors, and help shape Loopy.</p>

<h3>Customer support</h3>

<p>While this isn&#8217;t promotion-related, I&#8217;ve been in the position (being a one-person dev company) to interact with customers directly, and I make a point of responding almost immediately when possible, and doing my best to address problems straight away. On a couple of occasions, the customer&#8217;s helped me identify a time-sensitive issue &#8212; they&#8217;re using The Cartographer and are about to go away on holiday &#8212; and I&#8217;ve had a fixed ad-hoc build out to them within a couple of hours, which has been very satisfying on both sides!</p>

<p>Customers love the straight-to-developer contact and the fast replies, and quite a few people have gone on to become very vocal supporters, which has been great. A very positive support experience goes a long way towards building goodwill, and I think it&#8217;s super-important. It also feels really satisfying, so in my option, there&#8217;s no reason not to go all-out!</p>

<h3>Expertise</h3>

<p><a href="http://www.fourhourworkweek.com/">Tim Ferriss</a> encourages product creators to position themselves as authorities in the area targeted by the product, to give the product more clout and attract more attention.  The idea is, if your app is targeted at a particular area, and you have experience in that area, then write: write on your own blog, and seek out others to do guest posts on (make sure it links back to you!).</p>

<p>We&#8217;re spending a few years travelling in a motorhome around Europe as we set up A Tasty Pixel and Katherine&#8217;s art business, and The Cartographer was built as a result of our experiences travelling.  So, (I say &#8220;so&#8221;, but actually we were already blogging as a journal for ourselves &#8212; but let us conveniently ignore that fact) we keep a <a href="http://technomadics.net">travel blog</a>, which brings in some traffic.  But not much &#8212; honestly, this is a terrible example, and we&#8217;ve had very few results, possibly because of the nature (and diminutive size!) of our audience.  Were we to focus on promoting our blog more and making it less &#8220;this-is-what-we-did&#8221; and more &#8220;this-is-what-you-can-do&#8221;, we might see more response, but our priorities lie decidedly elsewhere &#8212; traditional travel blogging: not our bag, baby.</p>

<p>But, I know this can work &#8212; I know it&#8217;s an extreme example, but look at <a href="http://www.stuckincustoms.com/">Trey Ratcliff</a>, the HDR photography authority, and his app <a href="http://www.100camerasin1.com/">100 Cameras In 1</a>. They got onto CNN, ferchrissake, and pretty much every other media outlet you can imagine!</p>

<h3>Paid advertising</h3>

<p>This is the next frontier, for us, and I&#8217;m fairly excited about it.  Everything I&#8217;ve mentioned up to this point has been about &#8220;free media&#8221;, but advertising is a whole new category to explore.</p>

<p>With that said, I&#8217;ve had two initial forays into ads: Facebook, and AdMob, and both have been total failures.</p>

<p><img style="display:block; margin-left:auto; margin-right:auto;" class="aligncenter" src="http://atastypixel.com/blog/wp-content/uploads/2011/10/Screen-Shot-2011-10-07-at-16.55.38.png" alt="Facebook ads" title="Screen Shot 2011-10-07 at 16.55.38.png" border="0" width="540" height="141" /></p>

<p>To an advertiser, Facebook is like a giant damn candy shop. (I felt really weird when I read <a href="http://www.geekculture.com/joyoftech/joyarchives/1594.html">this recent Joy of Tech</a>, and found myself drooling a little bit by the fifth panel…).  The kind of targeting options available are just a-mazing &#8212; you can target people from their age, gender and location, right down to their areas of interest (which is insanely cool), and even down to targeting users who like one particular competitor&#8217;s product.</p>

<p>Despite the cool factor, it turned out to be pretty much a total bust for attempt 1 &#8212; we were paying a stupid amount per click, compared to the actual amount we would earn per sale.  We spent $75, and got…45 clicks.  That&#8217;s $1.60 per click, which represents about 75% of our actual take per sale, and it&#8217;s very unlikely even 10% of those clicks resulted in a sale.</p>

<p>At the time, I was choosing to bid per thousand clicks (CPM), instead of per click (CPC), but the reason I chose to was that the recommended CPC was well above what I was prepared to spend.</p>

<p><img src="http://atastypixel.com/blog/wp-content/uploads/2011/10/Screen-Shot-2011-10-07-at-17.03.36.png" alt="AdMob summary" title="AdMob summary" border="0" width="147" height="300" style="float:right; margin-left: 20px;" class="alignright" />The lesson there is that Facebook users aren&#8217;t ready to buy straight away. A friend who works in advertising reported good results marketing the <em>Facebook page</em> instead of the product, so that users who are interested can hang around for a while, get to know you, and then you can market to them later.  I&#8217;ll try this soon, and I&#8217;m hoping that the mechanics of a social ad (with a &#8220;Like&#8221; button on the ad, instead of a click to navigate away from the current page) will result in higher (and cheaper!) conversions.</p>

<p>I found similar results with AdMob &#8212; we got a much, much better cost per click (I was playing with the minimum bid of 29c per click), but even at 29c/click, in order to break even for our $2.99 app, 1 in 7 people who click the ad would have to buy it, which I think is far-fetched.</p>

<p>So, as far as direct advertising goes: As someone who earns just over $2 per sale, we just can&#8217;t afford it!  My next experiment: Trying to use Facebook to increase our social reach, instead.</p>

<h3>Summary</h3>

<p>It&#8217;s become abundantly clear to us that app promotion is a job in itself, and it&#8217;s one that can scale right up to the amount of time you have available.  They key is to be constantly creative, and to be out there, all the time, chipping away.</p>

<p>Almost everything&#8217;s a shot in the dark, and while many strategies may yield no results at all, some might be a big break (like meeting Dub Fx, for us), so it&#8217;s important to just keep on trying.</p>

<p>Apple give you absolutely no help in tracking the success of any particular strategy, unfortunately, although there are <a href="http://atastypixel.com/blog/automatically-track-app-sale-referrals/">tricks you can use</a> to help track where some of your sales are coming from.</p>

<p>The PR thing is just as important as actually creating the app; it&#8217;s hard, and it&#8217;s constant, and it means that running a software development company is anything but a &#8220;passive income&#8221;.  Fortunately for me, I love it to bits!</p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2327" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/experiences-with-some-app-promotion-strategies/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Loopy HD is here!</title>
		<link>http://atastypixel.com/blog/loopy-hd-is-here/</link>
		<comments>http://atastypixel.com/blog/loopy-hd-is-here/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 23:00:47 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Products]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Loopy HD]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/?p=2314</guid>
		<description><![CDATA[I’m very pleased to announce that Loopy HD has arrived! A Tasty Pixel HQ has been a-buzz with activity these last few months, and we have a solid iPad live looper with top-notch features to show for it. Loopy HD takes Loopy, doubles the number of tracks to fill up that big iPad display (6, [...]]]></description>
			<content:encoded><![CDATA[<p><img style="display:block; margin-left:auto; margin-right:auto; margin-bottom: 50px;" class="aligncenter" src="http://atastypixel.com/blog/wp-content/uploads/2011/10/loopy-hd-screens.jpg" alt="Loopy HD is here!" title="loopy-hd-screens.jpg" border="0" width="540" height="354" /></p>

<p><img src="http://atastypixel.com/blog/wp-content/uploads/2011/10/loopy-hd-inset1.jpg" alt="Loopy hd inset1" title="loopy-hd-inset1.jpg" border="0" width="194" height="165" style="float:right; margin-left: 30px; margin-bottom: 30px;" class="alignright" />I’m very pleased to announce that <a href="http://loopyapp.com">Loopy HD</a> has arrived! A Tasty Pixel HQ has been a-buzz with activity these last few months, and we have a solid iPad live looper with top-notch features to show for it.</p>

<p>Loopy HD takes Loopy, doubles the number of tracks to fill up that big iPad display (6, 9 or 12 tracks), adds a beautiful big control panel with more session controls, and brings an even more polished audio engine and spot-on time accuracy.</p>

<p>We&#8217;ve got huge plans for this app and it&#8217;s just going to keep getting better. Right around the corner is MIDI support, so you can control the app with a pedal, and sync the tempo with other devices and other apps, over the network or even on the same device. Fun!</p>

<p><a href="http://loopyapp.com/download-hd"><img style="display:block; margin-left:auto; margin-right:auto; margin-top: 40px; margin-bottom: 40px" class="aligncenter" src="http://atastypixel.com/blog/wp-content/uploads/2011/10/app-store.jpg" alt="App store" title="app-store.jpg" border="0" width="137" height="50" /></a></p>

<p>If you already own Loopy, Loopy HD will be on sale for $3.99 for a few days, so you don&#8217;t have to pay full price. We&#8217;ll also be giving away some promo codes from our <a href="http://facebook.com/ATastyPixel">Facebook page</a>, so join us over there if you&#8217;re interested.</p>

<p>We&#8217;ve already given away some promo codes on our <a href="http://atastypixel.com/newsletter">newsletter</a>, but we do this from time to time, so subscribe if you&#8217;d like to nab one the next time.</p>

<p><a href="http://loopyapp.com/download">Loopy</a> has been updated too! Version 2.1 includes all of the improvements to the audio and timing engines from Loopy HD, as well as a smaller version of Loopy HD&#8217;s control panel. There&#8217;s a number of new features, as well, like count-in muting and unmuting, the ability to turn off track sync, and zip file support.</p>

<p>Thanks, Steve.</p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2314" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/loopy-hd-is-here/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Experiments with precise timing in iOS</title>
		<link>http://atastypixel.com/blog/experiments-with-precise-timing-in-ios/</link>
		<comments>http://atastypixel.com/blog/experiments-with-precise-timing-in-ios/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 16:31:18 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Geekspeak]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Timing]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/?p=2265</guid>
		<description><![CDATA[iOS is by no means a realtime operating system, but I&#8217;m aware that NSTimer and NSObject&#8217;s performSelector:withObject:afterDelay: mechanism aren&#8217;t particularly accurate, and I was curious to see whether I could do better. Hands up, backing away Disclaimer: I am not at all an expert in realtime programming, or Mach, or iOS-device optimisation, so this is [...]]]></description>
			<content:encoded><![CDATA[<p>iOS is by no means a realtime operating system, but I&#8217;m aware that NSTimer and NSObject&#8217;s <em>performSelector:withObject:afterDelay:</em> mechanism aren&#8217;t particularly accurate, and I was curious to see whether I could do better.</p>

<h3>Hands up, backing away</h3>

<p>Disclaimer: I am not at all an expert in realtime programming, or Mach, or iOS-device optimisation, so this is pretty much a fumble in the dark.   I won&#8217;t be at all offended if anyone wishes to shoot me down and offer a more sensible solution &#8212; in fact, please do! Until then, watch as I stumble on…</p>

<p>Also note that there are often ways to eliminate the need for precise timing of this nature, by architecting code appropriately &#8212; when it comes to audio, for example, CoreAudio provides a very accurate time base in render callbacks.  For things like metronomes or audio synthesizers, it&#8217;s always better to establish a starting time, and use the difference between the current time and the starting time in order to determine state, rather than using a timer to advance the state.  Still, sometimes, you just need a timer…</p>

<h3>What the blazes?</h3>

<p>So, I&#8217;m working on an update to <a href="http://loopyapp.com">Loopy</a>, which uses a shared clock object to synchronise tracks and a variety of events (like user interface updates or timed track manipulations).  A tester noted that the mute/unmute quantisation feature that I&#8217;ve recently implemented, which will mute or unmute a loop at its starting point (rather than whenever you tap it), tends to overshoot a little, resulting in a small part of the beginning of the loop being audible.</p>

<p>Of course, there are other solutions to this particular problem (like stopping or starting playback from the audio render callback, and using Core Audio&#8217;s timestamps for exact timing), but I use timers in other places outside Core Audio&#8217;s domain, which makes Core Audio&#8217;s timing mechanism unavailable, and I wanted to see how accurate I could get the timing.</p>

<h3>Our friend, <em>mach_wait_until</em></h3>

<p>I read in several places mention of the Mach API utility <em>mach_wait_until</em> (from <em>mach/mach_time.h</em>), which is very low-level and supposedly fairly accurate.  So, based on that lead, I put together an Objective-C singleton class that launches a high-priority thread, and uses said thread to schedule events.</p>

<p>An NSArray of events are maintained, and a <em>scheduleAction:target:inTimeInterval:</em> routine creates and adds events to this array, then pokes the thread.</p>

<p>The thread grabs the next event in sequence, then uses <em>mach_wait_until</em> to sleep until the time of the next event arrives, then performs the specified action on the target.  It&#8217;s kinda a DIY NSRunLoop.</p>

<p>Here&#8217;s a comparison between this technique, and just using <em>performSelector:withObject:afterDelay:</em> (which schedules a timer on the NSRunLoop), observed while performing various scheduled events within Loopy running on my iPhone 4 with the debugger, and derived by comparing the time of event execution with the event&#8217;s scheduled time:</p>

<table>
<tr><th>Mechanism</th><th>Average discrepancy</th><th>Minimum discrepancy</th><th>Maximum discrepancy</th></tr>
<tr><td><strong>NSRunLoop</strong></td><td>16.9ms</td><td>0.25ms</td><td>153.7ms</td></tr>
<tr><td><strong>TPPreciseTimer</strong></td><td>5.5ms</td><td>0.033ms</td><td>72.0ms</td></tr>
</table>

<p>That was attempt number 1: This seems to give us about 11.4ms better accuracy on average (three times more accurate).</p>

<p>Not bad, but it turns out <em>mach_wait_until</em> isn&#8217;t really that accurate, particularly if there&#8217;s a bunch of other stuff going on in other threads.</p>

<h3>Spinning, for fun and profit</h3>

<p>For my second attempt, the thread performs a <em>mach_wait_until</em> until just before the event is due, then performs a spin lock until the time arrives, using <em>mach_absolute_time</em> to compare the current time with the target time.</p>

<p>This gave further improved results &#8212; here&#8217;s that table again, but with the new scheme added, with a few different spin lock times:</p>

<table>
<tr><th>Mechanism</th><th>Average discrepancy</th><th>Minimum discrepancy</th><th>Maximum discrepancy</th></tr>
<tr><td><strong>NSRunLoop</strong></td><td>16.9ms</td><td>0.25ms</td><td>153.7ms</td></tr>
<tr><td><strong>TPPreciseTimer (original)</strong></td><td>5.5ms</td><td>0.033ms</td><td>72.0ms</td></tr>
<tr><td><strong>TPPreciseTimer (10ms spinlock)</strong></td><td>6.0ms</td><td>0.002ms</td><td>76.5ms</td></tr>
<tr><td><strong>TPPreciseTimer (100ms spinlock)</strong></td><td>3.7ms</td><td>0.002ms</td><td>44.8ms</td></tr>
<tr><td><strong>TPPreciseTimer (200ms spinlock)</strong></td><td>2.91ms</td><td>0.002ms</td><td>74.1ms</td></tr>
</table>

<p>It appears that the more stuff there is going on in other threads, the more likely the <em>mach_absolute_time</em> call is to overshoot.  So, the more time spent in the spin lock, the more leeway <em>mach_absolute_time</em> has to wait too long.  Of course, that&#8217;s at the cost of making the CPU twiddle its thumbs for the duration.</p>

<h3>Better than a punch in the knee</h3>

<p>The results weren&#8217;t quite as fantastic as I&#8217;d hoped &#8212; still within the same order of magnitude, that&#8217;s for sure &#8212; but the average case for the 200ms spinlock approach is 14ms, or 5.8 times, more accurate than the traditional approach, and the minimum case is dramatically better.</p>

<p>You know, I think if I was aware of the results in advance, I might not bother, but I&#8217;ll stick with my hard-won 14ms now that I&#8217;m here (that&#8217;s 617 audio samples, I&#8217;ll have you know).</p>

<p>If anyone&#8217;s curious about the implementation (or wants to take a stab at doing better), here it is, along with a wildly simplistic commandline test app: <a href="http://atastypixel.com/blog/wp-content/uploads/2011/09/TPPreciseTimer.zip" title="TPPreciseTimer.zip" alt="TPPreciseTimer">TPPreciseTimer.zip</a></p>

<p>Now to get back to some real work.</p>

<h3>Addendum: GCD follow-up</h3>

<p>Chris in the comments below suggested trying a GCD-based approach, using <em>dispatch_after</em>.  Curious, I rigged it up, and these are the stats, collected the same way as above, added to the prior table:</p>

<table>
<tr><th>Mechanism</th><th>Average discrepancy</th><th>Minimum discrepancy</th><th>Maximum discrepancy</th></tr>
<tr><td><strong>NSRunLoop</strong></td><td>16.9ms</td><td>0.25ms</td><td>153.7ms</td></tr>
<tr><td><strong>TPPreciseTimer (original)</strong></td><td>5.5ms</td><td>0.033ms</td><td>72.0ms</td></tr>
<tr><td><strong>TPPreciseTimer (10ms spinlock)</strong></td><td>6.0ms</td><td>0.002ms</td><td>76.5ms</td></tr>
<tr><td><strong>TPPreciseTimer (100ms spinlock)</strong></td><td>3.7ms</td><td>0.002ms</td><td>44.8ms</td></tr>
<tr><td><strong>TPPreciseTimer (200ms spinlock)</strong></td><td>2.91ms</td><td>0.002ms</td><td>74.1ms</td></tr>
<tr><td><strong>dispatch_after (main queue)</strong></td><td>14.8ms</td><td>0.16ms</td><td>161.2ms</td></tr>
<tr><td><strong>dispatch_after (dedicated queue)</strong></td><td>19.2ms</td><td>0.1ms</td><td>174.9ms</td></tr>
<tr><td><strong>dispatch_after (dedicated queue + 100ms spinlock)</strong></td><td>22.4ms</td><td>0.002ms</td><td>306.8ms</td></tr>
</table>

<p>So, they appear pretty much the same as the NSRunLoop stats.</p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2265" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/experiments-with-precise-timing-in-ios/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>99¢ Sale</title>
		<link>http://atastypixel.com/blog/99%c2%a2-sale/</link>
		<comments>http://atastypixel.com/blog/99%c2%a2-sale/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 07:10:42 +0000</pubDate>
		<dc:creator>katherine</dc:creator>
				<category><![CDATA[Products]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[The Cartographer]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/?p=2258</guid>
		<description><![CDATA[The Cartographer is on sale for a limited time for 75% off its regular price. 99¢ is all it takes to travel the world with personalized, annotated, customized Google maps! Go forth and be frugally itinerant!]]></description>
			<content:encoded><![CDATA[<p><img style="display:block; margin-left:auto; margin-right:auto;" src="http://atastypixel.com/blog/wp-content/uploads/2011/08/The-Cartographer-iPhone-App_Trio.jpg" alt="The Cartographer iPhone App Google Maps" title="The Cartographer iPhone App_Trio.jpg" border="0" width="472" height="500" class="aligncenter" />
<a href="http://itunes.apple.com/app/the-cartographer/id393312081?mt=8">The Cartographer</a> is on sale for a limited time for 75% off its regular price. 99¢ is all it takes to travel the world with personalized, annotated, customized Google maps! Go forth and be frugally itinerant!</p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2258" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/99%c2%a2-sale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seamlessly manage portrait and landscape view controller layouts</title>
		<link>http://atastypixel.com/blog/seamlessly-manage-portrait-and-landscape-view-controller-layouts/</link>
		<comments>http://atastypixel.com/blog/seamlessly-manage-portrait-and-landscape-view-controller-layouts/#comments</comments>
		<pubDate>Sun, 14 Aug 2011 17:43:34 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Geekspeak]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Interface]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Utility]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/?p=2239</guid>
		<description><![CDATA[A headache-inducing scenario: I&#8217;m working on a view controller, and I realise that in order to support landscape and portrait modes, I&#8217;m going to need to provide two different layouts. So, I create two different views within the nib, one portrait, one landscape, each with the same view hierarchy, but with a different layout. When [...]]]></description>
			<content:encoded><![CDATA[<p>A headache-inducing scenario: I&#8217;m working on a view controller, and I realise that in order to support landscape and portrait modes, I&#8217;m going to need to provide two different layouts.</p>

<p>So, I create two different views within the nib, one portrait, one landscape, each with the same view hierarchy, but with a different layout.</p>

<p>When the orientation changes, I set <code>self.view</code> to the appropriate view.  I initialise both views on load, and keep both of them synced to properly reflect the app&#8217;s state &#8212; basically, <strong>I&#8217;m double-handling everything</strong>, which bloats my code and increases the chance I&#8217;ll make a mistake.</p>

<p>So, here&#8217;s an easier way: Rather than maintaining two separate view hierarchies and switching between them when the orientation changes, why not just change the layout of one single view hierarchy?  The only changes between the portrait and landscape views are layout changes, so if we can extract just the layout information from each view, then we don&#8217;t have to worry about maintaining both view hierarchies.</p>

<p>Basically, we&#8217;re talking about using each view version as a <strong>layout template</strong> only.</p>

<p>That&#8217;s what <a href="https://github.com/michaeltyson/TPMultiLayoutViewController">TPMultiLayoutViewController</a> class does.  It&#8217;s a drop-in UIViewController subclass that automatically manages switching between different view layouts for portrait and landscape orientations, without the need to maintain view state across two different view hierarchies.</p>

<p>It works by defining <code>portraitView</code> and <code>landscapeView</code> outlets which it traverses upon loading the nib.  It matches each subview element to its counterpart in the other layout (based on tag, target/action, title, etc.), and stores just the layout attributes of each element.</p>

<p>Then, when the orientation changes, the view hierarchy is traversed and these layouts are applied to each subview.</p>

<p>To use it,</p>

<ol>
<li>Set the superclass for your view controller to <code>TPMultiLayoutViewController</code>.</li>
<li>In Interface Builder, create two different views: one for portrait orientation, and one for landscape orientation.</li>
<li>Attach your portrait orientation root view to the &#8220;portraitView&#8221; outlet, and the landscape orientation root view to the &#8220;landscapeView&#8221; outlet.</li>
<li>Attach one of the views (whichever you prefer) to the &#8220;view&#8221; outlet, and connect any actions and outlets from that view.</li>
</ol>

<p>Grab it from the <a href="https://github.com/michaeltyson/TPMultiLayoutViewController">TPMultiLayoutViewController GitHub repository</a>, and let me know what you think.</p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2239" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/seamlessly-manage-portrait-and-landscape-view-controller-layouts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Loopy 2.0.1 coming soon, with noise gate/expander, more</title>
		<link>http://atastypixel.com/blog/loopy-2-0-1-coming-soon-with-noise-gateexpander-more/</link>
		<comments>http://atastypixel.com/blog/loopy-2-0-1-coming-soon-with-noise-gateexpander-more/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 13:07:29 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Products]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Loopy]]></category>
		<category><![CDATA[Update]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/loopy-2-0-1-coming-soon-with-noise-gateexpander-more/</guid>
		<description><![CDATA[We just submitted Loopy 2.0.1 to the App Store! Update: It&#8217;s now available! The new version includes: Full-featured noise gate/expander, with auto-calibration Bigger panel and clock controls Document support: Import loops from Mail and other apps Play/pause button on main screen (great for breaks) Option to add track to Loopy&#8217;s SoundCloud group when publishing Many [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://atastypixel.com/blog/wp-content/uploads/2011/07/2-0-1.jpg" width="380" height="441" alt="Loopy 2.0.1 Screenshots" class="alignright" />
We just submitted Loopy 2.0.1 to the App Store!</p>

<p><em>Update: It&#8217;s <a href="http://itunes.apple.com/app/loopy/id300257824?mt=8">now available</a>!</em></p>

<p>The new version includes:</p>

<ul>
<li>Full-featured noise gate/expander, with auto-calibration</li>
<li>Bigger panel and clock controls</li>
<li>Document support: Import loops from Mail and other apps</li>
<li>Play/pause button on main screen (great for breaks)</li>
<li>Option to add track to Loopy&#8217;s SoundCloud group when publishing</li>
<li>Many more improvements and bug-fixes</li>
</ul>

<p>Expect it to land in a week or so.  Now, off to work on the next version..</p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2208" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/loopy-2-0-1-coming-soon-with-noise-gateexpander-more/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hey Just J reviews and demos Loopy</title>
		<link>http://atastypixel.com/blog/hey-just-j-reviews-and-demos-loopy/</link>
		<comments>http://atastypixel.com/blog/hey-just-j-reviews-and-demos-loopy/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 09:05:33 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Products]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Loopy]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/?p=2204</guid>
		<description><![CDATA[Here&#8217;s a review and great little demo of Loopy version 2 by looper Hey Just J:]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a review and great little demo of Loopy version 2 by looper Hey Just J:</p>

<iframe width="560" height="349" src="http://www.youtube.com/embed/_s-MQQg7OvA" frameborder="0" allowfullscreen></iframe>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2204" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/hey-just-j-reviews-and-demos-loopy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dub FX and Loopy 2</title>
		<link>http://atastypixel.com/blog/dub-fx-and-loopy-2/</link>
		<comments>http://atastypixel.com/blog/dub-fx-and-loopy-2/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 10:59:55 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Products]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Loopy]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/dub-fx-and-loopy-2/</guid>
		<description><![CDATA[Check it out:]]></description>
			<content:encoded><![CDATA[<p>Check it out:</p>

<iframe width="560" height="349" src="http://www.youtube.com/embed/7GgiVhTB_yA" frameborder="0" allowfullscreen></iframe>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2203" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/dub-fx-and-loopy-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improvements coming to Loopy 2.0.1</title>
		<link>http://atastypixel.com/blog/improvements-coming-to-loopy-2-0-1/</link>
		<comments>http://atastypixel.com/blog/improvements-coming-to-loopy-2-0-1/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 10:41:53 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Products]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Loopy]]></category>
		<category><![CDATA[Update]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/?p=2201</guid>
		<description><![CDATA[I&#8217;m hard at work on Loopy 2.0.1, which will include a few improvements: A much bigger bottom display, with paged clock manipulation controls for easier access to the most-used functions A play/restart button on the main loops screen Clearer distinction between muted and unmuted tracks The option to automatically begin overdubbing after first record Import [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://atastypixel.com/blog/wp-content/uploads/2011/07/loopy-improvements.jpg" width="388" height="400" alt="Loopy 2.0.1 improvements" class="alignright" />I&#8217;m hard at work on Loopy 2.0.1, which will include a few improvements:</p>

<ul>
<li>A much bigger bottom display, with paged clock manipulation controls for easier access to the most-used functions</li>
<li>A play/restart button on the main loops screen</li>
<li>Clearer distinction between muted and unmuted tracks</li>
<li>The option to automatically begin overdubbing after first record</li>
<li>Import loops from Mail and other applications straight into a Loopy 2 session</li>
<li>Single sign-on for SoundCloud, including Facebook link support</li>
</ul>

<p>Look out for it soon.</p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2201" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/improvements-coming-to-loopy-2-0-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loopy 2 launch &#8211; now with real fruit pieces</title>
		<link>http://atastypixel.com/blog/loopy-2-launch-now-with-real-fruit-pieces/</link>
		<comments>http://atastypixel.com/blog/loopy-2-launch-now-with-real-fruit-pieces/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 10:59:44 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Products]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Loopy]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/loopy-2-launch-now-with-real-fruit-pieces/</guid>
		<description><![CDATA[I&#8217;m very pleased to announce the launch of our new app, Loopy 2! It&#8217;s a pretty, easy-to-use but feature-packed looper for making music by layering looped recordings of singing, beatboxing or playing an instrument (or banging cutlery together). It&#8217;s currently on sale for launch, so take a look! We&#8217;re very proud of it.]]></description>
			<content:encoded><![CDATA[<p><a href="http://loopyapp.com"><img src="http://atastypixel.com/products/loopy/press/screenshots/Screens.jpg" width="400" height="410" alt="Loopy 2" class="alignright" /></a>
I&#8217;m very pleased to announce the launch of our new app, <a href="http://loopyapp.com">Loopy 2</a>! It&#8217;s a pretty, easy-to-use but feature-packed looper for making music by layering looped recordings of singing, beatboxing or playing an instrument (or banging cutlery together).</p>

<p>It&#8217;s currently on sale for launch, so take a look! We&#8217;re very proud of it.</p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2197" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/loopy-2-launch-now-with-real-fruit-pieces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Cartographer 1.4, Now With Routes and Shapes</title>
		<link>http://atastypixel.com/blog/the-cartographer-1-4-now-with-routes-and-shapes/</link>
		<comments>http://atastypixel.com/blog/the-cartographer-1-4-now-with-routes-and-shapes/#comments</comments>
		<pubDate>Thu, 12 May 2011 11:42:57 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Products]]></category>
		<category><![CDATA[Cartographer]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[Update]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/the-cartographer-1-4-now-with-routes-and-shapes/</guid>
		<description><![CDATA[I&#8217;m very happy to announce The Cartographer version 1.4! This version brings new features from Google Maps to the iPhone: Routes and shapes. Now you can plot hiking routes, cycle paths or road trips on your computer using Google Maps, then sync them to your iPhone and take them with you. Combined with The Cartographer&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://atastypixel.com/blog/wp-content/uploads/2011/05/cartographer-1.4.jpg" width="202" height="450" alt="The Cartographer version 1.4, now with routes and shapes" class="alignright" />I&#8217;m very happy to announce The Cartographer version 1.4!</p>

<p>This version brings new features from Google Maps to the iPhone: Routes and shapes.  Now you can plot hiking routes, cycle paths or road trips on your computer using Google Maps, then sync them to your iPhone and take them with you.</p>

<p>Combined with The Cartographer&#8217;s existing offline mapping features, we think this is a really exciting feature for outdoorsy types and travellers.</p>

<p>So, we hope you enjoy 1.4!  It&#8217;s available right now from the <a href="http://itunes.apple.com/app/the-cartographer/id393312081?mt=8">App Store</a>.</p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2195" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/the-cartographer-1-4-now-with-routes-and-shapes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A drop-in universal solution for moving text fields out of the way of the keyboard</title>
		<link>http://atastypixel.com/blog/a-drop-in-universal-solution-for-moving-text-fields-out-of-the-way-of-the-keyboard/</link>
		<comments>http://atastypixel.com/blog/a-drop-in-universal-solution-for-moving-text-fields-out-of-the-way-of-the-keyboard/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 11:26:21 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Geekspeak]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Interface]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/a-drop-in-universal-solution-for-moving-text-fields-out-of-the-way-of-the-keyboard/</guid>
		<description><![CDATA[There are a hundred and one proposed solutions out there for how to move UITextField and UITextView out of the way of the keyboard during editing &#8212; usually, it comes down to observing UIKeyboardWillShowNotification and UIKeyboardWillHideNotification, or implementing UITextFieldDelegate delegate methods, and adjusting the frame of the superview, or using UITableView&#8216;s scrollToRowAtIndexPath:atScrollPosition:animated:, but all the [...]]]></description>
			<content:encoded><![CDATA[<p>There are a hundred and one proposed solutions out there for how to move <code>UITextField</code> and <code>UITextView</code> out of the way of the keyboard during editing &#8212; usually, it comes down to observing <code>UIKeyboardWillShowNotification</code> and <code>UIKeyboardWillHideNotification</code>, or implementing <code>UITextFieldDelegate</code> delegate methods, and adjusting the frame of the superview, or using <code>UITableView</code>&#8216;s <code>scrollToRowAtIndexPath:atScrollPosition:animated:</code>, but all the proposed solutions I&#8217;ve found tend to be quite DIY, and have to be implemented for each view controller that needs it.</p>

<p>I thought I&#8217;d put together a relatively universal, drop-in solution: <code>UIScrollView</code> and <code>UITableView</code> subclasses that handle everything.</p>

<p>When the keyboard is about to appear, the subclass will find the subview that&#8217;s about to be edited, and adjust its frame and content offset to make sure that view is visible, with an animation to match the keyboard pop-up. When the keyboard disappears, it restores its prior size.</p>

<p>It should work with basically any setup, either a UITableView-based interface, or one consisting of views placed manually.</p>

<p></p>

<p><span id="more-2185"></span><img src="http://atastypixel.com/blog/wp-content/uploads/2011/04/201104121152.jpg" width="270" height="234" alt="201104121152.jpg" class="alignright" />For non-UITableViewControllers, use it as-is by dropping the <code>TPKeyboardAvoidingScrollView</code> source files into your project, popping a <code>UIScrollView</code> into your view controller&#8217;s xib, setting the class to <code>TPKeyboardAvoidingScrollView</code>, and putting all your controls within that scroll view.</p>

<p>To use it with UITableViewController, pop the <code>TPKeyboardAvoidingTableView</code> source files in, and just make your UITableView a <code>TPKeyboardAvoidingTableView</code> in the xib &#8212; everything should be taken care of.</p>

<p>You can grab the source files, which includes a sample project, over on the <a href="https://github.com/michaeltyson/TPKeyboardAvoiding">GitHub project page</a></p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2185" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/a-drop-in-universal-solution-for-moving-text-fields-out-of-the-way-of-the-keyboard/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>Easy AAC compressed audio conversion on iOS</title>
		<link>http://atastypixel.com/blog/easy-aac-compressed-audio-conversion-on-ios/</link>
		<comments>http://atastypixel.com/blog/easy-aac-compressed-audio-conversion-on-ios/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 22:55:33 +0000</pubDate>
		<dc:creator>Michael Tyson</dc:creator>
				<category><![CDATA[Geekspeak]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://atastypixel.com/blog/?p=2176</guid>
		<description><![CDATA[From the iPhone 3Gs up, it&#8217;s possible to encode compressed AAC audio from PCM audio data. That means great things for apps that deal with audio sharing and transmission, as the audio can be sent in compressed form, rather than sending huge PCM audio files over the network. Apple&#8217;s produced some sample code (iPhoneExtAudioFileConvertTest), which [...]]]></description>
			<content:encoded><![CDATA[<p>From the iPhone 3Gs up, it&#8217;s possible to encode compressed AAC audio from PCM audio data.  That means great things for apps that deal with audio sharing and transmission, as the audio can be sent in compressed form, rather than sending huge PCM audio files over the network.</p>

<p>Apple&#8217;s produced some <a href="http://developer.apple.com/library/ios/samplecode/iPhoneExtAudioFileConvertTest/Introduction/Intro.html">sample code (iPhoneExtAudioFileConvertTest)</a>, which demonstrates how it&#8217;s done, but their implementation isn&#8217;t particularly easy to use in existing projects, as it requires some wrapping to make it play nice.</p>

<p>For my upcoming looper app <a href="http://loopyapp.com">Loopy</a>, I&#8217;ve put together a simple Objective-C class that performs the conversion of any audio file to an AAC-encoded m4a, asynchronously with a delegate, or converts any audio provided by a data source class (which provides for recording straight to AAC) and I thought I&#8217;d share it.<span id="more-2176"></span></p>

<p></p>

<p>Grab the code, and a sample project demonstrating its use at the <a href="https://github.com/michaeltyson/TPAACAudioConverter">GitHub repository for TPAACAudioConverter</a>.</p>

<p>To use it:</p>

<ul>
<li>Include the class in your project, and make sure you&#8217;ve got the <em>AudioToolbox</em> framework added, too.</li>
<li>Audio session setup: </li>
</ul>

<p>If you already have an audio session set up in your app, make sure you disable mixing with other device audio for the duration of the copy operation, as this stops the hardware encoder from working (you&#8217;ll see funny errors like <code>kAudioQueueErr_InvalidCodecAccess</code> (Error 66672)).  I know that <code>AVAudioSessionCategoryPlayAndRecord</code>, <code>AVAudioSessionCategorySoloAmbient</code> and <code>AVAudioSessionCategoryAudioProcessing</code> work for sure.  <code>TPAACAudioConverter</code> will automatically disable <code>kAudioSessionProperty_OverrideCategoryMixWithOthers</code>, if it&#8217;s set.</p>

<p>If you&#8217;re not already setting up an audio session, you could do so just before you start the conversion process.</p>

<p>You&#8217;ll need to provide an interruption handler to be notified of audio session interruptions, which impact the encoding process.  You&#8217;ll also need to create a member variable to store the converter instance, so you can tell it when interruptions begin and end (via <code>interrupt</code> and <code>resume</code>).</p>


<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">// Callback to be notified of audio session interruptions (which have an impact on the conversion process)</span>
<span style="color: #a61390;">static</span> <span style="color: #a61390;">void</span> interruptionListener<span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span> <span style="color: #002200;">*</span>inClientData, UInt32 inInterruption<span style="color: #002200;">&#41;</span>
<span style="color: #002200;">&#123;</span>
	AACConverterViewController <span style="color: #002200;">*</span>THIS <span style="color: #002200;">=</span> <span style="color: #002200;">&#40;</span>AACConverterViewController <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>inClientData;
&nbsp;
	<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>inInterruption <span style="color: #002200;">==</span> kAudioSessionEndInterruption<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
		<span style="color: #11740a; font-style: italic;">// make sure we are again the active session</span>
		checkResult<span style="color: #002200;">&#40;</span>AudioSessionSetActive<span style="color: #002200;">&#40;</span><span style="color: #a61390;">true</span><span style="color: #002200;">&#41;</span>, <span style="color: #bf1d1a;">&quot;resume audio session&quot;</span><span style="color: #002200;">&#41;</span>;
        <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> THIS<span style="color: #002200;">-</span>&gt;audioConverter <span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#91;</span>THIS<span style="color: #002200;">-</span>&gt;audioConverter resume<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#125;</span>
&nbsp;
	<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>inInterruption <span style="color: #002200;">==</span> kAudioSessionBeginInterruption<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
        <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> THIS<span style="color: #002200;">-</span>&gt;audioConverter <span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#91;</span>THIS<span style="color: #002200;">-</span>&gt;audioConverter interrupt<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">/*snip*/</span>
&nbsp;
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>startConverting <span style="color: #002200;">&#123;</span>
&nbsp;
    <span style="color: #11740a; font-style: italic;">/*snip*/</span>
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Initialise audio session, and register an interruption listener, important for AAC conversion</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> <span style="color: #002200;">!</span>checkResult<span style="color: #002200;">&#40;</span>AudioSessionInitialize<span style="color: #002200;">&#40;</span><span style="color: #a61390;">NULL</span>, <span style="color: #a61390;">NULL</span>, interruptionListener, self<span style="color: #002200;">&#41;</span>, <span style="color: #bf1d1a;">&quot;initialise audio session&quot;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
        <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIAlertView alloc<span style="color: #002200;">&#93;</span> initWithTitle<span style="color: #002200;">:</span>NSLocalizedString<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Converting audio&quot;</span>, <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;&quot;</span><span style="color: #002200;">&#41;</span>
                                     message<span style="color: #002200;">:</span>NSLocalizedString<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Couldn't initialise audio session!&quot;</span>, <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;&quot;</span><span style="color: #002200;">&#41;</span>
                                    delegate<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span>
                           cancelButtonTitle<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span>
                           otherButtonTitles<span style="color: #002200;">:</span>NSLocalizedString<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;OK&quot;</span>, <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;&quot;</span><span style="color: #002200;">&#41;</span>, <span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span> show<span style="color: #002200;">&#93;</span>;
        <span style="color: #a61390;">return</span>;
    <span style="color: #002200;">&#125;</span>
&nbsp;
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Set up an audio session compatible with AAC conversion.  Note that AAC conversion is incompatible with any session that provides mixing with other device audio.</span>
    UInt32 audioCategory <span style="color: #002200;">=</span> kAudioSessionCategory_MediaPlayback;
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span> <span style="color: #002200;">!</span>checkResult<span style="color: #002200;">&#40;</span>AudioSessionSetProperty<span style="color: #002200;">&#40;</span>kAudioSessionProperty_AudioCategory, <span style="color: #a61390;">sizeof</span><span style="color: #002200;">&#40;</span>audioCategory<span style="color: #002200;">&#41;</span>, <span style="color: #002200;">&amp;</span>audioCategory<span style="color: #002200;">&#41;</span>, <span style="color: #bf1d1a;">&quot;setup session category&quot;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
        <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIAlertView alloc<span style="color: #002200;">&#93;</span> initWithTitle<span style="color: #002200;">:</span>NSLocalizedString<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Converting audio&quot;</span>, <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;&quot;</span><span style="color: #002200;">&#41;</span>
                                     message<span style="color: #002200;">:</span>NSLocalizedString<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Couldn't setup audio category!&quot;</span>, <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;&quot;</span><span style="color: #002200;">&#41;</span>
                                    delegate<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span>
                           cancelButtonTitle<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span>
                           otherButtonTitles<span style="color: #002200;">:</span>NSLocalizedString<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;OK&quot;</span>, <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;&quot;</span><span style="color: #002200;">&#41;</span>, <span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span> show<span style="color: #002200;">&#93;</span>;
        <span style="color: #a61390;">return</span>;
    <span style="color: #002200;">&#125;</span> 
&nbsp;
&nbsp;
    <span style="color: #11740a; font-style: italic;">/*snip*/</span>
<span style="color: #002200;">&#125;</span></pre></div></div>


<ul>
<li>Make the relevant view controller implement the <code>TPAACAudioConverterDelegate</code> protocol: That means implementing <code>AACAudioConverterDidFinishConversion:</code>, and  <code>AACAudioConverter:didFailWithError:</code>, and optionally <code>AACAudioConverter:didMakeProgress:</code> to receive progress updates.</li>
<li>Create an instance of the converter, pass it the view controller as the delegate, and call <code>start</code>:</li>
</ul>


<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">audioConverter <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>TPAACAudioConverter alloc<span style="color: #002200;">&#93;</span> initWithDelegate<span style="color: #002200;">:</span>self 
                                                         source<span style="color: #002200;">:</span>mySourcePath
                                                    destination<span style="color: #002200;">:</span>myDestinationPath<span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span>audioConverter start<span style="color: #002200;">&#93;</span>;</pre></div></div>


<p>Alternatively, if you wish to encode live audio, or provide another source of audio data, you can implement the <code>TPAACAudioConverterDataSource</code> protocol, which defines <code>AACAudioConverter:nextBytes:length:</code>, which provides a buffer to copy at most &#8220;length&#8221; bytes of audio into, and then expects you to update &#8220;length&#8221; to the amount of bytes provided.  For that you&#8217;ll need to use the second initialiser, <code>initWithDelegate:dataSource:audioFormat:destination:</code>.</p>

<p>I noted previously that you can&#8217;t encode AAC live, which is what Apple&#8217;s docs say, but Alex in the comments informed me that it wasn&#8217;t so.  So, I added the datasource method, and sure enough, it does work live!</p>

<p>The one caveat is that it&#8217;s a relatively heavy process.  As it turns out, because my app Loopy is busily mixing and displaying visualisations and such, it was too much to also encode straight to AAC, and I was getting glitches.  But it would probably work fine for plain recording.  Thanks, Alex!</p>
 <img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=2176" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://atastypixel.com/blog/easy-aac-compressed-audio-conversion-on-ios/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
	</channel>
</rss>

