Hacker News new | ask | show | jobs
by shanev 2478 days ago
Since the App Store launched in July 2008 until Nov 2011, my app, Drum Kit, was one of the top apps in the Music category. It went up to #2 at one point, only behind Smule's Ocarina, and had over 10 million downloads.

The day GarageBand launched, my app went from something like #24 in Music to #64, and downward from there. Fun times!

Interestingly, at an Apple conference sometime in 2010 (either C4 or WWDC), some guy asked me all kinds of detailed questions about the custom audio engine I wrote. Back then the "iPhone SDK" (now iOS SDK) audio APIs had too much latency for a drum app. So I had to write my own in C++ based on Audio Units (a low level C API). A tricky thing I had to do was mix multiple buffers of audio to create the resonance effect drums make when you hit them repeatedly (most prominent in cymbals). Later I found out the person asking me the questions worked at Apple, on the team that made GarageBand. They didn't launch with a blended resonance effect. When you hit a cymbal repeatedly, it would cut off the sound and play the sound again. Ew.

People miss out when they don't try some of the more indie apps. A lot of care goes into making them.

10 comments

I was a huge fan of your app! We used to play around with it a bit in high school.

To be fair to Apple here (and this was way before my time, so I'm probably mixing stuff up) - Garageband dates to 2004 with the eMagic acquisition and was (iirc) built on top of the Logic Pro audio engine. And back then, you still had to deal with the raw CoreAudio API (if anyone wants an adventure, try finding the documentation for it... you'll have to generate it yourself!) on MacOS. I recently had to dig through the old CoreAudio mailing list and read a book [1] on the API for low latency stuff, and I'm guessing that in terms of their engine there wasn't much needing change (at least architecturally) to port to iOS. I seem to recall the biggest difference between desktop/mobile versions was the featureset and UI, I think the problem you mention was present even in Logic. You had to get hacky with ES24's key/velocity maps to do what you mention.

From working in the pro audio world for awhile, I've found that other folks in the space just love to talk shop about how they do things. Audio devs are nerds like that. Doesn't always mean people are stealing from others.

[1] https://www.amazon.com/Learning-Core-Audio-Hands-Programming...

I interviewed with Apple for a research and development related position a few years ago and although the process is notoriously shrouded in secrecy and n-levels of NDAs, I noticed the interview began to shift from assessing my technical ability and team fit to prying for information about a very specific set of technologies I'd worked closely with. Those technologies had some odd turns of events with shifts in private IP ownership no one seemed to know about, including leading industry competitors I spoke with.

Perhaps I'm paranoid but it felt like Apple had purchased some of those private technologies and were wasting my time with a bogus interview prying for information about what I knew of the system before the IP mysteriously changed hands, likely because I had more levels of access to something they wanted to commercialize in the future. I haven't seen anything pushed to market yet but I've seen some semi related products creep up recently.

Did you approche Apple or vice versa?
They could also be testing if you're the kind of person who gives away secrets too easily.
Apple isn't interviewing you to spy on you.
Apple's audio APIs have always been terrible and buggy. It's why I wrote ObjectAL [1].

I toyed with redoing everything in audio units for awhile [2], but the prospect of re-implementing OpenAL's features in audio units to build a complete one-stop audio solution was a bit too much for what time I had available ;-)

[1] https://github.com/kstenerud/ObjectAL-for-iPhone

[2] https://github.com/kstenerud/Aural

Garage Band came out in 2004. Apple porting it to iOS and then not including a feature you talked about isn’t an example of Apple “copying” popular apps.
At first I thought your comment was going to be about Apple's Smart Drummer feature in Logic (and I think Garageband?).

Logic Drummer is a killer feature, at least for on-the-grid stuff. Usually the drum parts it generates for me are more inventive and have way more variety than anything I play by hand or program manually.

Sorry to hear about your situation, though.

I've made some (C#) code that applies an ambisonic convoluted reverberation impulse response to an audio stream, but I'm hitting performance walls with Unity & C#. I want to go C++ & Unreal, but every time I try to learn C++ my eyes glaze over and I come down with a bad case of the Stupids.

Is there any "C++ for dummies with a bent for audio processing" material you'd recommend?

I hate to just say it like this, but it’s unlikely that C# is really your bottleneck. It’s more likely the approach or the libraries you are using that are the issue.

Try a clean implementation of that particular logic in pure C# on .NET Core, you should be able to get it working more than adequately fast. I’m saying this as someone that (re)writes applications in C++ and rust to provide pseudo-rt guarantees.

yeah especially with Span<T> it's way easier to create high performance code, while reducing GC pressure. Also depending on the Platform P/Invoke to C/C++ is also a solution that works quite better than on Java's JNI.
>applies an ambisonic convoluted reverberation impulse response to an audio stream

Yikes. If you're doing naive convolution that's O(n^2) in real time.

Try reading up on partitioned convolution techniques via FFT. The current state of the art in FFTs is using FFTW (extremely fast, GPL licensed but a bit tricky to get a commercial license if that is unacceptable) or IPP on x86 (closed source, but works and is fast).

I'd also try looking at Facebook's Two Big Ears code for ambisonic rendering via HRTFs:

https://github.com/facebookincubator/Audio360

I got started by studying the C++ code in the sample app called Touch Fighter in one of the earliest iPhone SDKs. Michael Tyson's blog helped a lot too: http://atastypixel.com/blog/. This is in Swift but really good intro to audio processing on iOS: https://github.com/syedhali/AudioStreamer.
"The audio programming book" by MIT press is amazing, a great book that doesn't cost much. Starts with a fairly large c++ tutorial.
Have you tried using all the value types performance magic (avoid GC, use structs, avoid copying, consider stackalloc, etc)?
I've built something very similar, but in C++, my email address is in my hn profile page...
You'll for sure start to hate your life as soon as you start messing with UE4.
With Apple buying Emagic in 2002, I’m surprised they weren’t able to do a better job. Emagic was the company that originally made Logic, the professional audio application Apple still sells today.
And the EXS24 sampler still looks the same. They've re-skinned every other plugin, but this thing is still straight out of 1999.
That makes me think of the Creaceed indie dev. When they release an app they usually have a short technical description of what they are doing (e.g, image preparation for OCR[1], live collaboration with CRDT and OT[2]).

I guess it's always an exercise to reveal enough to spark interest but not too much to keep the secret sauce.

[1] https://medium.com/@creaceed/the-making-of-prizmo-5-4006558c...

[2] https://medium.com/@creaceed/drawing-together-behind-the-sce...

>The day GarageBand launched, my app went from something like #24 in Music to #64, and downward from there. Fun times!

I don't understand. GarageBand must have provided users with some of the features your users wanted, so they switched. But how is one app responsible for yours to go from #24 to #64? Shouldn't it have gone from #24 to #25 (with GarageBand in front of your app)?

Not all music apps are drum apps. So its drop in downloads allowed other music apps to pass it.
Garageband has existed since 2004 though. They were probably already very far in the port.
Garageband existed well before 2004,but I can't find any references to it. I think emagic (or a predecessor) had it out in the 90s on Atari or Mac, or both. I remember using it in high school, and I remember when Apple re-released it in 2004.

Does anyone have any more info on this? It's surprisingly hard to find.

You might be thinking of Logic or one of it's predecessors for Atari and Mac. I don't see any software that used the name GarageBand before Apple though.

> Logic stemmed from Creator, then Notator, made by C-Lab (the company's forerunner) for the Atari ST platform.

https://en.wikipedia.org/wiki/Emagic

Garageband definitely existed. I remember my music teacher showing me in about 1993/94. It was very simple, and we usually used cubase, but it was a thing. That's why I'm asking! It seems to have disappeared into the music software black hole and I have definite memories of it existing many years before Apple released their version of it. I'm talking well before osx came out! I do tend to think it was a mac program though, as we had Ataris and macs in the music lab and I usually used the Atari with a Roland sound canvas module (can't remember which one) and garageband wasn't something I remember using with any frequency.