Audiokit MIDI device for IOS - audiokit

Is it possible to identify the MIDI device(s) connected (IOS version) when using the camera kit. I don't see a function for that although you can specify a name when starting the MIDI output. I'm guessing there is a way to get a name somehow.

I'm assuming that if you're using class compliant MIDI to usb converters the MIDI devices will register automatically. There is nothing that is specific to the camera connection kit.

Related

Selecting USB connected iphone as audio output for Mac

I am trying to build a project that will allow me to use an iphone USB connected to a Mac as an audio output device. There are options to do this wirelessly like "AirFoil" but they all introduce latency during playback.
When connected via USB, the iphone will appear in Audio Midi Setup as a device. Currently it is only selectable as an input device. I believe it can be used as an external microphone or a midi input device. My hope is that through code, the grayed output selection could be overridden. Is this even possible?
Iphone_IO.png
From what I've read the AVAudioEngine might provide a solution to this? I have read through posts about listing all available AudioDevices by ID.
list-all-available-audio-devices
From here would I be able to set the audio output device as the iphone? Or is this something that would require a companion app running on the phone to route the audio as well? Any information would be helpful, thanks!

How to connect to a remote device using A2DP on iPhone

I want to connect to a Bluetooth device and have my app send to it audio over A2DP.
So my question is:
How to scan for a bluetooth device?
How to pair with it ?
How to send audio to the paired device?
I am familiar with Corebluetooth but its not compatible for Bluetooth that is not low energy, so what framework should i use?
Should the user connect the device throw the settings of the app or can my deal with that?
I know there is a lot of questions but all the information that i found was for android.
Thank you!
Hi let me answer your questions one by one
first of all you dont use CoreBluetooth
you will use AVFoundation and/or CoreAudio (which is a really huge framework with AudioUnits and AudioQueue and much more)
BUT if you just want to play Audio you may not need to dive into CoreAudio
AVFoundation is built on CoreAudio and can easily play and record from Bluetooth devices
How to send audio to the paired device?
Core Audio and AVFoundations both have mechanism for getting and sending audio to Bluetooth Audio devices from/to your iphone
How to scan for a bluetooth device and How to pair with it ?
this is done via Bluetooth Settings in your iphone.you just trun yout BT Speaker ON and search then you Pair it for future use
hope this helps

CoreMidi: How do I send MIDI through the lightning cable?

I am looking to send MIDI signals through the lightning cable to the MIDI network on my laptop.
Is there anyway to do this?
The MIDINetworkConnection class has a connectionWithHost method, that allows wifi connections. But I'm looking for something faster, so I'm wondering if we can do that.
macOS and iOS now do this natively with IDAM (inter-device audio and MIDI).
Attach an iOS device to your Mac and unlock it.
If prompted to trust, trust the host Mac.
Launch Audio MIDI Setup.
If not visible, show the Audio Device window (Cmd + 1)
Click the "Enable" button next to the iOS device.
A MIDI device called "iPhone" or "iPad" will show up in the MIDI Setup.
On the iOS device, route MIDI to the IDAM MIDI Host destination.
I don't think you can do it natively, but there is a way to use the lightning cable as a network interface to send data to the computer.
The new version of touchAble does that, but it requires a server application that runs on the computer, talking to the device and opening a virtual MIDI port to route the MIDI messages to your DAW.
You might need to check the Apple MFi program, if it is not out of scope, depending on the nature of your project. Or check that other discussion about USB communication.

BlueTooth headset not able to use as audio recording capture for iOS and OpenEars

We are building an iOS app that does basic speech recognition. Basically, the app counts the number of words you speak into the iOS device. The app works well when speaking into the standard microphone built into the iPhone. However, when connecting a wireless Bluetooth audio device, we are unable to use that Bluetooth device as a method for recording voice audio. We are using following software and devices:
built for iOS7.0/7.1 with the OpeanEars library for speech recognition
we’re using the ZOMM Wireless Leash (http://www.zomm.com/ | http://www.amazon.com/ZOMM-Wireless-Bluetooth-Speakerphone-Black/dp/B003N3J6BU/ref=sr_1_1?ie=UTF8&qid=1409515088&sr=8-1)
Tried other Bluetooth devices with the same behavior (Bluedio 66i and Bluedio DF200)
Unable to capture audio in default Voice Memo app
as far as we know this is simply using standard BlueTooth protocol, as we understand it, once the bluetooth device is paired it should automatically start accepting it as a device for recording/audio capture
According to OpenEars, the Bluetooth audio devices should be picked up automatically (http://www.politepix.com/forums/topic/enabling-bluetooth-support/). Are we right in assuming this?
We used the VoiceMemo app (the voice recording app that ships with iOS) to test out the bluetooth device as a “control” experiment:
Pair the ZOMM with the iOS device
Open VoiceMemo
Select ZOMM as input device from within the VoiceMemo app
Start recording
Stop recording – no audio was captured
Unfortunately this meant that neither our app nor the standard voice recording app is able to use the bluetooth device as a means for recording audio. Either way it’s hard to rule the device as simply the issue.
We’re curious to understand if this simply a hardware issue (and need a BT-enabled device that supports voice recording to iOS) or if there is something in the code we need to enable in order for the app to start accepting the device as recordable.
Also, more details about the ZOMM headset:
ZOMM specifications:
Bluetooth Wireless Compatibility:
This ZOMM device supports the following Bluetooth wireless protocols and profiles:
• Bluetooth core technology v2.1+EDR
• Hands-Free Profile (HFP) v1.5 headset role
• Headset Profile (HSP) v1.2 headset role
Bluetooth Wireless Interoperability:
This ZOMM device is designed to be interoperate with all Bluetooth wireless products that support compatible profiles and roles
including:
Bluetooth core technology v3.0, v2.1+EDR, v2.0 +EDR, v1.2
Bluetooth master and slave roles
Bluetooth Hands-Free Profile (HFP) v1.5 and prior headset (HS) role
Bluetooth Headset Profile (HS) v1.2 and prior headset (HS) role
Any idea on what we could do to resolve this issue and use Bluetooth together with the OpenEars library on iOS7.1?
Thanks! Philip
testing with Voice Memo is logical, however the app may not be allowing the route the change when BT is connected. A detailed explanation is here. iOS: Using Bluetooth audio output (kAudioSessionProperty_OverrideCategoryEnableBluetoothInput) AudioSession
With OpenEars, I believe you can enable logging to track when the audio route changes. So, you can verify via logging that it is listening to where it should be or .... not listening. I would suggest upgrading as of this post http://www.politepix.com/forums/topic/small-bug-when-running-on-ios-8/ . If you scroll to the bottom you can see BT should work now.
Another test worth running is SaveThatWav within OE. I have not used it, but you should be able to verify what you are listening too.

ExternalAcessory Framework for iOS: using the iphone as a usb device

I'm looking into the iOS sdk for examples of the ExternalAccessory framework to use the iphone/ipad as an USB device that can be plugged into a PC or Mac and present as external device (like a midi controller or something else)
The App i want to create requires connecting to a host (PC or Mac) the iphone via USB or bluetooth and present to the host a functionality. How can i implement this?
You'll probably have an easier time connecting via WiFi. You need to be part of the Apple Made for iPhone program, which is not easy to get into, to use Bluetooth or the dock connector to talk to peripherals. There's no such restriction on the use of WiFi. Also, you'll find a lot more helpful examples of connecting via WiFi on the web.
CoreMIDI is the appropriate API for emulating a MIDI device, which may be possible over USB using Apples Camera Connection kit.

Resources