I’m working on a Rhythm generator which works using two inputed numbers.

Two numbers are multiplied by themselves to create two lists of essentially, times tables. e.g:

3, 6, 9, 12, 15 etc

5, 10, 15, 20 etc

With any combination of numbers eventually two numbers will match. In the example above the number is 15. But the two lists vary in lengths

I want to enter two numbers and count up until the matching number is found.

Any help would be grand!!

Guy

(Using MAX/MSP 5 on Windows 7)

]]>You use the word count, but where does counting come in?

]]>Yes, I am trying to find the lowest common denominator!

(apologies for my poor knowledge of maths!!)

In the patch, the user “counts” by pressing the green button, this adds the numbers to the coll list.

If I could work out the lowest common denominator of the two numbers then I could use a counting object to bang the green button until the lowest common denominator appears in either list.

Does that make sense? I’m not very good at penning my thoughts!

]]>If you want more than two numbers, try [match]

Sounds like some interesting polyrhyms are on the way…math and music? yes indeed…!

]]>I made an external that will give you the LCM of two arbitrary integers called `[sadam.lcm]`

, which might help you with this. It is included in my library (see http://www.sadam.hu/software ).

Hope this helps,

Ádám