{"id":641,"date":"2018-03-09T06:08:01","date_gmt":"2018-03-09T06:08:01","guid":{"rendered":"http:\/\/netpipe.ca\/?page_id=641"},"modified":"2019-01-11T00:20:48","modified_gmt":"2019-01-11T00:20:48","slug":"midi-shoes","status":"publish","type":"page","link":"https:\/\/netpipe.ca\/?page_id=641","title":{"rendered":"midi shoes"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-642\" src=\"http:\/\/netpipe.ca\/wp-content\/uploads\/2018\/03\/out-300x169.jpg\" alt=\"\" width=\"1104\" height=\"622\" srcset=\"https:\/\/netpipe.ca\/wp-content\/uploads\/2018\/03\/out-300x169.jpg 300w, https:\/\/netpipe.ca\/wp-content\/uploads\/2018\/03\/out-768x432.jpg 768w, https:\/\/netpipe.ca\/wp-content\/uploads\/2018\/03\/out-1024x576.jpg 1024w, https:\/\/netpipe.ca\/wp-content\/uploads\/2018\/03\/out.jpg 1280w\" sizes=\"auto, (max-width: 1104px) 100vw, 1104px\" \/><\/p>\n<p>a inductive distance sensor, optical sensors or vibration sensors for triggering would probably work better, the peizo&#8217;s had a hard time picking up the taps.<\/p>\n<p>also a good practice for quick foot movements or other musical tasks is foot wiggling if you can practice at home and resist the urge to do it in public untill you know how it looks. wiggle the big toe fast as you can to get better too sometimes it helps to put your smaller toe over the bigger toe. up and down toe\/heal tap or over the other knee side side to side(probably easiest to get fast musical recording movements with ?).<\/p>\n<p>updates later, basic midi note triggering.<\/p>\n<p>\/*<br \/>\nMIDI note player<\/p>\n<p>This sketch shows how to use the serial transmit pin (pin 1) to send MIDI note data.<br \/>\nIf this circuit is connected to a MIDI synth, it will play the notes<br \/>\nF#-0 (0x1E) to F#-5 (0x5A) in sequence.<\/p>\n<p>The circuit:<br \/>\n&#8211; digital in 1 connected to MIDI jack pin 5<br \/>\n&#8211; MIDI jack pin 2 connected to ground<br \/>\n&#8211; MIDI jack pin 4 connected to +5V through 220 ohm resistor<br \/>\n&#8211; Attach a MIDI cable to the jack, then to a MIDI synth, and play music.<\/p>\n<p>created 13 Jun 2006<br \/>\nmodified 13 Aug 2012<br \/>\nby Tom Igoe<\/p>\n<p>This example code is in the public domain.<\/p>\n<p>http:\/\/www.arduino.cc\/en\/Tutorial\/Midi<br \/>\n*\/<br \/>\nconst int ledPin = 13;<br \/>\nconst int knockSensor0 = A0;<br \/>\nconst int knockSensor1 = A1;<br \/>\nconst int threshold0 = 1000;<br \/>\nconst int threshold1 = 500;<br \/>\nconst int knockSensor2 = A2;<br \/>\nconst int knockSensor3 = A3;<br \/>\nconst int threshold2 = 1000;<br \/>\nconst int threshold3 = 500;<\/p>\n<p>int sensorReading0 = 0;<br \/>\nint sensorReading1 = 1;<br \/>\nint sensorReading2 = 2;<br \/>\nint sensorReading3 = 3;\/\/ variable to store the value read from the sensor pin<br \/>\nint ledState = LOW;<\/p>\n<p>void setup() {<br \/>\n\/\/ Set MIDI baud rate:<br \/>\npinMode(ledPin, OUTPUT); \/\/ declare the ledPin as as OUTPUT<br \/>\nSerial.begin(9600);<br \/>\n}<\/p>\n<p>void loop() {<\/p>\n<p>sensorReading0 = analogRead(knockSensor0);<br \/>\nsensorReading1 = analogRead(knockSensor1);<br \/>\nsensorReading2 = analogRead(knockSensor2);<br \/>\nsensorReading3 = analogRead(knockSensor3);<br \/>\n\/\/ if the sensor reading is greater than the threshold:<\/p>\n<p>if (sensorReading0 &gt;= threshold0)<br \/>\n{<\/p>\n<p>\/\/ play notes from F#-0 (0x1E) to F#-5 (0x5A):<br \/>\n\/\/ for (int note = 0x1E; note &lt; 0x5A; note ++) {<br \/>\n\/\/Note on channel 1 (0x90), some note value (note), middle velocity (0x45):<br \/>\n\/\/ noteOn(0x90, note, 0x45);<br \/>\ndelay(80);<br \/>\n\/\/Note on channel 1 (0x90), some note value (note), silent velocity (0x00):<br \/>\n\/\/ noteOn(0x90, note, 0x00);<br \/>\nSerial.println(&#8220;Knock0!&#8221;);<br \/>\n\/\/ }<br \/>\n}<br \/>\nif (sensorReading1 &gt;= threshold1)<br \/>\n{<br \/>\ndelay(80);<br \/>\nSerial.println(&#8220;Knock1!&#8221;);<br \/>\n}<br \/>\nif (sensorReading2 &gt;= threshold2)<br \/>\n{<br \/>\ndelay(80);<br \/>\nSerial.println(&#8220;Knock2!&#8221;);<br \/>\n}<br \/>\nif (sensorReading3 &gt;= threshold3)<br \/>\n{<br \/>\ndelay(80);<br \/>\nSerial.println(&#8220;Knock3!&#8221;);<br \/>\n}<br \/>\n}<\/p>\n<p>\/\/ plays a MIDI note. Doesn&#8217;t check to see that cmd is greater than 127, or that<br \/>\n\/\/ data values are less than 127:<br \/>\nvoid noteOn(int cmd, int pitch, int velocity) {<br \/>\nSerial.write(cmd);<br \/>\nSerial.write(pitch);<br \/>\nSerial.write(velocity);<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>a inductive distance sensor, optical sensors or vibration sensors for triggering would probably work better, the peizo&#8217;s had a hard time picking up the taps. also a good practice for quick foot movements or other musical tasks is foot wiggling if you can practice at home and resist the urge to do it in public [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":27,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-641","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/netpipe.ca\/index.php?rest_route=\/wp\/v2\/pages\/641","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netpipe.ca\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/netpipe.ca\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/netpipe.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netpipe.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=641"}],"version-history":[{"count":9,"href":"https:\/\/netpipe.ca\/index.php?rest_route=\/wp\/v2\/pages\/641\/revisions"}],"predecessor-version":[{"id":2311,"href":"https:\/\/netpipe.ca\/index.php?rest_route=\/wp\/v2\/pages\/641\/revisions\/2311"}],"up":[{"embeddable":true,"href":"https:\/\/netpipe.ca\/index.php?rest_route=\/wp\/v2\/pages\/27"}],"wp:attachment":[{"href":"https:\/\/netpipe.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}