{"id":32284,"date":"2011-04-09T17:34:40","date_gmt":"2011-04-09T22:34:40","guid":{"rendered":"https:\/\/www.synthtopia.com\/content\/?p=32284"},"modified":"2011-04-09T21:19:34","modified_gmt":"2011-04-10T02:19:34","slug":"the-secrets-of-midi-clock-sync-on-ios","status":"publish","type":"post","link":"https:\/\/www.synthtopia.com\/content\/2011\/04\/09\/the-secrets-of-midi-clock-sync-on-ios\/","title":{"rendered":"The Secrets Of MIDI Clock Sync On iOS"},"content":{"rendered":"<div class=\"jetpack-video-wrapper\"><iframe loading=\"lazy\" title=\"MIDI over Wi-Fi: BassLine in sync with MoDrum via CoreMIDI&#039;s built-in Network Driver\" width=\"900\" height=\"506\" src=\"https:\/\/www.youtube.com\/embed\/FoVGvvMSCNM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/div>\n<p><strong>Finger<\/strong>, developers of two of the first iOS apps to implement MIDI Clock Sync effectively, <strong>MoDrum<\/strong> and <strong>BassLine<\/strong>, have shared their take on <a href=\"http:\/\/www.finger-pro.com\/docs\/avoiding-the-pitfalls-of-coremidi-programming-for-developers.html\">Avoiding the Pitfalls of CoreMIDI Programming<\/a>:<\/p>\n<ol>\n<li><strong>Do not block the CoreMIDI realtime thread.<\/strong><br \/>\nDo not call blocking functions like printf(),\u00a0NSLog(), malloc() or Objective C method calls from any CoreMIDI I\/O context such as the input callback.<\/li>\n<li><strong>Take event timestamps into account.<\/strong><br \/>\nConsult\u00a0<a href=\"http:\/\/developer.apple.com\/library\/ios\/qa\/qa1643\/\">Technical Q&amp;A QA1643<\/a> for informations on how to deal with host time on iOS.<\/li>\n<li><strong>Schedule output in advance<\/strong><br \/>\nSchedule outgoing messages for future delivery, especially when sending over network (see the<em>kMIDIPropertyAdvanceScheduleTimeMuSec<\/em> property).<\/li>\n<\/ol>\n<p>We&#8217;re reprinting their suggestions here, because incomplete MIDI support is one of the biggest problems with current iOS music apps. And effective MIDI implementation becomes more and more useful as more and more apps support it.<!--more--><\/p>\n<p>You can see Finger&#8217;s implementation in action above, with their demonstration of sync between their MoDrum and BassLine iOS apps.<\/p>\n<p>If you&#8217;re a developer and your app supports MIDI Clock Sync like this, leave a comment below and let people know about it!<\/p>\n<p>via\u00a0<a href=\"https:\/\/www.synthtopia.com\/phpbb2\/memberlist.php?mode=viewprofile&amp;u=11708\">loopstationzebra<\/a> in the <a href=\"https:\/\/www.synthtopia.com\/phpbb2\/viewtopic.php?f=46&amp;t=8235\">Electronic Music Forum<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Finger, developers of two of the first iOS apps to implement MIDI Clock Sync effectively, MoDrum and BassLine, have shared their take on Avoiding the Pitfalls of CoreMIDI Programming: Do not block the CoreMIDI realtime thread. Do not call blocking functions like printf(),\u00a0NSLog(), malloc() or Objective C method calls from any CoreMIDI I\/O context such&hellip; <a class=\"more-link\" href=\"https:\/\/www.synthtopia.com\/content\/2011\/04\/09\/the-secrets-of-midi-clock-sync-on-ios\/\">Read More <span class=\"screen-reader-text\">The Secrets Of MIDI Clock Sync On iOS<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13958,37],"tags":[5222,16966,9493,19524],"class_list":["post-32284","post","type-post","status-publish","format-standard","hentry","category-apple-ipad","category-ipods-portable-media-players","tag-bassline","tag-coremidi","tag-finger","tag-modrum"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.synthtopia.com\/wp-json\/wp\/v2\/posts\/32284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.synthtopia.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.synthtopia.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.synthtopia.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.synthtopia.com\/wp-json\/wp\/v2\/comments?post=32284"}],"version-history":[{"count":0,"href":"https:\/\/www.synthtopia.com\/wp-json\/wp\/v2\/posts\/32284\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.synthtopia.com\/wp-json\/wp\/v2\/media?parent=32284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.synthtopia.com\/wp-json\/wp\/v2\/categories?post=32284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.synthtopia.com\/wp-json\/wp\/v2\/tags?post=32284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}