{"id":1631,"date":"2020-04-17T23:16:27","date_gmt":"2020-04-17T22:16:27","guid":{"rendered":"https:\/\/ofalcao.pt\/blog\/?p=1631"},"modified":"2020-04-19T21:26:19","modified_gmt":"2020-04-19T20:26:19","slug":"my-first-midi-instrument","status":"publish","type":"post","link":"https:\/\/ofalcao.pt\/blog\/2020\/my-first-midi-instrument","title":{"rendered":"My first MIDI instrument"},"content":{"rendered":"<div class=\"seriesmeta\">This post is part 3 of 6 of \u00a0<a href=\"https:\/\/ofalcao.pt\/blog\/series\/lego-ipmidi\" class=\"series-359\" title=\"LEGO ipMIDI\">LEGO ipMIDI<\/a><\/div>\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"LEGO MINDSTORMS MIDI instrument\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/JktQ1-L786A?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>And here it is, the first working MIDI instrument:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>2 MINDSTORMS EV3<\/li><li>multimidicast running on each EV3 and on my laptop<\/li><li>aMIDIcat running on each EV3 listening from a named pipe<\/li><li>pybricks-micropython script running on each EV3, scanning the status of the touch sensors and sending MIDI  commands (note ON\/OFF) to the named pipe<\/li><li>Timidity++ and Rosegarden receiving and playing the MIDI commands<\/li><li>Sound Bank: General MIDI by D. Michael McIntyre, Program 89 &#8211; Pad 1 (new age)<\/li><\/ul>\n\n\n\n<p>The source code is <a href=\"https:\/\/github.com\/JorgePe\/multicastMIDI-EV3\">available<\/a> at github. If using more than one EV3 to extend the number of &#8216;keys&#8217; just define each note here:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># notes associated to each sensor\nmy_notes = [midi_notes.C4, midi_notes.D4, midi_notes.E4, midi_notes.F4]<\/pre>\n\n\n\n<p>so if using 2x EV3 with a total of 8 touch sensors to produce a full octave (a requirement of my wife to be able to play &#8220;Happy Birthday&#8221; that needs two different C&#8217;s) the second one will have:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># notes associated to each sensor\nmy_notes = [midi_notes.G4, midi_notes.A4, midi_notes.B4, midi_notes.C5]<\/pre>\n\n\n\n<p>While recording the above video with my Android phone I noticed that I got much more stuck notes than when not. It looks like the phone being to close to the &#8220;intrument&#8221; degrades the multicast experience. So I am now reading TouchDAW&#8217;s <a href=\"https:\/\/xmmc.de\/touchdaw\/faqs.htm\">FAQ<\/a> and <a href=\"https:\/\/xmmc.de\/touchdaw\/man_network.htm\">network tips<\/a> and also searching for other clues related to midicast problems in Wi-Fi as it looks like that Wi-Fi routers don&#8217;t handle it like Ethernet routers do. So this may help:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>turning off Bluetooth everywhere [I have some doubts but]<\/li><li>turning off all unnecessary Wi-Fi devices<\/li><li>&#8230; or even better, get a dedicated Wi-Fi router<\/li><li>&#8230; or even better [if it works] get a USB to Ethernet adapter for each EV3 and ditch Wi-Fi<\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"seriesmeta\">This post is part 3  of 6 of \u00a0<a href=\"https:\/\/ofalcao.pt\/blog\/series\/lego-ipmidi\" class=\"series-359\" title=\"LEGO ipMIDI\">LEGO ipMIDI<\/a><\/div><p>And here it is, the first working MIDI instrument: 2 MINDSTORMS EV3 multimidicast running on each EV3 and on my laptop aMIDIcat running on each EV3 listening from a named pipe pybricks-micropython script running on each EV3, scanning the status of the touch sensors and sending MIDI commands (note ON\/OFF) to the named pipe Timidity++ &hellip; <a href=\"https:\/\/ofalcao.pt\/blog\/2020\/my-first-midi-instrument\" class=\"more-link\">Continuar a ler<span class=\"screen-reader-text\"> &#8220;My first MIDI instrument&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","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":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[],"series":[359],"class_list":["post-1631","post","type-post","status-publish","format-standard","hentry","category-sem-categoria","series-lego-ipmidi"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2Mhyv-qj","_links":{"self":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts\/1631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/comments?post=1631"}],"version-history":[{"count":0,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts\/1631\/revisions"}],"wp:attachment":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/media?parent=1631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/categories?post=1631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/tags?post=1631"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/series?post=1631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}