7 ms·
Novocaine: painless high-performance audio on iOS and OS X
- guscost 14y agoI just finished making my own version of this! What unfortunate timing, but kudos to you.
- melloclello 14y agoIs it open source? I'd love to check it out.
- guscost 14y agoI'm thinking of abstracting out some of the quirks and open-sourcing the audio engine at some point, but it isn't nearly as intuitive or compatible as this library as it was developed recently along with the application that uses it... On top of that, no vector operations or ring buffers are currently implemented, so I wouldn't be surprised if this library has significantly better performance. I do have a bit of a wish list of features to add to my code after taking a look at some of the techniques used here. It's complicated work, but I've never had a better experience learning a complicated system. My implementation basically added a playback and mixing interface to the audio engine from this sample mixer project: http://developer.apple.com/library/ios/#samplecode/MixerHost/Introduction/Intro.html http://developer.apple.com/library/ios/#samplecode/MixerHost...
- andyzweb 14y agoBy vector operations do you mean using something like the Accelerate framework? or SSE/NEON primitives? or just retooling your code so that your compiler can make attempts to vectorize when possible?
- guscost 14y agoI'm a bit new to this stuff, so I'm not exactly sure to be honest! It looks like he is piping several array operations through Accelerate, and I suspect there is at least one part of my render callback function that would finish faster with appropriate vectorization. If anyone has any relevant tips about how the Obj-C LLVM or whatever it is actually works and what it means for low-latency audio, please do share. My current strategy is ruthless and minimal static allocation but I don't know what is best.
- deleted 14y ago[deleted]
- kscottz 14y agoThis looks great. Most audio and image processing libraries are a pain and I always end up wrapping them in something like this. It is nice to see someone open source a well written wrapper.
- melloclello 14y agoOh my god. I just spent the last month on and off trying to wrap my head around CoreAudio. I'm flabbergasted, thank you so much.
- melloclello 14y agoUpdate: worksforme on Mac and iOS, going to start playing with this tonight
- ianloic 14y agoIs this open source? The source files say All Rights Reserved.
- alexbw 14y agoFixed.
- bludwype 14y agojust bought all your apps. any other useful and/or interesting and/or fun audio analysis apps out there anyone can recommend??
- guscost 14y agoStay tuned...
- kennywinker 14y agohttp://itunes.apple.com/ca/artist/audioforge-labs-inc./id305996692 http://itunes.apple.com/ca/artist/audioforge-labs-inc./id305... Made by a developer I met at WWDC. Good stuff and he puts a whole lot of love into them.
- SpiderX 14y agoAbsolutely hate the name.
- bigiain 14y agoI guess I'm showing my age here, but I've now got the song Novocaine by The Eels running around my head: http://www.youtube.com/watch?v=V2yy141q8HQ http://www.youtube.com/watch?v=V2yy141q8HQ That seems like a pretty good "hook" to hang your audio library off (I guess targeting your audio library marketing to people who were listening to pop music in 1996 is a questionable tactic though…)
- BrandonBT 14y agoWhy do you hate it?
- SpiderX 14y agoBecause it gives you absolutely no idea what the product actually does, and it's un-googleable. Try googling novocaine - guess what, you won't find this in the first page of results. Good luck with it. I'm sure it may be one awesome piece of software, but the name is just dumb.
- elithrar 14y ago> Try googling novocaine - guess what, you won't find this in the first page of results. Good luck with it. I'm sure it may be one awesome piece of software, but the name is just dumb. A lot of web projects are "un-googleable", especially when they are first kicking off. Django would be a good example of this—searching for "Django" would often return results about Django Reinhardt, a jazz musician, instead of the web framework. I think it's a fair assumption to say that an interested programmer might think to append github[1] or audio[2] to their search, in which case the result is in the top 3. [1] https://duckduckgo.com/?q=novocaine+github https://duckduckgo.com/?q=novocaine+github [2] https://duckduckgo.com/?q=novocaine+audio https://duckduckgo.com/?q=novocaine+audio
- 14y ago
- radarsat1 14y agoAh, interesting, reminds me of RtAudio. (Similar thing for C++, though this seems to require even less boilerplate.. on the other hand RtAudio is cross-platform.)
- alexbw 14y agoHey everybody, Novocaine is my baby, and it's completely awesome to see folks already using it. For the record, it's open-source, I just forgot to stick the MIT license at the top. Or would folks prefer BSD? Let me know, I'm flexible. The only thing I care about is that people use it to make awesome software. If anybody's a Boston local, I'll be talking about iOS audio (both novocaine and some fancier frequency analysis, I hope) at the Berklee College of Music CS club tomorrow, 6-8pm, at 150 Mass Ave, room 118. And, if you dig novocaine, check out the apps I made with it: http://itunes.apple.com/us/artist/alex-wiltschko/id344345862 http://itunes.apple.com/us/artist/alex-wiltschko/id344345862
- cwb71 14y agoAlright fine, you just sold me a copy of Octave! Thanks for releasing this.
- podperson 14y agoYour timing couldn't be better. I was literally in the process of trying to figure out how the heck the SpeakHere demo actually works -- now maybe I don't have to. It would be nice to have a little more documentation. How do you set audio sample formats? (I assume you can.)
- alexbw 14y agoDocumentation will be forthcoming. What do you mean by audio sample formats? One of the things I tried to do was make sure that you never, ever, EVER have to think about anything but floating point audio. In my experience, audio comes in as either float or SInt16s (I've never seen fixed-point coming in by default, but I haven't done an enormous amount of odd-peripheral Mac audio), and novocaine just handles it for you.
- Tloewald 14y agoI'm working on a VoIP app and the back end requires specific audio formats.
- vecter 14y agoWhoa this look great! I haven't had a chance to dig through, but is it possible to capture the audio that's being played? I'm thinking of recording gameplay audio. Thanks!
- deleted 14y ago[deleted]
- hackermom 14y agoCorrect me if I'm wrong, but isn't Novocaine still an abstraction layer that interfaces with Core Audio (I haven't had a moment to look at the sources yet)? I understand that it's simpler to deal with, but how is it more "high-performant" than working with Core Audio directly?
- kennywinker 14y agoI think he means "painless" in comparison with working directly with audio units, and "high-performance" in comparison with the higher-level abstractions provided by Apple. Having tried my hand at core audio code a few times, this is an amazingly simple API. I've got some app ideas I'd like to use this in.
- psych 14y agoIs it possible with Novocaine to mix for example in app audio and mic recording into one sound file? Cheers