{"id":133,"date":"2013-07-15T17:47:09","date_gmt":"2013-07-15T17:47:09","guid":{"rendered":"http:\/\/lifeorange.com\/Art122\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-15-at-10.46.48-AM.png"},"modified":"2013-07-15T17:47:09","modified_gmt":"2013-07-15T17:47:09","slug":"screen-shot-2013-07-15-at-10-46-48-am","status":"inherit","type":"attachment","link":"https:\/\/lifeorange.com\/Art122\/?attachment_id=133","title":{"rendered":"&#8220;MIDI LED Matrix&#8221; &#8211; Diego Casillas"},"author":1,"comment_status":"open","ping_status":"open","template":"","meta":[],"description":{"rendered":"<p class=\"attachment\"><a href='https:\/\/lifeorange.com\/Art122\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-15-at-10.46.48-AM.png'><img width=\"300\" height=\"259\" src=\"https:\/\/lifeorange.com\/Art122\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-15-at-10.46.48-AM-300x259.png\" class=\"attachment-medium size-medium\" alt=\"\" loading=\"lazy\" srcset=\"https:\/\/lifeorange.com\/Art122\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-15-at-10.46.48-AM-300x259.png 300w, https:\/\/lifeorange.com\/Art122\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-15-at-10.46.48-AM.png 597w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>For this project I was inspired by all of the concerts I\u2019ve gone to that had a strong visual component. I saw the band Bon Iver at the Santa Barbara Bowl about a year ago and the mood was perfectly reflected by the visuals and light show. It was so inspiring because it took the music to the next level and created a spectacle, as opposed to just a band playing on a stage. It was one of the most memorable concerts I\u2019ve ever been to. This got me thinking about visual music when it came time to start this project. I liked the idea of controlling multiple parameters of hardware and software with one MIDI signal.<\/p>\n<p>ARDUINO SOURCE CODE:<br \/>\nMIDI Controlled LED Matrix<br \/>\nby Diego Casillas<br \/>\n6\/12\/13<br \/>\nUCSB<\/p>\n<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/MATRIX DEFINITIONS\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\n#include <Adafruit_GFX.h>   \/\/ Core graphics library<br \/>\n#include <RGBmatrixPanel.h> \/\/ Hardware-specific library<\/p>\n<p>#define CLK 8  \/\/ MUST be on PORTB!<br \/>\n#define OE  9<br \/>\n#define LAT 10<br \/>\n#define A   A0<br \/>\n#define B   A1<br \/>\n#define C   A2<br \/>\n#define D   A3<\/p>\n<p>RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false);<br \/>\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/END MATRIX DEFINITIONS\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\n<p>byte incomingByte;<\/p>\n<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/SETUP FUNCTION\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\nvoid setup() {<br \/>\n  \/\/start serial with midi baudrate 31250<br \/>\n  Serial.begin(31250);<br \/>\n  \/\/initialize matrix<br \/>\n  matrix.begin();<br \/>\n}<br \/>\n\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/END SETUP FUNCTION\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\n<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/CORE FUNCTION\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\nvoid loop () {<br \/>\n  if (Serial.available() > 0) { \/\/if there&#8217;s serial data available<br \/>\n    \/\/ read the incoming byte:<br \/>\n    incomingByte = Serial.read();<br \/>\n    if (incomingByte == 144) \/\/ If there&#8217;s a Note On, DO SHIT!<br \/>\n    {<br \/>\n      int x = (random(10));<br \/>\n      int y = (random(10));<br \/>\n      int z = (random(10));<br \/>\n      matrix.fillRect(0, 0, 32, 32, matrix.Color333(x,y,z));<br \/>\n    }<br \/>\n    else if (incomingByte == 128) \/\/ Note off<br \/>\n    {<br \/>\n       matrix.fillRect(0, 0, 32, 32, matrix.Color333(0, 0, 0));<br \/>\n    }<br \/>\n  }<br \/>\n} \/\/END VOID LOOP  <\/p>\n"},"caption":{"rendered":"<p>&#8220;MIDI LED Matrix&#8221; &#8211; Diego Casillas<\/p>\n"},"alt_text":"","media_type":"image","mime_type":"image\/png","media_details":{"width":597,"height":516,"file":"2013\/07\/Screen-Shot-2013-07-15-at-10.46.48-AM.png","sizes":{"thumbnail":{"file":"Screen-Shot-2013-07-15-at-10.46.48-AM-150x150.png","width":150,"height":150,"mime_type":"image\/png","source_url":"https:\/\/lifeorange.com\/Art122\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-15-at-10.46.48-AM-150x150.png"},"medium":{"file":"Screen-Shot-2013-07-15-at-10.46.48-AM-300x259.png","width":300,"height":259,"mime_type":"image\/png","source_url":"https:\/\/lifeorange.com\/Art122\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-15-at-10.46.48-AM-300x259.png"},"full":{"file":"Screen-Shot-2013-07-15-at-10.46.48-AM.png","width":597,"height":516,"mime_type":"image\/png","source_url":"https:\/\/lifeorange.com\/Art122\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-15-at-10.46.48-AM.png"}},"image_meta":{"aperture":0,"credit":"","camera":"","caption":"","created_timestamp":0,"copyright":"","focal_length":0,"iso":0,"shutter_speed":0,"title":""}},"post":127,"source_url":"https:\/\/lifeorange.com\/Art122\/wp-content\/uploads\/2013\/07\/Screen-Shot-2013-07-15-at-10.46.48-AM.png","_links":{"self":[{"href":"https:\/\/lifeorange.com\/Art122\/index.php?rest_route=\/wp\/v2\/media\/133"}],"collection":[{"href":"https:\/\/lifeorange.com\/Art122\/index.php?rest_route=\/wp\/v2\/media"}],"about":[{"href":"https:\/\/lifeorange.com\/Art122\/index.php?rest_route=\/wp\/v2\/types\/attachment"}],"author":[{"embeddable":true,"href":"https:\/\/lifeorange.com\/Art122\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lifeorange.com\/Art122\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=133"}]}}