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.

[cache: storing page]