Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: MIDI Basics

  1. #1

    MIDI Basics

    I need a little help on some basic MIDI stuff so I can better understand what's happening under the hood. I am creating a device using a Teensy 3.2 that receives MIDI events (namely note on and note off) and uses the info to control a strip of LEDs. What I'm wondering is where does the timing happen? Is the MIDI stream buffered in the Teensy which then handles the events based on timing information it receives, or does the sending device, (in this case my PC playing a MIDI file), control the timing and only send the events when they occur? My limited understanding is that MIDI has no concept of note duration with regard to the length of a beat, (i.e. play a quarter note), but relies on note on and note off events which clearly have to be timed somewhere by some process.

    I have the prototype working but there are a couple of ways I can proceed - either have the Teensy as a MIDI device as it is programmed now, or just control the Teensy with a simple Serial protocol from my application, (which will have access to the note on and note off events). I think there are pros and cons to both approaches dependent on the eventual complexities that might be introduced to my application, so this simple nugget of information could better inform my ultimate decision. Thanks!!

  2. #2
    Senior Member
    Join Date
    Aug 2019
    Location
    Melbourne Australia
    Posts
    160
    Midi messages are sent as and when they need to occur so look in File>Examples>Teensy>USB_MIDI>InputFunctionsBasic for clues.

    For some reading material, websearch:-

    https://learn.sparkfun.com/tutorials/midi-tutorial/all

    "Arduino Music and Audio Projects" by Mike Cook.

    "Arduino for musicians" by Brent Edstrom.

    Most of all Have fun with it. Cheers.

  3. #3
    Thanks for the reply! That SparkFun tutorial gave me lots of helpful info and I think you've probably saved me three months of work. I'm scrapping my original Java application and just building the hardware side of things as a MIDI device. It works as-is with MuseScore which gives me most of the functionality I was after. Any additional functionality that falls outside of MuseScore I can implement with SysEx commands from a much simpler application than I had originally intended.

  4. #4
    Senior Member
    Join Date
    Aug 2019
    Location
    Melbourne Australia
    Posts
    160
    Your feedback is much appreciated, thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •