{"id":354,"date":"2018-04-30T07:32:19","date_gmt":"2018-04-30T13:32:19","guid":{"rendered":"http:\/\/www.infinitewave.ca\/IWBlog\/?p=354"},"modified":"2018-04-30T09:22:41","modified_gmt":"2018-04-30T15:22:41","slug":"midi-hardware-part-1","status":"publish","type":"post","link":"https:\/\/www.infinitewave.ca\/IWBlog\/2018\/04\/30\/midi-hardware-part-1\/","title":{"rendered":"MIDI Hardware &#8211; Part 1"},"content":{"rendered":"<h4>Proof of Concept Summary<\/h4>\n<p>I thought I would start this entry by summarising the results from all of the testing for the auto-locator functions being mimicked by an Arduino Mega.<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Power &#8211;\u00a0<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/check-mark-clip-art-icon-5.png\" alt=\"\" width=\"30\" height=\"27\" \/>Success<\/li>\n<li>Lamps &#8211;\u00a0<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/check-mark-clip-art-icon-5.png\" alt=\"\" width=\"30\" height=\"27\" \/>Success<\/li>\n<li>Switches &#8211; <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/check-mark-clip-art-icon-5.png\" alt=\"\" width=\"30\" height=\"27\" \/>Success<\/li>\n<li>Displays &#8211; <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/check-mark-clip-art-icon-5.png\" alt=\"\" width=\"30\" height=\"27\" \/>Success<\/li>\n<li>Keypad &#8211; <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/check-mark-clip-art-icon-5.png\" alt=\"\" width=\"30\" height=\"27\" \/>Success<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>All functions of the old auto-locators can, indeed, be simulated with the Arduino. I am now moving on to the extra bits required to interface the Arduino with our studio control system.<\/p>\n<p>Our system uses MIDI to control external devices, such as parts of our mastering console, and (very soon) our Crookwood Insert Router. The control software is part of our proprietary mastering software, and every controllable part of our setup can be stored into each project&#8217;s folder and archived with the project. I will be incorporating the functionality and user interface needed to control the MTR-12 into this software.<\/p>\n<p>It is time to add the MIDI hardware, and see how slow the Arduino gets. I think it should be fine but, if it is too slow to be useful, I will switch from using MIDI for this to using a straight serial, or USB, interface. This would be an easy change in both hardware and software. I would very much prefer to keep it MIDI though. I envision incorporating MMC (MIDI Machine Control) into the final version, so that a change in state or position on the DAW (Sequoia,) causes an identical change in state on the MTR-12. Such as, if I hit play on the DAW, the MTR-12 goes into Play mode or, if I go back to the top in the DAW, the MTR-12 returns to zero.<\/p>\n<h4>Parts for the MIDI Input and Output<\/h4>\n<figure id=\"attachment_412\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 310px\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-412 size-medium\" src=\"http:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/IMG_0049-1-300x241.jpg\" alt=\"\" width=\"300\" height=\"241\" srcset=\"https:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/IMG_0049-1-300x241.jpg 300w, https:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/IMG_0049-1-768x617.jpg 768w, https:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/IMG_0049-1-1024x823.jpg 1024w, https:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/IMG_0049-1.jpg 1494w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption class=\"caption wp-caption-text\">Parts for MIDI Interface<\/figcaption><\/figure>\n<p>Conforming to the MIDI 1.0 Specification, and taking into account the way the UARTs are designed on the Arduino, I think that these are all of the parts that I should need to create a functioning MIDI input and MIDI output to interface to the Arduino. I have added these parts and their prices to the <a href=\"http:\/\/www.infinitewave.ca\/IWBlog\/?p=73\">Parts List<\/a> entry in this blog.<\/p>\n<p>&nbsp;<\/p>\n<h4>MIDI Input<\/h4>\n<figure id=\"attachment_408\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 791px\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-408 size-full\" src=\"http:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/MidiInput-1.jpg\" alt=\"\" width=\"781\" height=\"369\" srcset=\"https:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/MidiInput-1.jpg 781w, https:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/MidiInput-1-300x142.jpg 300w, https:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/MidiInput-1-768x363.jpg 768w\" sizes=\"auto, (max-width: 781px) 100vw, 781px\" \/><figcaption class=\"caption wp-caption-text\">MIDI Input Schematic<\/figcaption><\/figure>\n<p>The MIDI input is the more complicated of the two interfaces, although it isn&#8217;t very complex. It requires a jack, three resistors, a diode and an optoisolator. The diode is there to protect the circuit from a cable that has been wired backward. The optoisolator eliminates the electrical connection between the two devices you are connecting together, but passes the data through. The spec says to use a 6N138, so I am. You can use other ones, but then you have to change\/add other components as well, and I have all of these parts kicking around.<\/p>\n<h4>MIDI Output<\/h4>\n<figure id=\"attachment_380\" class=\"thumbnail wp-caption aligncenter\" style=\"width: 401px\"><a href=\"http:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/MidiOutput.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-380 size-full\" src=\"http:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/MidiOutput.jpg\" alt=\"\" width=\"391\" height=\"243\" srcset=\"https:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/MidiOutput.jpg 391w, https:\/\/www.infinitewave.ca\/IWBlog\/wp-content\/uploads\/2018\/04\/MidiOutput-300x186.jpg 300w\" sizes=\"auto, (max-width: 391px) 100vw, 391px\" \/><\/a><figcaption class=\"caption wp-caption-text\">MIDI Output Schematic<\/figcaption><\/figure>\n<p>The MIDI output is very simple when connecting to an Arduino. All I should need is a resistor and a jack. To conform with the spec, you normally use a couple of logic gates on the line from the UART, but I don&#8217;t think these are needed with the Arduino. I should be able to just connect pin 5 on the jack to the TX line on the Arduino, set the baud rate to\u00a031250, and everything should be fine.<\/p>\n<p>I&#8217;m going to build the interface on a small breadboard in the next couple of days. It will swiftly become apparent if I have any wrong-thinking going on.<\/p>\n<p>Stay tuned&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Proof of Concept Summary I thought I would start this entry by summarising the results from all of the testing for the auto-locator functions being mimicked by an Arduino Mega. Power &#8211;\u00a0Success Lamps &#8211;\u00a0Success Switches &#8211; Success Displays &#8211; Success Keypad &#8211; Success All functions of the old auto-locators can, indeed, be simulated with the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-354","post","type-post","status-publish","format-standard","hentry","category-mtr"],"_links":{"self":[{"href":"https:\/\/www.infinitewave.ca\/IWBlog\/wp-json\/wp\/v2\/posts\/354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.infinitewave.ca\/IWBlog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.infinitewave.ca\/IWBlog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.infinitewave.ca\/IWBlog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.infinitewave.ca\/IWBlog\/wp-json\/wp\/v2\/comments?post=354"}],"version-history":[{"count":38,"href":"https:\/\/www.infinitewave.ca\/IWBlog\/wp-json\/wp\/v2\/posts\/354\/revisions"}],"predecessor-version":[{"id":417,"href":"https:\/\/www.infinitewave.ca\/IWBlog\/wp-json\/wp\/v2\/posts\/354\/revisions\/417"}],"wp:attachment":[{"href":"https:\/\/www.infinitewave.ca\/IWBlog\/wp-json\/wp\/v2\/media?parent=354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.infinitewave.ca\/IWBlog\/wp-json\/wp\/v2\/categories?post=354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.infinitewave.ca\/IWBlog\/wp-json\/wp\/v2\/tags?post=354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}