Not like I don't have 100 unfinished projects already. But I recently come across a mario paint composer by unfungames.com. I remember playing mario paint back on the Snes. So I gave it a whirl. Turns out they wrote it in macromedia director. and it sucks. It does what its suppose to but the interface is buggy and it just doesn't work right. So I come across mario sequencer. its in Japanese it works ok, but it lacks all the features that would make it worth while.
So I decided I would attempt to make my own. I know using directSound with a secondary audio buffer you can alter the pitch of a wav file. no problem there. I drew the staff already using gdi+, no problem there. but then the problem comes with how do I loop through the objects added to the staff?
Here is my idea. I'm just not sure the performance will be worth the time. Any suggestions would be appreciated.
I used 20px gaps vertically and 40px gaps horizontally. I figure i create a "note" class that holds its point to be drawn on the staff. and when you click to add a note it will check the point you clicked and move it to the next even 40px interval for x and 20px interval for y causing it to snap to the staff. I the note class a frequency variable that is automatically set depending on its postiton.Y property. and give it a int property that represnets its Icon and corrisponding sound.
on Paint i loop through all the objects i created and draw them (sounds slow but idk what else to do)
then on playback I will use a timer to control tempo and loop through the objects getting their position.X property and if the match the current line to be played then play its sound with its frequency altering information using a secondary buffer.
any suggestions on this? can anyone think of a better way to handle this? I was thinking of creating a multidimensional array to hold the note data. But I'm really unsure of if that would make a difference.