Hi,
Can anyone tell me what is needed to get csounds running on an iphone for use in an application? Is it a difficult thing to do this, or is it pretty straight forward?
thanks.
-patrick
Csounds.com |
|
csounds on iphone |
Support Csounds.comJoin with these Generous Csounders and make a donation to help Csounds.com keep going and growing. Thanks so much!
Another way to help is by purchasing a copy of The Csound Instrument Catalog. User loginPodcast
latest entries:
- browse all the entries - browse by tag - feed URL ![]() - Instructions for listening and submitting your own tracks Recent blog postsSearch |
iPhone
Yes, I`d like to run csounds on my iPhone..What I have to do?
Andrejs
Re: Csound on the iPhone or iPad
I have been very interested in the possibilities of Csound on the iPad or iPhone. But I think that it is extremely unlikely that you will ever see Csound running on an iPhone or iPad unless Apple changes their policies about allowed applications on these devices. Currently, all iPhone apps must be approved by Apple and may only be distributed via the Apple iTunes Apps store. Apple has a number of restrictions on iPhone application functionality that they enforce. Among them is a ban on any application that can run "software" from a source other than the App store. So all programming & scripting languages, emulators, etc. are not allowed as iPhone apps.
I cannot say for certain that Apple would view Csound as a programming language, but I think it is very likely that they would. Thus, unless Apple has a change of heart or you are willing to "jailbreak" your iPhone, I don't think you will be running Csound on it soon.
The other hurdle for me is that developers must pay $99 a year to Apple for a developer account on the iPhone App store. This is an expensive proposition for someone like me who is only interested in developing free, open-source software. AFAIK, the only way to legitimately copy an application that I have developed onto my own iPhone is to pay for this developer account. I personally find this restriction intolerable.
Technically, I know of no reason that Csound could NOT run on an iPhone or iPad. I would love to run it on an iPad if it had a good touch-based GUI to go with it (and if the iPad had handwriting recognition). But the reality is that the iPhone/iPad is a closed and tightly-controlled platform. In my opinion, that limits these devices to primarily "entertainment" purposes -- the iPad and iPhone are not useful for serious work such as programming or music composition.
My recommendation is to investigate mobile devices based on Linux that allow users to install any application they want.
- Anthony
Re: Csound on the iPhone or iPad
I want to amend my previous statement that "Technically, I know of no reason that Csound could NOT run on an iPhone or iPad." and respond a little bit to the original poster's question about how hard would it be to get Csound running on an iPhone.
I was assuming in my statement that the iPhone developement platform supports all standard C library functions since the primary programming language for the iPhone is Objective C. I haven't looked at the iPhone SDK so I don't really know whether this is the case. Regardless, I can say with certainty that getting Csound to run on the iPhone is definitely more complicated than simply recompiling it for the device. It will require some changes -- possibly many changes -- to the Csound code and build system.
Here's a few reasons why:
1. Csound is built from the commandline with Python and Scons on most platforms. AFAIK, iPhone software has to be built with Apple's XCode development environment. This is not a huge problem, but it would be necessary to create an XCode project for Csound from scratch.
2. Csound 5 relies very heavily on shared (dynamic) libraries. Matt Ingalls was looking into compiling Csound for the iPhone in December and he reported that the iPhone does not support shared libraries. So, opcodes other than the built-in ones will require some minor code changes so that they may be statically linked into the main Csound application.
3. Real-time audio support for the iPhone would almost certainly have to be written from scratch.
4. I've read that the iPhone does not have a traditional filesystem and that apps do not open and save independent document files as is typical on desktop computers. If true, this could be the biggest hurdle to getting Csound to run on the iPhone as it would require many code changes. Csound (and libsndfile which is required by Csound) rely very heavily on standard C file I/O functions such as fopen(), fread(), and fwrite(). Also, Csound makes certain assumptions about having a hierarchical filesystem and pathnames. If these things are truly not present on the iPhone, then all of Csound's file I/O would have to be rewritten. And it would not be sufficient to simply disable opcodes that read or write files since Csound expects to be able to write a sorted score file out and then read it back in.
Making all of these changes once might not be too bad, but maintaining an iPhone port of Csound would be considerably more trouble unless these changes could be merged into the main Csound code.
In summary, even if Apple would approve a Csound iPhone app, there are some programming hurdles that would have to be addressed. And to make Csound truly worthwhile to use on an iPhone or even an iPad, I believe that it would need a strong GUI that eliminates much of the need for writing orchestras and scores in text. Finally, don't expect to be able to use scripting languages such as Python or Lua to compose algorithmic scores for Csound on an iPhone since such languages are verboten.
So, I repeat, it would be much more worthwhile (and easier) to try to get Csound running on a Linux mobile device. (Although I'm not sure that Android is applicable since it may only support Java apps).
-Anthony