2015年4月20日月曜日

Web MIDI Browser 1.0.4: Apple Watch support

Web MIDI Browser 1.0.4: Apple Watch support

Web MIDI Browser 1.0.4 has been released. This version includes some bug fixes and Watch App extension. I don't know whether or not it's suitable as a Watch App. But we, Apple fans, must join the festival... right?

It's easy to use. You can enable "Enable Apple Watch Remote" option in the setting pane of the app. Then, a virtual MIDI port will appear. By pressing the button on Apple Watch, control change messages can be obtained from the virtual port. And then, cook them as you like. The function is available on iPhone 5/5s/5c/6/6Plus.


Watch Kit is a simple framework and has many restrictions. The button control, WKInterfaceButton, can observe Touch Up event only. So, I could NOT implement a control like a musical keyboard, sending noteon by touching-down, sending noteoff by touching-up. I really hope that it will get more controllable APIs in iOS 9... please, Apple guys.

And I fixed some bugs in this version. The next version, 1.0.5, will support the latest Web MIDI API, Chrome 43 spec, which includes the hot-plugging functionality. The polyfill library, WebMIDIAPIShimForiOS, is available on GitHub. It will be updated. Enjoy!

Web MIDI Browser 1.0.4 をリリースしました。このバージョンでは、バグ修正のほか、Apple Watch への対応を行いました。Apple Watch のアプリとして実用的かどうかはわかりませんが、お祭りなので。

使い方は簡単です。設定画面から"Enable Apple Watch Remote" を有効にすると、ブラウザ内で動作する Web アプリから仮想の MIDI Input Port が見えるようになります。そして、Apple Watch 上に現れるボタンを押すと、コントロールチェンジ ("0xb0 0x51 0x7f" 〜 "0xb0 0x54 0x7f") を送信します。あとは皆さんのアイデア次第。いろいろ遊んでみてください。この機能は、iPhone 5/5s/5c/6/6Plus で使えます。

iOS 8 の Watch Kit でできることは限られていて、このアプリでも使っている標準コントロールのボタン (Watch Extension 的には WKInterfaceButton) は、Touch Up (押したあと、離した時にイベント発生)しか検知できません。そのため、音楽アプリで使う鍵盤のように、押して Note On、離して Note Off を送信することはできないようでした。もう少し細かい制御ができれば、アプリの作り甲斐があるのですが。6 月に発表される iOS 9 に期待しています。

そのほか、いくつかのバグもあわせて修正しています。

今後ですが、次のバージョン (1.0.5) で、最新の Web MIDI API への対応を予定しています。今実装してあるのは少し古い Chrome 39 spec で、次のバージョンで Hotplug にも対応した Chrome 43 spec に合わせる予定です。中で使っている Web MIDI API の Polyfill は、WebMIDIAPIShimForiOS として GitHub で公開しています。こちらもあわせて更新されます。



0 件のコメント:

コメントを投稿