{"id":490,"date":"2026-04-01T10:02:51","date_gmt":"2026-04-01T10:02:51","guid":{"rendered":"https:\/\/ministryoftunes.com\/121-learning\/?p=490"},"modified":"2026-04-21T14:40:10","modified_gmt":"2026-04-21T14:40:10","slug":"introduction-to-midi-programming","status":"publish","type":"post","link":"https:\/\/ministryoftunes.com\/121-learning\/introduction-to-midi-programming\/","title":{"rendered":"Introduction to MIDI Programming"},"content":{"rendered":"<p>Introduction to Midi Programming<\/p>\n<h2>Intro &#8211; Format of Midi Messages<\/h2>\n<p>MIDI (Musical Instrument Digital Interface) messages consist of a header and a data part. The format is as follows:<\/p>\n<p><strong>Header<\/strong><\/p>\n<ol>\n<li><strong>Status byte<\/strong>: This 1-byte value indicates the type of message being sent:\n<ul>\n<li><code>0x80-0xF7<\/code>: Control Change, Pitch Bend, or Program Change (CC, PB, PC)<\/li>\n<li><code>0xF8-0xF9<\/code>: Note On, Note Off, or Poly Aftertouch (NO, NOF, PAF)<\/li>\n<li><code>0xFA-0xFC<\/code>: System Exclusive, Meta Event, or Timing Clock (SX, ME, TC)<\/li>\n<\/ul><\/li>\n<li><strong>Channel<\/strong>: This 1-byte value specifies the MIDI channel (1-16) for messages that affect multiple channels.<\/li>\n<\/ol>\n<p><strong>Data Part<\/strong><\/p>\n<p>The data part varies depending on the status byte:<\/p>\n<h3>Control Change (CC), Pitch Bend (PB), and Program Change (PC)<\/h3>\n<ul>\n<li><code>0x00-0x7F<\/code>: Control number (e.g., volume, pan)<\/li>\n<li><code>0x80-0xFF<\/code>: Value of the control (0-127) or pitch bend amount (0-16383)<\/li>\n<\/ul>\n<h3>Note On (NO), Note Off (NOF), and Poly Aftertouch (PAF)<\/h3>\n<ul>\n<li><code>0x00-0x7F<\/code>: Note number (0-127)<\/li>\n<li><code>0x80-0xFF<\/code>: Velocity (0-127) for Note On and Note Off, or aftertouch pressure (0-127) for Poly Aftertouch<\/li>\n<\/ul>\n<h3>System Exclusive (SX), Meta Event (ME), and Timing Clock (TC)<\/h3>\n<p>These messages typically contain a variable-length data payload that&#8217;s specific to the system or device.<\/p>\n<p><strong>Example MIDI Message<\/strong><\/p>\n<p>Here&#8217;s an example of a Note On message:<\/p>\n<pre><code>Status byte: 0x90 (Note On, channel 1)\nChannel: 0x00 (channel 1)\nData part:\n    * Note number: 0x3C (Middle C)\n    * Velocity: 0x40 (medium velocity)\n\nMIDI message: 0x90 00 3C 40<\/code><\/pre>\n<p>Keep in mind that this is a simplified example, and actual MIDI messages can be more complex, depending on the specific device or system being used.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction to Midi Programming Intro &#8211; Format of Midi Messages MIDI (Musical Instrument Digital Interface) messages consist of a header and a data part. The format is as follows: Header Status byte: This 1-byte value&hellip;<\/p>","protected":false},"author":1,"featured_media":424,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","dsgo_overlay_header":false,"dsgo_overlay_header_text_color":"","dsgo_overlay_skip_top_bar":false,"_designsetgo_exclude_llms":false,"footnotes":""},"categories":[19,11,2,63],"tags":[33,24,28,8,75,59],"class_list":["post-490","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-audio-engineering","category-midi","category-music-technology","category-synth-school","tag-dsp","tag-engineering","tag-microcontrollers","tag-midi","tag-programming","tag-tips"],"_links":{"self":[{"href":"https:\/\/ministryoftunes.com\/121-learning\/wp-json\/wp\/v2\/posts\/490","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ministryoftunes.com\/121-learning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ministryoftunes.com\/121-learning\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ministryoftunes.com\/121-learning\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ministryoftunes.com\/121-learning\/wp-json\/wp\/v2\/comments?post=490"}],"version-history":[{"count":0,"href":"https:\/\/ministryoftunes.com\/121-learning\/wp-json\/wp\/v2\/posts\/490\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ministryoftunes.com\/121-learning\/wp-json\/wp\/v2\/media\/424"}],"wp:attachment":[{"href":"https:\/\/ministryoftunes.com\/121-learning\/wp-json\/wp\/v2\/media?parent=490"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ministryoftunes.com\/121-learning\/wp-json\/wp\/v2\/categories?post=490"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ministryoftunes.com\/121-learning\/wp-json\/wp\/v2\/tags?post=490"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}