[PD] midi synch strategy

martin.peach at sympatico.ca martin.peach at sympatico.ca
Tue Sep 26 17:58:52 CEST 2006


> 
> De: patco <megalegoland at yahoo.fr>
> Date: 2006/09/26 mar. AM 10:12:01 GMT-04:00
> À: pd-list at iem.at
> Objet: RE : [PD] midi synch strategy
> 
> Hello,
>  some people might be interested about this attached patch for a midi sync.
> 
> [242 0 0( won't work as expected because the second argument is for midi port.
> 

It looks like you have to send single numbers in sequence, like 242 followed by two numbers less than 128. Below is a patch that should do that.
At least [midiout] actually sends the message. For me [midiin], on the other end of the cable, outputs 242 and the right outlet is always 2. I don't know where the data went.

Actually now I do. In the source code s_midi.c, the function sys_dispatchnextmidiin():
                /* other kinds of messages are just dropped here.  We'll
                need another status byte before we start letting MIDI in
                again (no running status across "system" messages). */
            case MIDITIMECODE:     /* 1 data byte*/
                break;
            case MIDISONGPOS:       /* 2 */
                break;
            case MIDISONGSELECT:    /* 1 */
                break;

Martin

#N canvas 519 13 297 272 12;
#X obj 158 161 midiout;
#X floatatom 69 80 5 0 0 0 - - -;
#X floatatom 24 80 5 0 0 0 - - -;
#X obj 20 123 unpack 0 0 0;
#X obj 20 100 pack 0 0 242;
#X floatatom 111 162 5 0 0 0 - - -;
#X floatatom 65 162 5 0 0 0 - - -;
#X floatatom 20 162 5 0 0 0 - - -;
#X floatatom 20 -15 5 0 0 1 position - -;
#X obj 20 33 / 128;
#X obj 65 33 % 128;
#X obj 20 57 % 128;
#X obj 20 9 t f f;
#X connect 3 0 0 0;
#X connect 3 0 7 0;
#X connect 3 1 0 0;
#X connect 3 1 6 0;
#X connect 3 2 0 0;
#X connect 3 2 5 0;
#X connect 4 0 3 0;
#X connect 8 0 12 0;
#X connect 9 0 11 0;
#X connect 10 0 1 0;
#X connect 10 0 4 1;
#X connect 11 0 4 0;
#X connect 11 0 2 0;
#X connect 12 0 9 0;
#X connect 12 1 10 0;



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: midi_song_position_out.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060926/4049dfb1/attachment.asc>


More information about the Pd-list mailing list