From: Daniel Moore Date: 2009-02-28T02:28:51+09:00 Subject: [QUIZ] Polyrhythm Trainer (#194) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Quiz: 1. Please do not post any solutions or spoiler discussion for this quiz until 48 hours have elapsed from the time this message was sent. 2. Support Ruby Quiz by submitting ideas and responses as often as you can! Visit: 3. Enjoy! Suggestion: A [QUIZ] in the subject of emails about the problem helps everyone on Ruby Talk follow the discussion. Please reply to the original quiz message, if you can. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ## Polyrhythm Trainer (#194) Greetings fellow Rubyists, This week's quiz is to create a polyrhythm training program. The user will be prompted to tap out a rhythm with two keys: left and right. Each time the user presses a key the program will display how close to the correct timing the key press occurred. The program will be configurable to train the user in any polyrhythm 2:3, 5:4, 11:17, and so on. The program will also have a configurable tempo. After a number of complete rhythms the program will display the ratio of how many notes were successfully struck, success determined by being within a threshold around the perfect timing. The display can be as simple as a console application or use a full graphical interface. [Ruby Inside][1] recently had an article about graphical toolkits if you are interested. [Polyrhythm][2] is the simultaneous sounding of two or more independent rhythms. [1]: http://www.rubyinside.com/ruby-gui-programming-survey-results-1552.html [2]: http://en.wikipedia.org/wiki/Polyrhythm Have Fun! -- -Daniel http://rubyquiz.strd6.com