Home | Rules and Guide | Sign In/Create Account | Write a Post | Reddit | #LD48 | #ludumdare on irc.afternet.org (Info)

Ludum Dare 31 — Coming December 5th-8th 2014! — Join the Mailing List!
  • Ludum Dare 31 begins: in 79 days, 11 hours, 25 minutes, 55 seconds
  • (Time might be off, we’ll have it right soon)


    Tum tum tum TADA tum

    Posted by
    February 20th, 2010 2:47 pm

    Rythm patterns recognition works! It was a lot easier than I had expected. See in screenshot:

    • Patterns are described as string, for instance “1121”, where numbers from 1 to 4 mean drums 1 to 4 (and also keys 1 to 4)
    • The actual rythm is given by a list of numbers, given in beats. {0,1,2,3} means that the four notes of this pattern are played onĀ  each beat. {0, 1.5, 2, 2.5, 3} is a tad more funky :)
    • If no notes are played in the two beats following the last note, it times out and the pattern is reseted.
    • After each new note, we check if the current sequence matches a pattern, and then we check that the recorded times are close enough to the wanted times. If yes, the action is launched.

    Note that this implies that no pattern can be the prefix of another one, and that no note in a pattern can be equal or longer than two beats.

    Pom pom pom TADA pom!

    Pom pom pom TADA pom!

    One Response to “Tum tum tum TADA tum”

    1. snowyowl says:

      Sounds cool! Can’t wait to play it!

    Leave a Reply

    You must be logged in to post a comment.


    All posts, images, and comments are owned by their creators.

    [cache: storing page]