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

Thread: MIDI Sync Teensy with DAW

  1. #1
    Junior Member
    Join Date
    Nov 2016
    Location
    Germany
    Posts
    8

    MIDI Sync Teensy with DAW

    Hello everyone,

    I'm currently working on a MIDI project with the Teensy 3.2.
    I just finished implementing MIDI clock sync. However while developing two question came to my mind and I would like to know if someone can help me on them:

    1. I use Ableton Live as DAW (as clock source). In the picture below you see the status bar of the clock in Ableton. The orange square at the bottom left corner indicates that right now there's a 1/4th tick of the clock. My teensy syncs to that. However above you can see a grey square which I highlighted in yellow. On all proper MIDI devices that I'm using with my DAW this is lighting up like a feedback for the clock of the MIDI device. I now ask myself how I can possibly trigger this feedback from within the Teensy (so both lights blink in the same time). I'm not very deep into MIDI messages that's why I might just not know which kind of message the DAW expects to receive.

    Name:  sync.jpg
Views: 126
Size:  15.5 KB

    2. Is it possible that the
    Code:
    usbMIDI.setHandleStart(myStart);
    event is triggered with a little delay? Because my clock runs quiet nicely in sync. However the first beat (the start) is always a little delayed. Like a 1/32th or so.

    Thanks already for you help!
    Last edited by binux; 02-03-2018 at 10:28 AM. Reason: fixed some typos

  2. #2
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,107
    Is it just the initial start which is delayed? is the delay constant or does it vary? if you pause and then resume the clock, do you still have the delay?

    Are you using DIN MIDI, or MIDI over USB?

    Please post a minimal, but self contained, program containing your clock handlers (make them toggle the Teensy built-in LED, or something) so others can run your program and compare their result to yours.

  3. #3
    Junior Member
    Join Date
    Nov 2016
    Location
    Germany
    Posts
    8
    It's every time. Ableton does not send a "Pause" signal. Either it's start or it's stop.

    I'm using the integrated USB Midi library provided with the teensy.

    Code:
    void setup() {
     usbMIDI.setHandleStart(extStart);
    }
    
    void extStart(){
     usbMIDI.sendNoteOn(60, 127, 1);
     delay(10);
     usbMIDI.sendNoteOff(60, 127, 1);
    }
    The above example should illustrate what I mean. However you will need a DAW to record the midi notes for this. You will never be able to tell the offset if you are using an LED since you have no zero reference.
    The timings to vary a little which is to be expected if you're using the MIDIClock. However the offset to the start signal is far too big.

    In the image below the value should go to 127 at start.
    However the "start" signal seems to appear quiet delayed.

    Click image for larger version. 

Name:	sync_2.jpg 
Views:	30 
Size:	18.1 KB 
ID:	12835

Posting Permissions

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