omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    MIDI - Custom ViewControllers and ctypes

    Pythonista
    3
    5
    3890
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • wradcliffe
      wradcliffe last edited by

      I just learned that implementing MIDI over Bluetooth LE "requires" an app to implement a custom ViewController. This one is CABTMIDICentralViewController. If IOS sees a bluetooth LE device that provides the newly published MIDI profile, it hides the device from normal CoreBluetooth peripheral scanning. Instead you have to use this special view controller to access the list of peripherals.

      The net effect for my Pythonista development is that I can't use the cb module anymore to talk to "standard" MIDI BLE devices. It still works for other devices like my LightBlue Beans and many others. However, this will likely change if Apple decides they need to take complete control of the UI used to config a specific device. This could easily happen for fitness bands and other things that become mainstream devices.

      On a positive note though - I have found out that most developers who support CoreMidi on IOS are using PGMIDI to do it. It presents a very nice and easy to use wrapper to make CoreMIDI easy to implement. It is worth considering using for just getting "stock" MIDI support going.

      1 Reply Last reply Reply Quote 0
      • laszlo.j.hermann
        laszlo.j.hermann last edited by

        Did you found a workaround to communicate with BT midi devices?

        1 Reply Last reply Reply Quote 0
        • JonB
          JonB last edited by

          https://gist.github.com/0c97625cc4b32012b4a513d72c8850ea implements this view controller. I dont have any BT midi devices, so not sure where to go from there...

          1 Reply Last reply Reply Quote 0
          • laszlo.j.hermann
            laszlo.j.hermann last edited by

            Many thanks. I try to connect to my Mac BT Midi. I would like to use my iPad as a periphery to play and record using Mac ( Pianoteq) sound.
            I configured the Midi-Setup/Midi Studio / Bluetooth , started advertising and your Code works fine to the point, where connecting the Mac bt-midi and both side gets the confirm dialog, but the connection is not established.Any idea?
            If it would connect, can I see the Mac BT Midi in the Pythonista device list delivered by cb.scan_for_peripherals()?

            1 Reply Last reply Reply Quote 0
            • JonB
              JonB last edited by ccc

              If you want to use your ipad as the peripheral, not the controller, then you would instead use
              CABTMIDILocalPeripheralViewController

              Either way adds your device to the CoreMidi devicelist, but i think you need to use CoreMIDI via objc_util to actually do anything with it.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB Forums | Contributors