Rhythm Match patch
I was wondering where to begin with creating a patch that has a library of rhythms that can be referred to when users reproduce them to determine the success rate.
The rhythms would be inputted using the trackpad of a computer or a click
I’m willing to help you out on this, but you need to be a lot more clear about what you want.
When you say "library of rhythms" do you mean drumset beats or single drum beats or what?
"a library of rhythms that can be referred to when users reproduce them to determine the success rate."
I do not know what the above sentence means. How is the interaction supposed to work? What sounds play if/if-not played correctly? What is the UI?
"The rhythms would be inputted using the trackpad of a computer or a click."
The "click" idea is MUCH easier to implement in Max. Gestures are tricky to program in general, especially in the context of a rhythm game. Gestures have been used successfully in some rhythm games, though, such as Rhythm Heaven for DS. I still reccommend a button for input (like Rhythm Heaven for Wii).
So try explaining your idea more, and preferably include a mock screenshot of what app would look like.
you begin with such projects by breaking the problem down into smaller parts.
build something which can play a rhythm. build something which can store rhythm patterns. build something which allows user input, for now only based on using the mouse on a bang button. build something which can compare 2 stored rhythms. only fix it together when each of the parts is working.
Nadan10 – Essentially, it’s a test to determine the accuracy of a reproduction of a rhythm. The patch will play a rhythm and the user will reproduce it, the patch will then analyse the impulses to examine how accurate the user was.
Roman Thilenius – Thank you, I will try and have a look into the basic components to build this patch tomorrow!
I did something like this a while back but never really made use of it. Should put it up in the toolbox. Maybe it’ll prove useful to you (code attached).
It outputs a score based on users rhythmic input, a bang to say the user was correct, and outputs whether or not the performance included an accel or decel. You can also give it a tolerance (flexibility) percentage for reporting a correct rhythm. 0% means your timing has to be absolutely perfect (humanly impossible!!), so give it something generous like 30-50% :-)
You have to store the rhythms as ratio values in a coll – that way the user can enter the rhythm at any speed and it will still track the rhythm.
So for example this rhythm: 1/4, 1/8, 1/8, 1/4, 1/2, 1/4, 1/2. would be expressed as: 1. 0.5 0.5 1. 2. 1. 2. Note: for the timing to recognise the final duration (in this case the 1/2) – you need to add one extra bang after this duration – so 8 bangs in total if that makes sense.
Drop me a line if you’re having trouble working it out.