...that deal with pure data
You are not logged in.
I want to controll the speed of a metronome with midi sync, how should i do?
I have searched the forums and googled but can't find a good answer how to do this and the documentation for midi in messages is kinda sparse.
Also since its my first message i guess i should say hi:
Hi everyone!
Offline
Hello jade,
There's a [midirealtimein] object for that. You might have to ask a few people who've used it exactly how it works. Remember there are three ways of doing things, a resynced metro that freeruns and gets re-triggered every so often, using midi clock as the timer to make bangs, and using midi-timecode to give you a song position.
Offline
HI Jade
If you have the latest autobuild of Pd 0.40.3-extended then this will give you the correct [midirealtimein]. By correct I mean one that works properly and that spits out coherent values.
WHen you've set up all the IAC busses and your clock source is running, the left outlet of [midirealtimein] spits out the number 248 at 24 times per beat. (248 is the midi message for 'clock'. 250 is start. 252 is stop)
To tap this usefully do this:
-You need to work at intervals of 0, 24, 48, 72 [sel 0 24 48 72]
-a counter that goes from 0 to 96
-a reset mechanism to forces counter back to 0 if source clock is stopped.
The attached patch explains it better.
Useful to note, the less latency you set for Pd, the more accurate midi will be. Midi messages move with audio blocks in Pd. Also, if you use Jack on OSX you'll get better performance at low latency sizes
as a reference...
http://www.borg.com/~jglatt/tech/midispec/clock.htm
Offline
hey thanks boonier. i didn't think midi sync was going to work for me, but it just did and all thanks to you and this patch. cheers.
Offline
no probs :) what did you end up syncing, and is it quite tight sync?
cheers
Offline
well, i just synced a sequencer here in linux, but actually i have no idea how to use that program so it was just running without any output. but it was definitely getting the 250 start, 252 stop and 248 clock messages.
the final goal though is to help a friend sync some stuff i made to ableton live.
Offline
hi boonier,
thanks for the patch. could you please explain how exactly it works? because i might be wrong, but it seems incorrect to me.
There is a [== 248] object and [t b b] after it.
From what i understand, the == object doesn't send bangs to the outputs, but 0s (if not equal) or 1 (if equal), so the [t b b] object is banged (with zero) even if you receive other than 248 (=clock) midi message from the [midirealtimein] ??
could you (or sombody) explain it to me, please?
i'm very confused as i'm unable to find documentation for "midiin" and for "midirealtimein". when i right click and choose help, it opens a help page where these objects are not mentioned.
(i'm having troubles syncing two of my patches on two machines using midi clock in/out. on receiving the clock, i seem to be receiving more bangs per measure than i expect and i'm getting out of sync because of it.)
thanks and regards
daniel
edit: I am in windows os, so the midirealtimein should work...
Last edited by dnk777 (2012-04-05 22:40:30)
Offline
just about the post this thanks i will give it a test with my daw
Offline
dnk777 wrote:
hi boonier,
thanks for the patch. could you please explain how exactly it works? because i might be wrong, but it seems incorrect to me.
There is a [== 248] object and [t b b] after it.
From what i understand, the == object doesn't send bangs to the outputs, but 0s (if not equal) or 1 (if equal), so the [t b b] object is banged (with zero) even if you receive other than 248 (=clock) midi message from the [midirealtimein] ??
could you (or sombody) explain it to me, please?
I find the same problem, it doesn't make any sense to me the [== 248] object since [t b b] will still trigger its bangs either if the condition is satisfied or not.
Besides, I don't understand this patch correctly. Which is the purpose of delaying 500 ms each bang and resetting the counter to 0? Could you explain this patch thoroughly?
Offline
Hi - quite a while since I saw that patch! not sure about the [== 248] bit as the triggers will still be there regardless as you say.
THe purpose of resetting the counter to 0 after the stream of 248s stops coming in is so that the counter fires on the downbeat when re-started, and not off beat...
To be honest, I think I stopped using this method in favour of just using the [midirealtimein] to trigger the stop/stop pf an internal metro as the timing was more rock solid and only relied on the initial start trigger being relatively accurate. THe stream of 248 was subject to jitter over the IAC bus. Using this last method seemed more satisfactory.
Perhaps the first method is worth revisiting now as Jack osx now has sample accurate midi?
hope this helps/clarifies :)
Offline