Skip to content
Snippets Groups Projects
Commit 1ef71125 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

Merge branch 'aggraef/purr-data-midiclkin-fix'

parents fde36796 ce847ae6
No related branches found
No related tags found
No related merge requests found
...@@ -291,6 +291,7 @@ typedef struct midiparser ...@@ -291,6 +291,7 @@ typedef struct midiparser
/* functions in x_midi.c */ /* functions in x_midi.c */
void inmidi_realtimein(int portno, int cmd); void inmidi_realtimein(int portno, int cmd);
void inmidi_clk(double timing);
void inmidi_byte(int portno, int byte); void inmidi_byte(int portno, int byte);
void inmidi_sysex(int portno, int byte); void inmidi_sysex(int portno, int byte);
void inmidi_noteon(int portno, int channel, int pitch, int velo); void inmidi_noteon(int portno, int channel, int pitch, int velo);
...@@ -313,7 +314,17 @@ static void sys_dispatchnextmidiin( void) ...@@ -313,7 +314,17 @@ static void sys_dispatchnextmidiin( void)
outlet_setstacklim(); outlet_setstacklim();
if (byte >= 0xf8) if (byte >= 0xf8)
{
inmidi_realtimein(portno, byte); inmidi_realtimein(portno, byte);
if (byte == 0xf8) {
// AG: Not sure what the timebase for the right outlet is supposed
// to be. I'm using msecs right now, which is in line with the other
// tempo-related objects such as metro. Multiply with .001 to
// get seconds instead.
double timing = clock_gettimesince(sys_midiinittime);
inmidi_clk(timing);
}
}
else else
{ {
inmidi_byte(portno, byte); inmidi_byte(portno, byte);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment