We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
sound memory game (Read 676 times)
sound memory game
Sep 30th, 2007, 1:52am
 
I'm trying to program a simple music game like Simon or the music game in Big Brain Academy on the Nintendo DS.  I made a sort of "Musical Typing"-like drum machine using wav samples triggered by the Minim library, and I want to have pre-recorded rhythms that the user is supposed to copy by tapping keys and entering character data for each note.  I thought I could perhaps make a character array out of each note the user enters and then check it against another array that holds the correct sequence of notes.  I'm a bit fuzzy on the manipulation of characters though.

And I'm totally confused about the part of the program that should demonstrate the rhythm the user is supposed to copy.  I want to have an array of pre-recorded rhythms and randomly load one, and then represent each possible note as a graphic that pulses when that note sounds during the playback of the rhythm.  Like, just a square icon with the letter key that represents the note expanding in size for the second that the note is playing.  All the examples of using sound that I've seen use beat detection and draw the soundwaves or oscilloscope data as an animation, usually while an mp3 is playing.  But what I'm trying to do is actually simpler than that, isn't it?

I'd be very grateful for any help or resource links you'd be willing to provide.  I haven't been able to find any example source code for music games.
Re: sound memory game
Reply #1 - Sep 30th, 2007, 9:22pm
 
Oh ok, one of the beat detect examples actually did have what I was looking for to demonstrate the rhythm.  

Now I just need to figure out how to check the rhythm the user plays against the correct one.  Maybe it's not so much a sound/music question as a "how to deal with strings and characters" sort of question.  But I'm not sure which topic it belongs under so I'll just leave it here and hope that if I don't figure things out somebody will come along who knows better than I do.
Page Index Toggle Pages: 1