iOS internal audio recording - ios

My iOS app is an musical instrument and I want to make a record of playing, but without using mic.
Any suggestion or at least direction will be appreciated.

my curiosity... ex. if its a musical instrument(ex piano or keyboard), on pressing any key, it should play some sound. In your app, while playing sound(tone 1, tone 2)on pressing the key, create a new file(.mp3 or .midi) & write the data to it. But, you should be familiar with sound file internals(headers, body ....etc)

The best way is to use buffers to write them into a file. Audio units or Audio Queues.

Related

Possible to access/monitor tvOS system audio output?

I'd like to develop a music visualizer app for tvOS which has the ability to listen to whatever background audio is playing (like Spotify, Pandora, etc.). Does anyone know if this is even possible on iOS/tvOS? In other words, there would have to be some functionality that allows the system audio output to be treated like an audio input.
I imagine that it would be the same functionality as doing a screen recording capture, at least the audio part.
My goal is to be able to do this programatically (Objective-C) so that the user doesn't have to do anything, it just "works" out of the box, so to speak.
Thanks

How to sync custom audio with video in iOS?

I am trying to make a video player with custom audio effects. To perform an effect I've written an audio unit. To play video stream I use AVPlayer with muted sound. The problem is that audio and video are out of sync. And it gets awful when I pause and resume the playback.
Could you please suggest any ideas about how to sync the two things? Maybe use something else instead of AVPlayer?
Thanks in advance.
I shall answer my own question.
There is a thing called MTAudioProcessingTap. It allows for doing audio manipulation stuff just like an audio unit but inside AVPlayer.
There's a link for more details: https://chritto.wordpress.com/2013/01/07/processing-avplayers-audio-with-mtaudioprocessingtap/.=

Implement Audio Trimming in iOS

I want to implement audio trimming in iOS, I want something like a two way slider that the user can slide over a particular period of the recorded audio, and then I will save that audio.
Are there any libraries available for it?

Phonegap media stops system music

Phonegap media play method has a magic option playAudioWhenScreenIsLocked = false that does good job:
Prevents app music from playing when app is in background;
Makes app music obey the hardware "mute" button: without this option your app will ignore if user device is muted and play sound anyway.
But there is third hidden magic in this option. It stops current playing song from native Music app. Most of all it's annoying when I want to play short single sound.
Actually I would like to implement this scenario:
Music: Check if system music is playing on the app start. If it is not, play my app music, otherwise let user enjoy his own media.
Sound FX: Just play my little sound once and don't spoil anything.
And never play anything in background and when device is muted! Even if system Music app can let itself do so.
Has anyone managed to do something similar?
Thank you.
Ended up using https://github.com/floatinghotpot/cordova-plugin-nativeaudio (https://build.phonegap.com/plugins/2291)
Be aware: simple sound effects are not working in Simulator.

How should I go about synchronizing sound effects with UI animations in iOS?

I want to play some sound effects while animating an UI element (e.g. playing a movement sound while an UI object is moving), which requires precise timing and synchronization.
I really can't figure out which framework I should be using from the descriptions in the Multimedia Programming Guide. So I need your kind help in choosing one.
What I want to do is:
Play short (max 10 seconds) sound effects (e.g. a button tap sound).
Being able to synchronize some of them with UI animations (e.g. a view appearance/disappearance).
I tried using the AudioServicesPlaySystemSound function from the AudioToolbox framework, sometimes it works great, but sometimes the sound won't play instantly. For example when a button is clicked, its action is performed before the sound is played, even though the AudioServicesPlaySystemSound is called first in the button's action method.
Thanks in advance,
Mota
Mixing audio waveforms into an already running RemoteIO Audio Unit configured with short buffers will have the lowest possible audio latency. The cost of this is a more complex to use API and the need for uncompressed audio assets.

Resources