{"id":888,"date":"2021-08-31T07:31:38","date_gmt":"2021-08-31T06:31:38","guid":{"rendered":"https:\/\/abcnotation.com\/blog\/?p=888"},"modified":"2021-08-31T07:32:58","modified_gmt":"2021-08-31T06:32:58","slug":"the-problem-with-midi-resolved","status":"publish","type":"post","link":"https:\/\/abcnotation.com\/blog\/2021\/08\/31\/the-problem-with-midi-resolved\/","title":{"rendered":"The problem with midi &#8230; resolved"},"content":{"rendered":"\n<p>In a <a href=\"https:\/\/abcnotation.com\/blog\/2013\/04\/10\/the-problem-with-midi\/\" data-type=\"post\" data-id=\"667\">previous post<\/a> I wrote at length about the long-term problems of providing a midi player for tunes on the site. <\/p>\n\n\n\n<p>I am pleased to say that, as of February 2021, that problem is now resolved.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>The resolution was achieved using a JavaScript library from Ondrej C\u00edfka called <a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/github.com\/cifkao\/html-midi-player');\" rel=\"noreferrer noopener\"  href=\"https:\/\/github.com\/cifkao\/html-midi-player\" data-type=\"URL\" data-id=\"https:\/\/github.com\/cifkao\/html-midi-player\" target=\"_blank\"><strong>html-midi-player<\/strong><\/a> (the clue&#8217;s in the title).<\/p>\n\n\n\n<p>Installing and using it is simplicity itself<\/p>\n\n\n\n<ul><li>an additional &lt;script&gt; element to import the library and its dependencies<\/li><li>a &lt;midi-player&gt; element wherever you need to use it<\/li><\/ul>\n\n\n\n<p>And that&#8217;s it!<\/p>\n\n\n\n<p>There are other options to display a piano roll player and even display the score from the midi file. I haven&#8217;t used either but take a look at the <a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/codepen.io\/cifkao\/pen\/WNwpLzL');\" rel=\"noreferrer noopener\"  href=\"https:\/\/codepen.io\/cifkao\/pen\/WNwpLzL\" data-type=\"URL\" data-id=\"https:\/\/codepen.io\/cifkao\/pen\/WNwpLzL\" target=\"_blank\">simple<\/a> and <a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/codepen.io\/cifkao\/pen\/GRZxqZN');\" rel=\"noreferrer noopener\"  href=\"https:\/\/codepen.io\/cifkao\/pen\/GRZxqZN\" data-type=\"URL\" data-id=\"https:\/\/codepen.io\/cifkao\/pen\/GRZxqZN\" target=\"_blank\">advanced<\/a> demos to see what&#8217;s possible.<\/p>\n\n\n\n<p>Thanks Ondrej!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a previous post I wrote at length about the long-term problems of providing a midi player for tunes on the site. I am pleased to say that, as of February 2021, that problem is now resolved.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,3],"tags":[442,389],"_links":{"self":[{"href":"https:\/\/abcnotation.com\/blog\/wp-json\/wp\/v2\/posts\/888"}],"collection":[{"href":"https:\/\/abcnotation.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abcnotation.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abcnotation.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abcnotation.com\/blog\/wp-json\/wp\/v2\/comments?post=888"}],"version-history":[{"count":3,"href":"https:\/\/abcnotation.com\/blog\/wp-json\/wp\/v2\/posts\/888\/revisions"}],"predecessor-version":[{"id":891,"href":"https:\/\/abcnotation.com\/blog\/wp-json\/wp\/v2\/posts\/888\/revisions\/891"}],"wp:attachment":[{"href":"https:\/\/abcnotation.com\/blog\/wp-json\/wp\/v2\/media?parent=888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abcnotation.com\/blog\/wp-json\/wp\/v2\/categories?post=888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abcnotation.com\/blog\/wp-json\/wp\/v2\/tags?post=888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}