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

Thread: MIDI Sequencer

  1. #1

    MIDI Sequencer

    Hi all,

    Been looking around for some information relating to writing some code for a MIDI sequencer, and have come across some pieces however nothing in particular in regards to how it would work and how to set up, or even write the logic required.

    Does anyone have any ideas or could point me in the right direction of where to start? Anyone developed something similar before?


  2. #2
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Isle in the Salish Sea
    The MIDI part is easy... the sequencing part is potentially very complex.

    First step would be to decide how you interface should work.... knobs, sliders, button matrix?

    This library looks interesting and might make your project a little more easily achievable:

    It appears to support shuffle, arbitrary loop lengths, dynamic tempo, and MIDI clock.

  3. #3
    Thanks for that Oddson. I have looked at that library which seems rather detailed, however am unable to even compile the 'Neo_mpr121' example due to the following not being declared:

    MIDIEvent event = {command, combined, arg1, arg2};

  4. #4
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Isle in the Salish Sea
    I'm not great with library dependencies so I'm not sure how the midi part is meant to work in standard Ardunio but this is the part you need to change to Teensydunio's usbMIDI commands anyway.

    I think the lack of a generic and public usbMIDI.send() command may complicate this... some conditional logic could translate to note-on and note-off commands or there may be a way to use the private and generic internal 'send' function from the usbMIDI library instead.

    I'm away from my Teensy setup over the holidays so I can't really help with that right now.

    An easier solution is to call note-on and -off directly instead of having an internal 'midi' function.

    You would just replace the calling commands

    midi(channel, 0x9, pitch[i], vel[i]);  // with usbMIDI.usbMIDI.sendNoteOn(pitch[i], vel[i], channel);
    midi(channel, 0x8, pitch[i], vel[i]); //  with usbMIDI.usbMIDI.sendNoteOff(pitch[i], vel[i], channel);
    And maybe start with the basic example... are you intending to mix with neopixels?

Posting Permissions

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