Page 1 of 1

Anyone on here code for Apple IOS?

Posted: Wed Aug 17, 2011 9:21 pm
by ct43
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.

Re: Anyone on here code for Apple IOS?

Posted: Wed Aug 17, 2011 9:47 pm
by bigbadotis
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.

Re: Anyone on here code for Apple IOS?

Posted: Wed Aug 17, 2011 10:15 pm
by ct43
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.

Re: Anyone on here code for Apple IOS?

Posted: Tue Aug 23, 2011 7:21 pm
by ct43
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.

Re: Anyone on here code for Apple IOS?

Posted: Tue Aug 23, 2011 8:16 pm
by bigbadotis
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.

Re: Anyone on here code for Apple IOS?

Posted: Thu Aug 25, 2011 2:09 pm
by ct43
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.

Re: Anyone on here code for Apple IOS?

Posted: Thu Aug 25, 2011 4:48 pm
by Observer-A
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.

Re: Anyone on here code for Apple IOS?

Posted: Thu Aug 25, 2011 6:45 pm
by bigbadotis
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...

Re: Anyone on here code for Apple IOS?

Posted: Thu Aug 25, 2011 7:08 pm
by kooperativ
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 :)

Re: Anyone on here code for Apple IOS?

Posted: Thu Aug 25, 2011 8:00 pm
by bigbadotis
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

Re: Anyone on here code for Apple IOS?

Posted: Thu Aug 25, 2011 8:12 pm
by Tone Deft
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.