{"id":897,"date":"2014-12-28T21:54:36","date_gmt":"2014-12-29T04:54:36","guid":{"rendered":"http:\/\/canadiangeek.net\/?page_id=897"},"modified":"2016-04-08T12:08:21","modified_gmt":"2016-04-08T19:08:21","slug":"player-piano","status":"publish","type":"page","link":"https:\/\/canadiangeek.net\/?page_id=897","title":{"rendered":"Player Piano"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" aligncenter\" src=\"https:\/\/hackadaycom.files.wordpress.com\/2014\/12\/piano-header.jpg?w=800\" alt=\"\" width=\"501\" height=\"249\" \/><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/hackaday.com\/2014\/12\/25\/making-a-player-piano-talk-midi\/\" target=\"_blank\">http:\/\/hackaday.com\/2014\/12\/25\/making-a-player-piano-talk-midi\/<\/a><\/p>\n<p style=\"text-align: left;\">Take a player piano, &lt;$300 on Kijij.ca.\u00a0 replace the foot peddles with a vacuum pump.\u00a0 Remove the vacuum tubes that route to the sheet music mechanism.\u00a0 Attach a series of pneumatic air valves to these lines, run these off an Arduino with some code to process Midi and bobs your uncle.<\/p>\n<p style=\"text-align: left;\">Now if only i could find a cool looking player piano that didn't look like it was from the 1800's<\/p>\n<p style=\"text-align: left;\">My only requirement is that it would be able to play this Black Midi song.<\/p>\n<p><iframe loading=\"lazy\" title=\"Red Zone - John L. Sinnesl\u00f6schen Version\" width=\"550\" height=\"309\" src=\"https:\/\/www.youtube.com\/embed\/CDNRCHX9oTg?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><\/p>\n<p>MIDI itself does not make sound, it is just a series of messages like \"note on,\" \"note off,\" \"note\/pitch,\" \"pitchbend,\" and\u00a0velocity. \u00a0I think this would be easy to convert to the physical world. \u00a0Note on and Note off are pretty easy to understand, velocity could be the air pressure that we let though the valve (we could PWM a solonoid), i imaging that pitch bending we just ignore.<\/p>\n<p>MIDI note 60 is middle C (C4).<\/p>\n<p>When a key is pressed the keyboard creates a \"<strong>note on<\/strong>\" message.\u00a0 This message consists of two pieces of information: which key was pressed (called \"note\") and how fast it was pressed (called \"velocity\").<\/p>\n<p>\"<strong>Note<\/strong>\" describes the pitch of the pressed key with a value between 0 and 127.\u00a0 I've copied the table in fig 2 from <a href=\"http:\/\/itp.nyu.edu\/physcomp\/Tutorials\/MusicalArduino\">NYU's website<\/a>, it lists all the MIDI notes and their standard musical notation equivalents.\u00a0 You can see that MIDI note 60 is middle C (C4).<\/p>\n<p>\"<strong>Velocity<\/strong>\" is a number between 0 and 127 that is usually used to describe the volume (gain) of a MIDI note (higher velocity = louder).\u00a0 Sometimes different velocities also create different <a href=\"http:\/\/en.wikipedia.org\/wiki\/Timbre\">timbres<\/a> in an instrument; for example, a MIDI flute may sound more frictional at a higher velocity (as if someone was blowing into it strongly), and more sinusoidal\/cleaner sounding at lower velocities.\u00a0 Higher velocity may also shorten the attack of a MIDI instrument.\u00a0 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Attack_%28music%29#ADSR_envelope\">Attack<\/a> is a measurement of how long it takes for a sound to go from zero to maximum loudness.\u00a0 For example, a violin playing quick, staccato notes has a must faster attack than longer, sustained notes.<br \/>\nsomething to remember- not all keyboards are velocity sensitive, if you hear no difference in the sound produced by a keyboard no matter how hard you hit the keys, then you are not sending variable velocity information from that instrument.\u00a0 Computer keyboards are not velocity sensitive, if you are using your computer's keys to play notes into a software sequencer, all the notes will have the same velocity.<\/p>\n<p>When a key is released the keyboard creates another MIDI message, a \"<strong>note off<\/strong>\" message.\u00a0 These messages also contain \"note\" information to ensure that it is signalling the end of the right MIDI note.\u00a0 This way if you are pressing two keys at once and release once of them, the note off message will not signal the end of both notes, only the one you've released.\u00a0 Sometimes note off messages will also contain velocity information based on how quickly you've released the key.\u00a0 This may tell a MIDI instrument something about how quickly it should dampen the note.<\/p>\n<p>\"<strong>Aftertouch<\/strong>\" is the force used to press down a key after it has been initially struck, think of it as pressure sensitivity.\u00a0 Like velocity, aftertouch ranges from 0 to 127.\u00a0 Aftertouch may be interpreted by a MIDI instrument in a variety of ways; it may affect the volume, timbre, vibrato... you will have to experiment with your own setup to get a feel for what expression you can achieve with aftertouch.\u00a0 Keep in mind that not all electronic keyboards are capable of producing aftertouch messages and not all MIDI instruments support them.\u00a0 The MIDI instruments inside GarageBand do not support aftertouch, but many of the MIDI instruments in more sophisticated software like Ableton, Reason, etc, do.\u00a0 Like velocity, aftertouch messages always have a note associated with them, this means you can send an individual aftertouch message for each of your keys.<br \/>\nHere's a good article on Wikipedia about various types of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Keyboard_expression\">keyboard expression<\/a>, including aftertouch and velocity.<\/p>\n<p>You may also have a <strong>pitchbend<\/strong> wheel\/slider attached to your MIDI keyboard, this will shift the pitch of whatever notes you are currently playing up or down by less than a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Semitone\">semitone<\/a>.\u00a0 Your pitchbend wheel\/slider probably generates pitchbend values from 0-127 (where 64 = no pitchbend), but some high res devices will generate values from 0-16,383 (where 8192 = no pitchbend).\u00a0 Pitchbend does not have a note associated with it, this means that pitchbend is applied equally to every note you're playing. \u00a0Pitchbend,\u00a0is how we know the difference between an A and an A# or an A flat.<\/p>\n<p>MIDI messages can be sent on 16 different <strong>channels<\/strong> as well.\u00a0 Channels are useful for sending certain notes and messages to one MIDI instrument and other notes\/messages to another MIDI instrument.\u00a0 Usually, separate MIDI channels are used for different sounding instruments to create a multitracked song, channel 0 might be a piano-sounding instruments, and channel 1 could be a guitar sound. \u00a0I could set it up to merge all channels into one channel or potentially just set it up to play one specific channel or maybe give the ability to disable specific channels.<\/p>\n<p><a href=\"http:\/\/www.instructables.com\/id\/Send-and-Receive-MIDI-with-Arduino\/step6\/Basic-Note-On-Note-Off-with-Arduino\/\">http:\/\/www.instructables.com\/id\/Send-and-Receive-MIDI-with-Arduino\/step6\/Basic-Note-On-Note-Off-with-Arduino\/<\/a><\/p>\n<p>Velocity is often\u00a0set back to 0 when the note off message is\u00a0sent. This is because a MIDI message with a note on command and velocity 0 is the same as a note off message. Sometimes when a software MIDI environment receives a note off message it will automatically translate it into a note on message with velocity 0 because they are the same. You will probably find that it is easier to program MIDI by sending these note on\/velocity=0 messages rather than sending note off.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n ","protected":false},"excerpt":{"rendered":"<p>&nbsp; http:\/\/hackaday.com\/2014\/12\/25\/making-a-player-piano-talk-midi\/ Take a player piano, &lt;$300 on Kijij.ca.\u00a0 replace the foot peddles with a vacuum pump.\u00a0 Remove the vacuum tubes that route to the sheet music mechanism.\u00a0 Attach a series of pneumatic air valves to these lines, run these off an Arduino with some code to process Midi and bobs your uncle. Now if [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":490,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-897","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/canadiangeek.net\/index.php?rest_route=\/wp\/v2\/pages\/897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/canadiangeek.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/canadiangeek.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/canadiangeek.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/canadiangeek.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=897"}],"version-history":[{"count":9,"href":"https:\/\/canadiangeek.net\/index.php?rest_route=\/wp\/v2\/pages\/897\/revisions"}],"predecessor-version":[{"id":1166,"href":"https:\/\/canadiangeek.net\/index.php?rest_route=\/wp\/v2\/pages\/897\/revisions\/1166"}],"up":[{"embeddable":true,"href":"https:\/\/canadiangeek.net\/index.php?rest_route=\/wp\/v2\/pages\/490"}],"wp:attachment":[{"href":"https:\/\/canadiangeek.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}