If you take a master clock (e.g. 1 Hz) it is easy to get the quarter notes (every pulse), the half notes (every two pulses), and the whole notes (every four pulses) to build a simple drum machine.
What would I need to do in order to create a steady stream of triplets1 from a master clock?
1 A triplet is when three notes of a type take up the same duration as two regular notes of the same type. E.g. three triplet quarter notes are the same 'length' as two quarter notes.