How to copy a song from iPod Library to app? - iphone

In my application, I want to copy a song from iPod Library.
How can I do that?

Yes. It is possible, but hardly practical, to access raw song data. What you do from there is up to you. Here is a lengthy and detailed description of the process: http://www.subfurther.com/blog/?p=1103.
EDIT: Please be aware of App Store guideline 9.1 before making use of this technique. These guidelines require a developer login, so I've removed them from my post.

I think you can't.
Apple should not allow this !
Edit : see iPod Library Access Programming Guide but I don't think you can access to file. Just metadata.

if iMovie can do it, and they say it is done with all public API's they are in direct conflict with themselves...
Maybe this gives them wiggle room to allow you to post iPod library content to YouTube, since YouTube handles the appropriate detection of sensitive audio. This is sticky but here is the final solution you should learn from to do the job...iPodLibrary Music to PCM Samples revised

Checkout this it will helps you
https://github.com/davidcairns/MediaPlayerDemo

Related

Access iPhone User Songs and Videos?

I was wondering if I can access user's songs and videos in iPhone, part of that access if I can save them or modify them? hopefully not a Jailbroken iPhones
I am greatly appreciated.
Yes, you can. I can't speak for video, because I've only done it for audio, but you can definitely get audio data. These links should get you started. Note: I am as yet unsure if this works with tracks that use any kind of iTunes-related DRM.
First of all, this blog post talks you through the method of accessing the data. Note the reliance on iOS 4.1 or above.
This SO question/answer explains how to get at the raw pcm data, should you want to do more than just save it out.
You can allow the user to pick songs using the MPMediaPickerController class. I think you can save the selected item to your app's sandbox directory.
You can read up on this a bit more with this SO question.

Acoustic fingerprint code for iOS?

I've started looking on the subject of Acoustic Fingerprint (http://en.wikipedia.org/wiki/Acoustic_fingerprint) for a pet project of mine for the iOS and I was wondering if there are:
Any opensource libraries or source code for the iOS that handle this?
Assuming I'm a veteran jack of all trades coder, is it very problematic to implement this myself if there is no open-source versions?
Will the Accelerate DSP library in iOS able to handle such a task?
Thanks
you may want to check out the EchoPrint CodeGen library by The Echo Nest. They even have a fully functional iOS code example.
You can find some additional links to open source audio fingerprinting related software in this MusicBrainz article, but AFAIK the EchoPrint library is the only one that has a license that is compatible with iOS apps.
Good Luck!
Not of my knowledge
No problem for a veteran, that won't be easy, but achievable.
Never looked into.
Even in java, this might be an interesting reading.
Before doing anything, especially if you intend to sell on AppStore, take care that these techniques/algorithms are patented. Read what happened to the above blog post writer.
Will the Accelerate DSP library in iOS able to handle such a task?
NO
I also notice that you put the tag "voice recognition". Just to make sure voice recognition as nothing to do with audio identification/acoustic fingerprinting !!

iPhone streaming debugging information

I'm looking for a way (doesn't need to be app-store save!!) to get ahold of video-streaming-relevant debugging information.
What I'm trying to do, is to write an application that opens a video stream and displays information like:
framerate
bitrate audio / video
etc etc.
codec information
basically i want to display as much information for any given stream.
Thanks for any information in advance,
best regards
sam
Even though you tagged your question with MPMoviePlayerController, that class probably isn't going to help you out very much. First of all, there's a limited amount of information you can access from it at a high level, certainly nothing about codecs and audio bitrate. And even if the class does store this type of information somehow, your app would be disqualified from being in the iTunes AppĀ Store if you access non-public methods or properties.
Secondly, MPMoviePlayerController only supports a limited number of codecs itself, namely the ones that can be decoded in hardware on the iPhone/iPad (H.264 baseline and MPEG-4 videos).
Anyways, a good option could be FFMpeg for the iPhone. Getting the information you need seems to be much more straightforward this way; check out this blog post for a nice tutorial for using the libraries.
I'm not sure about the potential legal issues concerning distributing such a program in the App Store, but if you statically link it with your binary that would at least satisfy Apple... you'll have to check the FFMpeg Legal Site for their end.

Tutorial to record audio on the iphone?

could anyone explain how to record audio on the iphone. I already read the sampleProject of the developer-page. Moreover the documentation didn't quite answered my question.
It would be great to have a kind of checklist how to implement a simple audiorecorder.
Thanks!!!
There is already one as a sample app.
Check "Speak Here" that app records and play sounds. Is a low level sample for CoreAudio.Framework
But if you prefer something newer (and probably better for your needs) check for AVFoundation.framework I am sure there are new APIs in iOS 4.0 that allow to capture sounds like AVCapture, AVInputDevice, etc.
Cheers

iPhone SDK: Is it possible to process audio file from local library

Well, I will try best not to make it as a 'I just want the code' question...
I'm recently working on a project which requires some audio signal processing from local music files (e.g. iTunes Library). The whole work includes:
Get the PCM data of an audio file (normally from iTunes library); <--AudioQueue (?)
Write the PCM data to a new file (it seems that Apple does not allow direct modification on music tracks); <--CoreAudio(?)
Do some processing and modification, like filters, manipulators, etc. <-- Will be developed in C++
Play the processed track. <--RemoteIO
The problem is, after going through some blogs and discussions:
http://lists.apple.com/archives/coreaudio-api/2009/Aug/msg00100.html, http://atastypixel.com/blog/using-remoteio-audio-unit/
http://osdir.com/ml/coreaudio-api/2009-08/msg00093.html
as well as the official sample codes, I got a feeling that the CoreAudio SDK allow us to apply audio processing only on voice demos recorded from Mic.
My question is that:
Can I get raw data from iTunes library tracks instead of Mic input?
If the first question is 'No', is there a way to 'fool' the SDK to let it think it is getting data from Mic input, not from iTunes? (I have done some similar 'hacking' stuff in C# before XD)
If the whole processing just doesn't work, can anyone provide some alternative ideas?
Any help will be appreciated. Thank you very much :-)
Thanks.
Just found something really cool yesterday.
From iPhone Media Library to PCM Samples in Dozens of Confounding, Potentially Lossy Steps
(http://www.subfurther.com/blog/?p=1103
And also a class library by MIT:
TSLibraryImport: Objective-C class + sample code for importing files from user's iPod Library in iOS4.
(http://bitbucket.org/artgillespie/tslibraryimport/changeset/a81838f8c78a
Hope they help!
Cheers,
Manca
1) No. Apple does not allow direct access to PCM data of songs. Otherwise you could create music-sharing apps, which is not in Apple's interests.
2) No. Hacking and getting approved is impossible due to Apple's code approval mechanism.
3) The only alternative I could think of is that you have to do the processing part on PC/Mac and then transfer it to the iPhone. Or you would have to store the files in your own applications folder - you should be able to load and process these via CoreAudio.
I know this thread is old but... did this work for you, Manca? And did this app get approved?
EDIT: just discovered the AVAssetReader class, introduced since iOS 4.1, should help