Anyone on here code for Apple IOS?

Discuss music production with Ableton Live.
Post Reply
ct43
Posts: 581
Joined: Mon Aug 23, 2004 4:39 pm
Location: South Yorkshire (UK)
Contact:

Anyone on here code for Apple IOS?

Post by ct43 » Wed Aug 17, 2011 9:21 pm

just wondering if any of you guys make audio based iPhone / iPad apps?

Ive been learning Objective C for the last 3 months, working my way through tutorials and picking up quite a bit of info. Im starting to wonder though, maybe I should be learning C/C++ ?

Yes, I know this is not a programming forum :) but if anyone fancies giving me any advise / other good forums for audio programming id be grateful!

Thanks

Carl.

bigbadotis
Posts: 836
Joined: Fri May 30, 2003 10:31 pm
Location: rochester, ny
Contact:

Re: Anyone on here code for Apple IOS?

Post by bigbadotis » Wed Aug 17, 2011 9:47 pm

If you want to do audio programming you pretty much need to learn C. C++ isn't required by any means, although Apple does provide some convenience objects for common tasks (like ring buffers) that are written in C++. There are also some nice non-apple audio libraries using C++ that will take care of things like oscillators and filters for you. But really, you can get by on C depending on what you want to make.

If you've been doing Objective-C you probably have a pretty good handle on at least half of C. From there you need to make sure you understand pointers / pointer arithmetic and memory management.

I taught a class recently on creating music / art applications for iOS:

http://www.mat.ucsb.edu/594CR

There are sample projects on the website that cover MIDI, OSC, Bonjour, audio and more. They aren't really commented since I went through them in class, but I did try to make each example as simple as I possibly could. In general they are simpler and more direct than other examples you'll find on the web. And I'm happy to answer questions.

Good luck! - Charlie

PS - join the core audio mailing list.

ct43
Posts: 581
Joined: Mon Aug 23, 2004 4:39 pm
Location: South Yorkshire (UK)
Contact:

Re: Anyone on here code for Apple IOS?

Post by ct43 » Wed Aug 17, 2011 10:15 pm

wow thanks Charlie... thats really helpful

Yeah I was kinda thinking that Obj-C wouldn't be able to do all the work as it doesn't seem low level enough... good job X-Code will compile C as well :)

I tell you what though, the whole thing is mind mashing! Ive learnt a lot of stuff but the more I learn the more I realise I dont know :lol:

Ive joined the mailing list and im going to take a real good look at the site... ill get back with some questions once ive soaked that up

Thanks

Carl.

ct43
Posts: 581
Joined: Mon Aug 23, 2004 4:39 pm
Location: South Yorkshire (UK)
Contact:

Re: Anyone on here code for Apple IOS?

Post by ct43 » Tue Aug 23, 2011 7:21 pm

Hi Charlie...

Do you think these C++ class files will help me?
https://ccrma.stanford.edu/software/stk/

BTW ive ordered this book:
http://www.amazon.co.uk/Sams-Teach-Your ... 11&sr=8-12

Also.. ive been working through this guys C and C++ video tutorials (about half way through now)
http://www.youtube.com/playlist?list=PLB1D6D3D322FAC6A6

Im comfortable with the basic stuff at the moment :) though DSP land feels an awful long way off :?

Cheers

Carl.

bigbadotis
Posts: 836
Joined: Fri May 30, 2003 10:31 pm
Location: rochester, ny
Contact:

Re: Anyone on here code for Apple IOS?

Post by bigbadotis » Tue Aug 23, 2011 8:16 pm

Definitely. It's a nice well-documented library and it's fairly easy to understand.

One drawback is it doesn't have any FFT support that I know of, and if you get into more complicated segmentation algorithms you'll need that... many use the difference of bin magnitudes from one window to the next as one parameter when defining segments.

ct43
Posts: 581
Joined: Mon Aug 23, 2004 4:39 pm
Location: South Yorkshire (UK)
Contact:

Re: Anyone on here code for Apple IOS?

Post by ct43 » Thu Aug 25, 2011 2:09 pm

quick question for you Charlie... will using a 3rd party lib stop me from having to write something like this?

http://downloads.dspdimension.com/smbPitchShift.cpp

Looking at that just makes my mind melt!

I was thinking that if I can import someone else's lib, I might be able to just send messages to it to process audio.

Observer-A
Posts: 106
Joined: Mon Jan 17, 2011 6:48 pm
Contact:

Re: Anyone on here code for Apple IOS?

Post by Observer-A » Thu Aug 25, 2011 4:48 pm

Nice. Thanks guys.
Been considering getting back into C/C++ a lot lately.
I have done web languages exclusively for a long time now and compiled languages are calling me again.
Always thought that VST development would be fun and I have some good ideas so if anyone ever wants to have a hackathon of sorts then let me know :)

Thanks again for the resources.
Ableton Crackhead and Habitual Drum Hitter
Observer-A.com
DustedGroove.com
Soundcloud

bigbadotis
Posts: 836
Joined: Fri May 30, 2003 10:31 pm
Location: rochester, ny
Contact:

Re: Anyone on here code for Apple IOS?

Post by bigbadotis » Thu Aug 25, 2011 6:45 pm

ct43 wrote:quick question for you Charlie... will using a 3rd party lib stop me from having to write something like this?

http://downloads.dspdimension.com/smbPitchShift.cpp

Looking at that just makes my mind melt!

I was thinking that if I can import someone else's lib, I might be able to just send messages to it to process audio.
Pitch-shifting (without changing duration) is tricky. This example looks nice in that it's really self contained and seems like it would be easy to use, but it's not hardware-optimized so it probably won't be very fast. But maybe it will be fast enough for what you need to do? Might as well try it and see...

I don't know any open-source, non GPL / LGPL libraries for iOS that do pitch-shifting...

kooperativ
Posts: 51
Joined: Sat Sep 25, 2010 9:02 am

Re: Anyone on here code for Apple IOS?

Post by kooperativ » Thu Aug 25, 2011 7:08 pm

wasn't AUPitch added in iOS 5? would make this problem a whole lot easier if you go the AudioUnit way:

AUPitch
kAudioUnitSubType_Pitch
An effect unit that lets you alter the pitch of the sound without changing the speed of playback.

from http://developer.apple.com/library/mac/ ... erview.pdf

Btw: Thanks a lot for the link to your class bigbadotis, going to help a lot with a fun project of mine :)

bigbadotis
Posts: 836
Joined: Fri May 30, 2003 10:31 pm
Location: rochester, ny
Contact:

Re: Anyone on here code for Apple IOS?

Post by bigbadotis » Thu Aug 25, 2011 8:00 pm

That's intended more for speech than music if I remember correctly, but maybe the quality is good enough? Thanks!
kooperativ wrote:wasn't AUPitch added in iOS 5? would make this problem a whole lot easier if you go the AudioUnit way:

AUPitch
kAudioUnitSubType_Pitch
An effect unit that lets you alter the pitch of the sound without changing the speed of playback.

from http://developer.apple.com/library/mac/ ... erview.pdf

Tone Deft
Posts: 24152
Joined: Mon Oct 02, 2006 5:19 pm

Re: Anyone on here code for Apple IOS?

Post by Tone Deft » Thu Aug 25, 2011 8:12 pm

speech is usually limited to 200 and 3.4 kHz using a slow 8kHz clock. if there was mention of speech around that IP it's probably just for that.
In my life
Why do I smile
At people who I'd much rather kick in the eye?
-Moz

Post Reply