I bet someone has already done this but I haven't seen it yet so I figured I'd do it myself. I made an external which lets me send midi clock, start, stop and continue messages out of pd. This way I can sync an external drum-machine, sequencer, etc., to pd.
I've placed the code here: http://x37v.info/projects/puredata/midi_sync_out/code/midi_sync_out.tar.gz
I just wrote it in the last hour or so, and have tested it only with 1 drum machine.. I'm using ALSA for midi, if you're not you'll have to modify the Makefile (I couldn't figure out how to send midi bytes in a generic way as the sys_queuemidimess function is static).
It is a super simple external. I tried for a while to simply use the [midiout] object but I couldn't figure out how to get it to actually output anything. I looked at the pd source code, it looks like there is a little bit of code to send clock out messages but I don't think it is exposed to the user in any object... and I didn't see anything about start/stop/continue messages.
There is a help file which explains the functionality of the object and gives a really basic sync out solution.
Please tell me if this works for you, if this is redundant [encompassed by another project (which you could point me to)], etc.
Thanks, Alex
Hi Alex,
It is a super simple external. I tried for a while to simply use the [midiout] object but I couldn't figure out how to get it to actually output anything. I looked at the pd source code, it looks like there is a little bit of code to send clock out messages but I don't think it is exposed to the user in any object... and I didn't see anything about start/stop/continue messages.
A couple of months ago, I was trying to get raw MIDI out of [midiout] myself. (for Sysex messages in my case)
With some advise from the list, I've learned that for reasons I still don't quite understand, [midiout] was not functioning for a while, then was fixed in relatively recent versions of Pd.
I'd be interested in knowing if you will have better results of recent versions of Pd. Perhaps you can turn your external into an abstraction.
-- David Shimamoto
Hmm.. I am running 0.40-2, I'll try the most recent stable release soon and see if [midiout] works for me... if [midiin] works too.. that be great! (on my current build of pd the clock, start, stop, continue messages don't get delivered through [midiin]).
-Alex
On Tue, Oct 28, 2008 at 6:32 PM, PSPunch shima@pspunch.com wrote:
Hi Alex,
It is a super simple external. I tried for a while to simply use the [midiout] object but I couldn't figure out how to get it to actually output anything. I looked at the pd source code, it looks like there is a little bit of code to send clock out messages but I don't think it is exposed to the user in any object... and I didn't see anything about start/stop/continue messages.
A couple of months ago, I was trying to get raw MIDI out of [midiout] myself. (for Sysex messages in my case)
With some advise from the list, I've learned that for reasons I still don't quite understand, [midiout] was not functioning for a while, then was fixed in relatively recent versions of Pd.
I'd be interested in knowing if you will have better results of recent versions of Pd. Perhaps you can turn your external into an abstraction.
-- David Shimamoto
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
Okay, I just tested this and, yes with 0.41-4 I can get the midi start/stop/continue/clock messages out.. midiin still doesn't get them, but nice, my external can be an abstraction in the newer pd instead!
-Alex
On Tue, Oct 28, 2008 at 7:09 PM, Alex x37v.alex@gmail.com wrote:
Hmm.. I am running 0.40-2, I'll try the most recent stable release soon and see if [midiout] works for me... if [midiin] works too.. that be great! (on my current build of pd the clock, start, stop, continue messages don't get delivered through [midiin]).
-Alex
On Tue, Oct 28, 2008 at 6:32 PM, PSPunch shima@pspunch.com wrote:
Hi Alex,
It is a super simple external. I tried for a while to simply use the [midiout] object but I couldn't figure out how to get it to actually output anything. I looked at the pd source code, it looks like there is a little bit of code to send clock out messages but I don't think it is exposed to the user in any object... and I didn't see anything about start/stop/continue messages.
A couple of months ago, I was trying to get raw MIDI out of [midiout] myself. (for Sysex messages in my case)
With some advise from the list, I've learned that for reasons I still don't quite understand, [midiout] was not functioning for a while, then was fixed in relatively recent versions of Pd.
I'd be interested in knowing if you will have better results of recent versions of Pd. Perhaps you can turn your external into an abstraction.
-- David Shimamoto
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
Alex,
Okay, I just tested this and, yes with 0.41-4 I can get the midi start/stop/continue/clock messages out.. midiin still doesn't get them, but nice, my external can be an abstraction in the newer pd instead!
Nice to know it works (and that I wasn't the only one struggling :)
In case you are interested in looking for the cause, there may be hints in the old thread I mentioned which began here.
http://lists.puredata.info/pipermail/pd-list/2008-05/062536.html
-- David Shimamoto