• ### metronome on pure data

hi was just wondering if anyone had any tips on how to make a practical metronome using pure data? thanks!

• Posts 13 | Views 16349
• @pdedel

If you need tips building one from scratch, I'd be happy to help.

Here's a metronome I made too that you can dig into if you want. I'd be happy to explain any part of it to you. http://forum.pdpatchrepo.info/topic/8784/metromidi-metronome-midi-clock-source

• @pdedel in fact, here's a really basic one to get you started

easymetro.pd

• I made this abstraction for the patch I'm currently working on. It's not really straightforward, but it can be useful to anyone interested in irregular tempo and rhythmic modulations. It's called [metromod], you have to give it an argument - its "ID" (it's the most practical way I found to use multiple instances of it). Then you have to send it several messages. For instance, if you create [metromod 1], you can send :

; tempo1 60 (tempo of the first beat, in bpm)
; loop1 5 (optional ; loops 5 beats)
; start1 0 (optional ; starts with the first value)
and, most important, the rhythmic values. For instance, if you want to loop a measure made of a quarter note, a half note, a quarter note, an eight note and a quarter note, you'll have to send
; metro1 0 1 2 0.5 0.5 2 (it's stored in an array)
If your metronome is stable (i.e. it doesn't speeds up or slows down at every cycle), the patch will print "metrox : stable". Otherwise, it will either print : "accélère"(speeds up) or "ralentit"(slows down). If you use coefficients like 1/3 or 2/3, you have to be quite accurate. 1 0.666667 1.5 0.333333 3 will be considered stable, 1 0.66 1.5 0.33 3 will not.
You can start and stop it sending bngx 0 or 1, x being the creation argument. This way you can build rather complex rhythms, using [metromod] to control other [metromod].
It sends a list to "modnx" (so in my example modn1) with the duration in milliseconds and the number of the beat. It was thought as a tool used to control various parameters in a patch, but also as a metronome for complex instrumental music (there's a slider to control the volume, if you want to hear the tempo).

Lucien

• @rjp9 Hi thank you so much for your help. I've been working through your patches. I'm looking to build one myself only maybe a simpler model? I still want it to be presented graphically as an actual metronome. Thanks

• @pdedel I thought that I would make you what you desire, because it is easy / not easy at all...........
thanks again to @rjp9 for the metronome, and I forget who for all of the rest....... sorry!
I wanted to point out that "structures" can be useful in a world of limited "guis"...........
metronome.zip
and I have just changed the metronome sound to more of a "tick"......
David.

• @whale-av nice one!

• @whale-av thank you so much thats amazing. how would i go about representing the beat as just a canvas flashing a colour? like a canvas flashing the bpm like your structure is? thanks

• @pdedel That's a lot easier........ the colour block is a canvas, and you can look at it's properties and resize it. The two messages at bottom left send the colour number that corresponds to the red and green that you will see in that same properties box (starting at 0 -- the top left (white)...........
metroflash.pd ........ flip-flop colour
or
metroflash2.pd ......single colour flash / big bang flashing and changing size (modified since first posted!!)
David.

• @whale-av hi david, for the metro flash is there a subpatch for the ;pd dsp 1? i cant seem to get mine to work. thanks!

• @pdedel No, it is just a message sent directly to Pd that tells it to turn on the Audio (dsp)........ but you will still have to turn up the volume at the bottom of the patch to get the sound. If you want always to have the sound volume up when you open the patch then you will need to save the state of that fader.......... or send it a message at loadbang!
If you click a similar message......
[;
pd dsp 0(
then that would turn off the dsp......

Is that what you are asking, or is there something else not working? and if so in which patch?
David.

• This post is deleted!
• @pdedel You will figure it out........ but do post your own patch if you are too frustrated!
There are two very useful tools in Pd that you might not have seen...........

The objects [print] and even better [rawprint] which you can connect to any outlet and see what is being sent (it is printed to the terminal (main Pd window where the messages appear)..... If you need to use a few [print] objects then just name them...... e.g. [print why_not_working] and then you can tell the printouts apart.............
and on the menu at the top of the page you can select "edit" and then "magic glass" (you have to be in edit mode for it to work)............ "magic glass" allows you to see exactly what is going through the "string" by hovering your mouse pointer...... very very useful.....
David.

Posts 13 | Views 16349
Internal error.

Oops! Looks like something went wrong!