element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
MusicTech
  • Challenges & Projects
  • Design Challenges
  • MusicTech
  • More
  • Cancel
MusicTech
Blog PlectralEFFECTS - Class compliant driverless MIDI
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 4 Apr 2016 2:21 PM Date Created
  • Views 540 views
  • Likes 2 likes
  • Comments 0 comments
  • mtc
  • plectraleffects
  • musictech design challenge
  • musictech
Related
Recommended

PlectralEFFECTS - Class compliant driverless MIDI

Former Member
Former Member
4 Apr 2016

Project Update

 

I have had success with an objective of using the steel strings of my electric guitar to feed in MIDI to the DAW over USB.  Furthermore, with class-compliant MIDI, it means it should work on Apple image

I do not actually own any Apples to test it on, but I hear that if it works on Apple -- it is a benefit to any resulting end product's communicability.

 

 

 

Video Demonstration

 

Please feel free to watch this brief video overview.  There are still tweaks to be made to the software, and a housing to be added.  I have all the parts and most of the code ready for the next post.  I will also do some micro posts along the way in the next few days as general updates (for what otherwise would be regarded as full content posts).

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

 

 

LeoStick (ATmega32U4) Code

 

The code running on the LeoStick below, I used Arduino IDE 1.6.7  :

 

// PlectralEFFECTS

// Include the Bounce2 library found here :
// https://github.com/thomasfredericks/Bounce2
#include <Bounce2.h>

#define BUTTON_PIN_1 0
#define BUTTON_PIN_2 1


#define LED_PIN 13

// Instantiate a Bounce object
Bounce debouncer1 = Bounce(); 
Bounce debouncer2 = Bounce(); 


void noteOn(byte channel, byte pitch, byte velocity) {
  MIDIEvent noteOn = {0x09, 0x90 | channel, pitch, velocity};
  MIDIUSB.write(noteOn);
}

void noteOff(byte channel, byte pitch, byte velocity) {
  MIDIEvent noteOff = {0x08, 0x80 | channel, pitch, velocity};
  MIDIUSB.write(noteOff);
}


void controlChange(byte channel, byte control, byte value) {
  MIDIEvent event = {0x0B, 0xB0 | channel, control, value};
  MIDIUSB.write(event);
}

bool value1state=false;
bool value2state=false;

void loop() {
  debouncer1.update();
  debouncer2.update();

  int value1 = debouncer1.read();
  int value2 = debouncer2.read();

  // Turn on the LED if either button is pressed :
  if ( value1 == LOW ) {
    digitalWrite(LED_PIN, HIGH );
    if (!value1state)
    {
    noteOn(0, 48, 64);   // Channel 0, middle C, normal velocity
    MIDIUSB.flush();
    value1state=true;
    }
  } 
  else {
    digitalWrite(LED_PIN, LOW );
    if (value1state)
    {
    noteOff(0, 48, 64);  // Channel 0, middle C, normal velocity
    MIDIUSB.flush();
    value1state=false;
    }
  }

 if (  value2 == LOW ) {
    digitalWrite(LED_PIN, HIGH );
    if (!value2state)
    {
     noteOn(0, 50, 64);   // Channel 0, middle D, normal velocity
     MIDIUSB.flush();
     value2state=true;
    }
  } 
  else {
    digitalWrite(LED_PIN, LOW );
    if (value2state)
    {    
     noteOff(0, 50, 64);  // Channel 0, middle D, normal velocity
     MIDIUSB.flush();
     value2state=false;
    }
  }

  // controlChange(0, 10, 65); // Set the value of controller 10 on channel 0 to 65
}

void setup() {
  // Setup the first button with an internal pull-up :
  pinMode(BUTTON_PIN_1,INPUT_PULLUP);
  debouncer1.attach(BUTTON_PIN_1);
  debouncer1.interval(5); // interval in ms
  
   // Setup the second button with an internal pull-up :
  pinMode(BUTTON_PIN_2,INPUT_PULLUP);
  debouncer2.attach(BUTTON_PIN_2);
  debouncer2.interval(5); // interval in ms


  //Setup the LED :
  pinMode(LED_PIN,OUTPUT);
}

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube